# Mind boggle

1. May 31, 2010

### dthmnstr

hi guys. i seem to have a problem with this: 2y'-xy=1
ive tried many times to separate the two variables to each their respective sides but i always end up with a fraction of either y or x along with the other variable (like 2ydy=xdx+ (1/y)dx or (2y^2dy)/dx=yx+1). my books dont give any examples of similar questions and the internets is lacking. any suggestions on how i go about this? if the entire thing was =0 (2y'-xy=0) then it would be a piece of cake but the =1 is boggling my mind.

2. May 31, 2010

### HallsofIvy

Staff Emeritus
That equation is not "separable" but it is linear- you can use the "integrating factor" method. (Every first order equation has an integrating factor but it is only linear equations in which it is easy to find.)

An integrating factor is a function, u(x) such that multiplying the entire equation by it makes the left side an "exact derivative". That is, (uy)'= uy'- xuy. Since (uy)'= uy'+ u'y by the chain rule, we must have uy'+ u'y= uy'- xuy. That is, u'y= -xuy so u'= -xu which is a separable equation. du/u= -xdx so $ln(u)= -x^2/2$ and $u= e^{-x^2/2}$.

Multiplying both sides of the equation by that gives
$$e^{-x^2/2}y'- xe^{-x^2/2}y= (e^{-x^2/2}y)'= e^{-x^2/2}$$
so that
$$e^{-x^2/2}y= \int e^{-x^2/2}dx$$.

You can write the solution as
$$y(x)= e^{x^2/2}\int_0^x e^{-t^2/2}dt+ C$$
where I changed the integral on the right to a definite integral, with dummy variable t and upper limit x, and added a constant so you won't be tempted to make the mistake of canceling the two exponentials.

Of course, you will need something like the "error function" to actually integrate that.

3. May 31, 2010

### dthmnstr

hhmmm funny how this is not mentioned in my book, i'll give it a try.
thanks :)