Hello,(adsbygoogle = window.adsbygoogle || []).push({});

The general solution of a differential equation for [tex]y'+P(x)y=G(x)[/tex] is

[tex]y(x)=e^{-\int P(x)dx}[C+\int e^{\int P(x)dx}G(x)dx][/tex]

for [tex]y'+xy=x[/tex]

[tex]y(x)=e^{-\int xdx}[C+\int e^{\int xdx}xdx][/tex] i have

[tex]y=Ce^{-\frac{x^2}{2}}+1[/tex]

By the other solution

[tex]\frac{dy}{dx}+xy=x \rightarrow \frac{dy}{dx}=x(1-y)\Rightarrow \frac{dy}{1-y}=xdx[/tex]

integrating the both sides

[tex]\int \frac{dy}{1-y}=\int xdx\Rightarrow \ln \left|1-y \right|=\frac{x^2}{2}+C

\left|1-y \right|=Ce^{\frac{x^2}{2}}\Rightarrow y=1-Ce^{\frac{x^2}{2}}[/tex] or [tex]y=1+Ce^{\frac{x^2}{2}}[/tex]

Why the two solutions are different and where is my mistake?Please help me.Thanks.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# General solution formula of a differential equation

Loading...

Similar Threads - General solution formula | Date |
---|---|

I General solution to linear homogeneous 2nd order ODEs | Apr 27, 2016 |

General Solution from Particular Solution | Jan 23, 2016 |

General solution of double integrals | Nov 19, 2012 |

Simple integral, example or general solution correct? | Feb 1, 2010 |

What is the general solution for b_r here ? | Apr 25, 2008 |

**Physics Forums - The Fusion of Science and Community**