Proving first order linear equation using ideas of exact equations

45 Views Asked by At

Write equation $$ \tag{1} dy/dx + P(x)y = Q(x) $$ in the form $ M \, dx + N \, dy = 0 $ and use the ideas of integrating factors to show that this equation has an integrating factor $\mu$ that is a function of $x$ alone. Find $\mu$ and obtain $$ \tag{2} y=e^{-Pdx}\left(\int \:Qe^{\int \:Pdx}dx+c\right) $$ by solving $\mu M \, dx + \mu N \, dy = 0$ as an exact equation.

My approach:

Rearranged terms in $(1)$ to get $\left(Q\left(x\right)-P\left(x\right)y\right)dx-dy=0$ which gave me $\frac{\partial }{\partial y}\left(M\right)=-P\left(x\right)$ and $\frac{\partial }{\partial x}\left(N\right)=0$.

$=>$ $\frac{\frac{\partial }{\partial x}\left(M\right)-\frac{\partial }{\partial x}\left(N\right)}{N}=P\left(x\right)$, which solves the first part of question.

Now Integrating Factor is $\mu = e^{\int P\left(x\right)\,dx}$. I multiplied it to equation $(1)$ and solved for $\frac{\partial }{\partial y}\left(f\right)=N$ which gave me $f= -e^{P\left(x\right)\,dx}y+g\left(x\right)+c$. Now solving for $ \frac{\partial }{\partial x}\left(f\right)=M $ from above equation of $f$ , I am getting $g'(x)= e^{P\left(x\right)\,dx}\left(Q\left(x\right)+\frac{dy}{dx}\right)$ . Usually after reaching this step I find $g(x)$ and substitute it in $f$ found earlier but in this problem I am stuck here and not able to reach equation $(2)$. Please help me in finding out where I am going wrong. Thanks.