# Indefinite integrals, first order linear differential equations

I was solving differential equation
${x\cos x}\frac {dy}{dx} + y(x\sin x+\cos x)=1$
which on dividing by $x\cos x$ becomes FOLD(first order linear differential) equation.

But I am stuck at following integral. Can anyone help solve this integral? An alternate approach to the problem is also welcome.

$$\int\frac {e^{\cos x}}{\cos x}dx$$

• That is a good approach, you get a linear equation with an Integrating Factor (IF) that is NOT as you show - check your algebra. Maybe you are incorrectly writing the Integrating Factor. – Moo Jul 19 '17 at 4:27
• Yes, I did a calculation error. – user458519 Jul 19 '17 at 9:11

Another approach:

By dividing both sides by $\cos^2 x$ we get

\begin{align*} (x\sec x)\frac{dy}{dx}+(x\tan x\sec x+\sec x)y&=\sec^2 x\\ \frac{d}{dx}\left[(x\sec x)y\right]&=\sec^2 x \end{align*}

Step 1: multiply by $dx$

Step 2: $(xy \sin x + y \cos x - 1) \ dx + x \cos x \ dy = 0$

$\implies M = (xy \sin x + y \cos x - 1) \ \text{and} \ N = x \cos x$

Step 3: Check if exact, i.e. if $M_y = N_x$ (Hint, this is not exact)

Step 4: $\dfrac{M_y - N_x}{N} = 2 \tan x \ \$ i.e. is a function of x only

Now use integrating factor