# differential eq solution

• March 4th 2008, 07:26 AM
dankelly07
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.

$
\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

$

y(0) = 0
$

I think I might have gone wrong somewhere
• March 4th 2008, 07:32 AM
kalagota
Quote:

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.

$
\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

$

y(0) = 0
$

I think I might have gone wrong somewhere

yes.. on the third line
it should be $y' = (2y + 1)x$ right?
• March 4th 2008, 08:40 AM
dankelly07
so..

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

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

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

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

am I close?
• March 5th 2008, 05:47 AM
kalagota
$\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..

$2y+1 = e^{x^2 + A} = Ae^{x^2}$ and not the one have written.. continue now..
• March 6th 2008, 03:29 PM
dankelly07

so

Ae^(x^2)+1/2

with condition A=1??

I want to be sure I can do this..
• March 6th 2008, 08:34 PM
mr fantastic
Quote:

Originally Posted by dankelly07

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..

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

$\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:

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

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

You should confirm this solution by substitution into the DE.