Tricky Differential Equation Problem I am unsure of how to tackle the following differential equation:
$$ dx+ x\,dy = e^{-y}\sec^2y\,dy$$
I have done the following so far:
$$dx + x\,dy = e^{-y} \sec^2y \, dy$$
$$=>dx = e^{-y} \sec^2y \, dy - x \, dy$$
$$=>dx = (e^{-y} \sec^2y - x) \, dy$$
$$=>dx/dy = (e^{-y}) \sec^2y - x $$
Is this the correct approach? How can the problem be solved after this?
(Not homework: preparing for a test)
 A: Hint: Rewrite/Simplify it as:
$$e^y~dx + (x e^y - \sec^2 y)~ dy = 0$$
Now, check this as being an Exact Equation to proceed.
A: Rewrite the equation as:
$$\frac{dx}{dy} + x = e^{-y} \sec^2y$$
This can now be tackled with an 'Integrating Factor' which in this case is $e^y$.
So, multiply both sides by $e^y$:
$$e^y\frac{dx}{dy} + xe^y = \sec^2y$$
The LHS is nothing but the derivative of $xe^y$ with respect to $y.$
We have
$$\frac{d(xe^y)}{dy}= \sec^2y$$
Integrate both sides with respect to $y$:
$$xe^y=\tan(y)+c$$
Thus,
$$x=e^{-y}\tan(y)+ce^{-y}$$
where $c$ is an arbitrary constant.
Note: Any equation of the form 
$$\frac{dx}{dy} + xP(y) = Q(y)$$
can be tackled using an Integrating Factor.
A: Yeah! But if you just want to, you can also use the other method which is Linear Differential equation, where in the standard solution goes like this: dx/dy+xP(y)=Q(y)--> if eq. is linear in x; dy/dx+yP(x)=Q(x)--> if eq. is linear in y. 
since the given problem is linear in x, use dx/dy+xP(y)=Q(y)
where P(y)=1 and Q(y)=e^(−y)sec^(2)y
and IF (Integrating factor): e^(integral of P(y) or e enter image description here
then use the formula:
x*IF=enter image description here(IF * Q(y))dy + C
thus,
x*e^(y)=tan^(2)y+C [this is the final answer in general form ]
