Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|cite|improve this question
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. – André Nicolas Oct 19 '12 at 1:27
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$? – Pragabhava Oct 19 '12 at 1:37
up vote 2 down vote accepted

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

share|cite|improve this answer
Cheers...edited comment. – Jim_CS Oct 19 '12 at 3:09

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

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.