Solving Second Order Linear Non-homogeneous Differential Equation I am trying to solve the following:
$$
y''+4y=\tan(t). 
$$

I have used the method of variation of parameters. Currently I am at a point in the equation where I have this: $$u_1= \int \frac{\tan t \cos2t}{2}$$

I am stuck here
$\cos 2t = 2\cos^2 t - 1$ hence

$$\int \frac{\tan t \cos2t}{2} dt =  \int \sin t \cos t \  dt - \frac 12 \int \tan t \ dt \\ = \frac 12 \sin^2 t - \frac 12 \ln(\sec t) + C$$
$$ = \frac 12 \left( \sin^2 t + \ln(\cos t) \right) + C$$
$$\int \frac{1}{2}\cos(2t)\tan(t)dt=\frac{1}{2}\bigg(-\frac{1}{2}\cos(2t)+\ln(\cos(t))\bigg)$$