[Math] Want to understand differential equations…how to solve this basic differential equation

ordinary differential equations

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

Best Answer

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

Related Question