coki2000
- 91
- 0
Hello,
The general solution of a differential equation for y'+P(x)y=G(x) is
y(x)=e^{-\int P(x)dx}[C+\int e^{\int P(x)dx}G(x)dx]
for y'+xy=x
y(x)=e^{-\int xdx}[C+\int e^{\int xdx}xdx] i have
y=Ce^{-\frac{x^2}{2}}+1
By the other solution
\frac{dy}{dx}+xy=x \rightarrow \frac{dy}{dx}=x(1-y)\Rightarrow \frac{dy}{1-y}=xdx
integrating the both sides
\int \frac{dy}{1-y}=\int xdx\Rightarrow \ln \left|1-y \right|=\frac{x^2}{2}+C<br /> <br /> \left|1-y \right|=Ce^{\frac{x^2}{2}}\Rightarrow y=1-Ce^{\frac{x^2}{2}} or y=1+Ce^{\frac{x^2}{2}}
Why the two solutions are different and where is my mistake?Please help me.Thanks.
The general solution of a differential equation for y'+P(x)y=G(x) is
y(x)=e^{-\int P(x)dx}[C+\int e^{\int P(x)dx}G(x)dx]
for y'+xy=x
y(x)=e^{-\int xdx}[C+\int e^{\int xdx}xdx] i have
y=Ce^{-\frac{x^2}{2}}+1
By the other solution
\frac{dy}{dx}+xy=x \rightarrow \frac{dy}{dx}=x(1-y)\Rightarrow \frac{dy}{1-y}=xdx
integrating the both sides
\int \frac{dy}{1-y}=\int xdx\Rightarrow \ln \left|1-y \right|=\frac{x^2}{2}+C<br /> <br /> \left|1-y \right|=Ce^{\frac{x^2}{2}}\Rightarrow y=1-Ce^{\frac{x^2}{2}} or y=1+Ce^{\frac{x^2}{2}}
Why the two solutions are different and where is my mistake?Please help me.Thanks.
