# Homework Help: Error function integral

1. May 25, 2010

### agalliasthe

1. The problem statement, all variables and given/known data

This is a question I'm trying to solve for chemistry research - but is homework-like, so I thought it best fit in this category.

2. Relevant equations

I am trying to find the indefinite integral of:

$$F(x,y)=\int \int e^{-k_1x^2-k_2y^2+k_3xy} dx dy$$

$$k_1, k_2, k_3$$ are constants

3. The attempt at a solution

I realize that the solution involves the error function. When I reduce it to:

$$F(x,y)=\int e^{-k_2 y^2} dy \int e^{-k_1x^2+k_3xy} dx$$

I am not sure how to treat the terms in the dx integral.

When I ask WolphramAlpha, it tells me:

$$\int e^{-k_1 x^2+k_3xy} = \frac{\sqrt{\pi}exp(\frac{k_3^2y^2}{4k_1})}{2 \sqrt {k_1}}erf\left( \frac{2k_1x-k_3y}{2\sqrt{k_1}}\right )+c$$

but I'm not sure how they got this and I'm not sure how to proceed from here. I haven't been able to find a good erf integral table. Can you offer a suggestion on a way to solve this?

Thanks.

2. May 25, 2010

### Char. Limit

$$\int e^{-k_1 x^2+k_3xy} dx = \sqrt{\frac{\pi}{k_1}}e^{\frac{k_3^2 y^2}{4k_1}}erf\left( \frac{2k_1x-k_3y}{2\sqrt{k_1}}\right )+C$$

Making it look slightly better, may help out.

3. May 25, 2010

### gabbagabbahey

I'd start by completing the square on $-k_1x^2++k_3xy$, and then using an appropriate substitution....

4. May 25, 2010

### agalliasthe

Thanks - completing the square works beautifully!

Now I am wondering where to go from here:

$$F(x,y)=\int \int e^{-k_1x^2-k_2y^2+k_3 xy}dx dy$$

$$F(x,y)=\int e^{-k_2y^2} \left ( \frac{\sqrt \pi}{2 \sqrt{k_1}} e^{\frac{k_3^2y^2}{4k_1}} erf \left (\frac{2k_1x-k_3y}{2\sqrt{k_1}} \right ) +c_1 \right )dy$$

$$F(x,y)=\frac{\sqrt\pi}{2\sqrt{k_1}} \int e^{\frac{k_3^2y^2-4k_1k_2y}{4k_1}} erf \left (\frac{2k_1x-k_3y}{2\sqrt{k_1}} \right ) dy+c_1 \int e^{-k_2y^2}dy$$

the second of these two integrals is just by definition, but I am struggling with the first. If I try integration by parts and let u=erf(~) and dv=exp(~)dy, then du becomes an exp(_) function and v is an erf(_)... so $uv-\int vdu$ doesn't do much to simplify. If I let u=exp(~) and dv=erf(~)dy, then du becomes an exp(_) function and v becomes erf(_)+exp(_)... again, not simplifying the integral.

I'm not familiar enough with the error function to know what it can and can't do, but it seems like it should be agreeable to a Gaussian in some way and simplify somehow.

Any guidance? Thanks!

5. May 26, 2010

### agalliasthe

I figured it out with integration by parts twice - thanks for your help.