How to solve the differential equation $y' + \sec(x)*y = \tan(x)$ I am really struggling to solve the differential equation: $y' + \sec(x)y = \tan(x)$. If someone could point me in the right direction or give me a step by step plan it would be much appreciated!
So far I have tried taking the common factor to be $\exp(\int(\sec(x))$  (which simplifies to $\tan(x)+\sec(x)+c$ if I am not mistaken) however I end up with an equation which is beyond my integration abilities because it has both $X$ and $Y$ in it. I'm not sure if it is a case of trig identities or imaginary numbers which are letting me down.
Thanks in advance!!

As you have noted, the integrating factor is
$$\exp\left(\int\sec x\,dx\right)
    = \exp\left(-\ln(\cos(x/2)-\sin(x/2)) + \ln(\cos(x/2)+\sin(x/2))\right)
    = \frac{\cos(x/2)+\sin(x/2)}{\cos(x/2)-\sin(x/2)}
    = \frac{\cos x}{(\cos(x/2)-\sin(x/2))^2}.$$
Multiplying both sides by the integrating factor gives
\begin{align*}
  \frac{d}{dx}\left(y\frac{\cos x}{(\cos(x/2)-\sin(x/2))^2}\right) 
    &= \tan x\cdot\frac{\cos x}{(\cos(x/2)-\sin(x/2))^2} \\
    &= \frac{\sin x}{(\cos(x/2)-\sin(x/2))^2} \\
    &= \frac{\sin x}{1 - 2\sin(x/2)\cos(x/2)} \\
    &= \frac{\sin x}{1-\sin x}.
\end{align*}
Now just integrate both sides.
