# an integration problem with exponantial

• November 1st 2010, 09:25 PM
billzhao
an integration problem with exponantial
I have encountered a problem with the following form:

$\int x e^{ax^2-bx}dx$

I can only find formulas for $\int x e^{ax^2}dx$ and $\int x e^{bx}dx$ and don't know how to make use of these two formulas.

Can someone help me on this? Thanks a lot!! (Happy)
• November 1st 2010, 09:33 PM
TheEmptySet
Quote:

Originally Posted by billzhao
I have encountered a problem with the following form:

$\int x e^{ax^2-bx}dx$

I can only find formulas for $\int x e^{ax^2}dx$ and $\int x e^{bx}dx$ and don't know how to make use of these two formulas.

Can someone help me on this? Thanks a lot!! (Happy)

Complete the square in the exponent to get

$\displaysytle a(x^2-\frac{b}{a}x+\frac{b^2}{4a^2})-\frac{b^2}{4a}=a(x-\frac{b}{a})^2-\frac{b^2}{4a}$

Now the integral looks like

$\displaystyle \int xe^{a(x-\frac{b}{2a})^2-\frac{b^2}{4a}}dx=e^{-\frac{b^2}{4a}}\int xe^{a(x-\frac{b}{2a})^2} dx$

From here just make a u sub for the exponent and then you will use both of your formula's for the integral
• November 1st 2010, 10:31 PM
billzhao
Thanks for the quick reply!! But...
Is there a closed form solution for the below integration?

$\int e^{ax^2}dx$
• November 2nd 2010, 04:47 AM
HallsofIvy
Yes, but you have to use the "special function" $erf(x)= \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}dt$.

Let $iu= \sqrt{a}x$. Then $dx= \frac{i}{\sqrt{a}}du$, $e^{ax^2}= e^{-u^2}$ and the integral becomes $\frac{i}{\sqrt{a}}\int e^{-u^2}du= \frac{i\sqrt{\pi}}{2\sqrt{a}}erf(-i\sqrt{a}x)+ C$.

The fact that you have $x^2$ in the exponential rather than $-x^2$ complicates things and causes those "i" factors.