# Thread: differential eq solution

1. ## differential eq solution

Just wondering if anyone could have a look through nd see if I've done this right? When it comes to the general solution & conditon I'm not sure if I've done this right.

$\displaystyle \begin{gathered} y' - 2xy = x \hfill \\ y' = 2xy + x \hfill \\ \smallint \frac{{dy}} {y} = \smallint 3x \hfill \\ \log (y) = \frac{3} {2}x^2 \hfill \\ y(x) = A\exp \{ \frac{3} {2}x^2 \} \hfill \\ \end{gathered}$

satisfies

$\displaystyle y(0) = 0$

is the answer y(x)=A??
I think I might have gone wrong somewhere

2. Originally Posted by dankelly07
Just wondering if anyone could have a look through nd see if I've done this right? When it comes to the general solution & conditon I'm not sure if I've done this right.

$\displaystyle \begin{gathered} y' - 2xy = x \hfill \\ y' = 2xy + x \hfill \\ \smallint \frac{{dy}} {y} = \smallint 3x \hfill \\ \log (y) = \frac{3} {2}x^2 \hfill \\ y(x) = A\exp \{ \frac{3} {2}x^2 \} \hfill \\ \end{gathered}$

satisfies

$\displaystyle y(0) = 0$

is the answer y(x)=A??
I think I might have gone wrong somewhere
yes.. on the third line
it should be $\displaystyle y' = (2y + 1)x$ right?

3. so..

$\displaystyle \smallint \frac{{dy}} {{2y + 1}} = \smallint xdx$

$\displaystyle \frac{1} {2}\log (|2y + 1|) = \frac{{x^2 }} {\begin{gathered} 2 \hfill \\ \hfill \\ \end{gathered} } + A$

$\displaystyle 2y = e^{-x^2 } - 1 + A$

$\displaystyle y = A + \frac{{e^{-x^2 } - 1}} {\begin{gathered} 2 \hfill \\ \hfill \\ \end{gathered} }$

am I close?

4. $\displaystyle \frac{1}{2} \log (2y + 1) = \frac{x^2}{2} + A \Rightarrow \log (2y+1) = x^2 + A$

if you take the exponential of both sides, it should turn out to be like this..

$\displaystyle 2y+1 = e^{x^2 + A} = Ae^{x^2}$ and not the one have written.. continue now..

5. thanks for your help..

so

Ae^(x^2)+1/2

with condition A=1??

I want to be sure I can do this..

6. Originally Posted by dankelly07
thanks for your help..

so

Ae^(x^2)+1/2 Mr F says: It's - not + 1/2.

with condition A=1??

I want to be sure I can do this..
$\displaystyle 2y + 1 = A e^{x^2}$

$\displaystyle \Rightarrow y = Ae^{x^2} {\color{red} - }\frac{1}{2}$.

Substitute the given boundary condition y(0) = 0, that is, y = 0 when x = 0:

$\displaystyle 0 = A - \frac{1}{2} \Rightarrow A = \frac{1}{2}$.

Therefore $\displaystyle y = \frac{1}{2} e^{x^2} - \frac{1}{2}$.

You should confirm this solution by substitution into the DE.