# Solution of the linear differential equation: $\frac {dy}{dx} + P(x) \cdot y=Q(x)$. What is the error in this approach?

Derive the solution of the linear differential equation: $$\frac {dy}{dx} + P(x) \cdot y=Q(x)$$

Rewriting the given differential equation, we obtain: $$(Py-Q) dx+1 \cdot dy=0$$.

Let $$M=Py-Q, N=1$$. Then : $$\dfrac {\partial M }{\partial y}=M_y=P$$

and $$\dfrac {\partial N}{\partial x}=N_x=0$$.

Thus $$\dfrac{M_y-N_x}{N}=P(x)$$. Thus, the integrating factor is $$I.F= e^{\int P dx}$$. Therefore $$e^{\int P dx}(Py-Q) dx+e^{\int P dx} \cdot dy=0$$ is an exact differential equation.

The solution of this exact differential equation is $$\int_{\text {treat y as constant} } M dx + \int \text{terms in N not containing x}~~ dy=$$ constant

$$\implies \int e^{\int P dx}(Py-Q)~ dx + 0=c$$

$$\implies y \int P~ e^{\int P dx}~dx = \int e^{\int P dx} Q ~dx + c.~$$ But the solution of the differential equation in almost every textbook is given as $$\implies y e^{\int P dx}~dx = \int e^{\int P dx} Q ~dx + c$$

What is the error in the above steps. Thanks a lot for your help.

• What is the $I$ here? – Nick Feb 2 '20 at 13:41
• Is it possible that the second $dx$ in the first member of the last equality you have written should not be there? If that is the case, I think both expressions of the solution are equivalent. – ABC Feb 2 '20 at 13:43
• @Nick Which $I$ are you talking about? is it the $I.F$? – MathMan Feb 2 '20 at 13:45
• @ABC I believe it should be there if one goes step by step. – MathMan Feb 2 '20 at 13:46
• @Isham The solution of an exact differential equation is $\int_{\text {treat y as constant} } M dx + \int \text{terms in N not containing x}~~ dy=$ constant – MathMan Feb 2 '20 at 13:49

$$\implies \int e^{\int P dx}(Py-Q)~ dx + 0=c$$ $$\int e^{\int P dx}Pydx-\int e^{\int P dx}Qdx=c$$ $$y\int e^{\int P dx}Pdx-\int e^{\int P dx}Qdx=c$$ you have a derivative in the first integral: $$y e^{\int P dx}-\int e^{\int P dx}Qdx=c$$ Therefore: $$y e^{\int P dx}=\int e^{\int P dx}Qdx+c$$