Theorem: Linear Second Order ODE/y'' + 4 y = tan 2 x

The second order ODE:
:$(1): \quad y'' + 4 y = \tan 2 x$
has the general solution:
:$y = C_1 \cos 2 x + C_2 \sin 2 x - \dfrac 1 4 \cos 2 x \map \ln {\sec 2 x + \tan 2 x}$

Proof:
It can be seen that $(1)$ is a nonhomogeneous linear second order ODE in the form:
:$y'' + p y' + q y = \map R x$
where:
:$p = 0$
:$q = 4$
:$\map R x = \tan 2 x$
First we establish the solution of the corresponding constant coefficient homogeneous linear second order ODE:
:$y'' + 4 y = 0$
From Linear Second Order ODE: $y'' + 4 y = 0$, this has the general solution:
:$y_g = C_1 \cos 2 x + C_2 \sin 2 x$
It remains to find a particular solution $y_p$ to $(1)$.
Expressing $y_g$ in the form:
:$y_g = C_1 \map {y_1} x + C_2 \map {y_2} x$
we have:
{{begin-eqn}}
{{eqn | l = \map {y_1} x
      | r = \cos 2 x
      | c = 
}}
{{eqn | l = \map {y_2} x
      | r = \sin 2 x
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \map { {y_1}'} x
      | r = -2 \sin 2 x
      | c = Derivative of Sine Function
}}
{{eqn | l = \map { {y_2}'} x
      | r = 2 \cos 2 x
      | c = Derivative of Cosine Function
}}
{{end-eqn}}
By the Method of Variation of Parameters, we have that:
:$y_p = v_1 y_1 + v_2 y_2$
where:
{{begin-eqn}}
{{eqn | l = v_1
      | r = \int -\frac {y_2 \map R x} {\map W {y_1, y_2} } \rd x
      | c = 
}}
{{eqn | l = v_2
      | r = \int \frac {y_1 \map R x} {\map W {y_1, y_2} } \rd x
      | c = 
}}
{{end-eqn}}
where $\map W {y_1, y_2}$ is the Wronskian of $y_1$ and $y_2$.
We have that:
{{begin-eqn}}
{{eqn | l = \map W {y_1, y_2}
      | r = y_1 {y_2}' - y_2 {y_1}'
      | c = {{Defof|Wronskian}}
}}
{{eqn | r = \cos 2 x \paren {2 \cos 2 x} - \sin 2 x \paren {-2 \sin 2 x}
      | c = 
}}
{{eqn | r = 2 \paren {\cos^2 2 x + \sin^2 2 x}
      | c = 
}}
{{eqn | r = 2
      | c = 
}}
{{end-eqn}}
Hence:
{{begin-eqn}}
{{eqn | l = v_1
      | r = \int -\frac {y_2 \map R x} {\map W {y_1, y_2} } \rd x
      | c = 
}}
{{eqn | r = \int -\frac {\sin 2 x \tan 2 x} 2 \rd x
      | c = 
}}
{{eqn | r = -\frac 1 2 \int \frac {\sin^2 2 x} {\cos 2 x} \rd x
      | c = 
}}
{{eqn | r = -\frac 1 2 \paren {-\frac {\sin 2 x} 2 + \frac 1 2 \ln \map \tan {x + \frac \pi 4} }
      | c = Primitive of $\dfrac {\sin^2 a x} {\cos a x}$
}}
{{eqn | r = \frac 1 4 \paren {\sin 2 x - \map \ln {\sec 2 x + \tan 2 x} }
      | c = Tangent of Half Angle plus $\dfrac \pi 4$
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = v_2
      | r = \int \frac {y_1 \map R x} {\map W {y_1, y_2} } \rd x
      | c = 
}}
{{eqn | r = \int \frac {\cos 2 x \tan 2 x} 2 \rd x
      | c = 
}}
{{eqn | r = \frac 1 2 \int \sin 2 x \rd x
      | c = 
}}
{{eqn | r = \frac 1 2 \paren {-\frac {\cos 2 x} 2}
      | c = Primitive of $\sin a x$
}}
{{eqn | r = -\frac 1 4 \cos 2 x
      | c = 
}}
{{end-eqn}}
It follows that:
{{begin-eqn}}
{{eqn | l = y_p
      | r = \frac 1 4 \paren {\sin 2 x - \map \ln {\sec 2 x + \tan 2 x} } \cos 2 x - \frac 1 4 \cos 2 x \sin 2 x
      | c = 
}}
{{eqn | r = -\frac 1 4 \cos 2 x \map \ln {\sec 2 x + \tan 2 x}
      | c = simplifying
}}
{{end-eqn}}
So from General Solution of Linear 2nd Order ODE from Homogeneous 2nd Order ODE and Particular Solution:
:$y = y_g + y_p = C_1 \cos 2 x + C_2 \sin 2 x - \dfrac 1 4 \cos 2 x \map \ln {\sec 2 x + \tan 2 x}$
is the general solution to $(1)$.
{{qed}}