Integral of [(x/y)^2]e^(-x^2/2y^2) dx

The following is what I need help with:

How do you go from the above: ([(x/y)^2]e^(-x^2/2y^2) dx)

to: -xe^(-x^2/2y^2) + integral e^(-x^2/2y^2) dx

It seems like the first step is to do it by parts:

Let u = x, dv = (x/y^2) e^(-x^2/(2y^2)) dx

du = dx, v = -e^(-x^2/(2y^2)).

So, ∫ (x/y)^2 e^(-x^2/(2y^2)) dx

= -x e^(-x^2/(2y^2)) - ∫ -e^(-x^2/(2y^2)) dx

= -x e^(-x^2/(2y^2)) + ∫ e^(-x^2/(2y^2)) dx

However, what confuses me is how you get from dv to v. Doesn't that require us to do integration by parts again? Is there some kind of Calculus trick going on?

I also gather that this has to do with the error function (if you plug it into wolframalpha that's what you get). However, I would really like to NOT go down that route.

Re: Integral of [(x/y)^2]e^(-x^2/2y^2) dx

Quote:

However, what confuses me is how you get from dv to v. Doesn't that require us to do integration by parts again?

Nope.

Quote:

Is there some kind of Calculus trick going on?

Yep, that could be a substitution, because the factor (x/y^2) in dv is so like the derivative of the inner function of the exponential.

Quote:

I also gather that this has to do with the error function (if you plug it into wolframalpha that's what you get). However, I would really like to NOT go down that route.

You need the error function to integrate the remaining integrand, where you have the same composite exponential but with no inner derivative conveniently hanging around.