1
$\begingroup$

So I put the differential equation $y' = xy$ into Wolfram Alpha and it tells me the solution is $$y(x) = c_1\,e^\frac{x^2}{2}$$

  • Can anybody explain to me how to sub this back into the original equation so as to verify it is the solution?
  • And was the solution arrived at in the first place?

I really need to get a differntial equations book out of the library and go through it, which is what I plan to do at xmas when I have the time...but in the meantime I would appreciate if someone could explain this particular problem to me as it is starting to annoy me that I don't understand this stuff when doing numerical analysis (even though we can get by without knowing it).

  • 1
    You must mean $y=c_1e^{\frac{x^2}{2}}$. It is easy to check that this works by differentiating. We get $y'=c_1xe^{x^2/2}$ (Chain Rule), which is indeed equal to $xy$. This is an example of a *separable* DE.2012-10-19
  • 1
    The important thing is that, supposing $y(x)>0$ (or $<0$) in a vicinity of $x$, you can divide both sides of the ode by $y$ and use the chaing rule to write the left side as (case $y >0$) $$ \frac{d}{dx} \log \big(y(x)\big) $$ and integrate both sides of the equation. Why don't you do the case $y<0$?2012-10-19

2 Answers 2

2

To check it's a solution: find $y'=dy/dx$, and check that it takes the value of $xy$. If it does, it's a solution.

You solve an equation like that by a method known as seperation of variables, which you should be able to find some lecture notes on by googleing. In this example:

$$\frac{dy}{dx}=xy\Leftrightarrow \frac{1}{y}\frac{dy}{dx}=x\Leftrightarrow\int\frac{1}{y}\frac{dy}{dx}{dx}=\int x\ dx$$ $$\Leftrightarrow\int \frac{dy}{y}=\frac{x^{2}}{2}+c\Leftrightarrow ln(y)=\frac{x^{2}}{2}+c $$

Then exponentiating, we get that the solution is $y=e^{x^{2}/2 + c}=Ae^{x^{2}/2}$, where the constant $A$ is $A=e^{c}$.

  • 0
    Cheers...edited comment.2012-10-19
1

$\frac{dy}{dx} = xy$. $\frac{dy}{y} = xdx$. Integrating the both sides, we get log $y = \frac{x^2}{2} + c$. Hence $y = e^c e^\frac{x^2}{2}$.