# Dirst order ODE's with x & expontials

1. Jun 1, 2006

### Pixter

hej
have a ode that looks like this:

y'-xy=-x
so i find the particular integral which is e^-(x^2)/2

but then when i try to solve the eqn i have to do a integration by parts
ie:
ye^-(x^2)/2 = integrate[ -xe^-(x^2)/2 dx]
but when i do this integration by parts i end up with having to do another, and i never ends..
i know that there is some trick when dealing with simple x*e^x bla bla bla..

but don't know how to do it.. would someone please show me, or help me out?

2. Jun 1, 2006

### J77

Why not solve:

$$\int \frac{dy}{y-1}=\int x dx$$ ?

3. Jun 6, 2006

### t!m

I think there was a slip of the mind on that last step:

xy - x = x(y-1), so dy/(y-1) = xdx, as originally stated by J77.

I'm sure it was just an accident, but I figured it warranted correction.

4. Jun 7, 2006

### HallsofIvy

Staff Emeritus
As J77 pointed out, this is a separable first order equation:
dy/dx= xy- x= x(y-1) so you get
(edited to correct misprint)
$$\frac{dy}{y-1}= xdx$$
and so $ln(y-1)= \frac{1}{2}x^2+ c$.
Then
$$y(x)=1+ Ce^{\frac{x^2}{2}$$

But if you really want to do that integration, just use a simple substitution: your integrand is NOT "$xe^x$" (which could be done easily by parts) but $xe^{x^2}$. Let u= x2.