# Is it possible to integrate x^2*e^(x^2)?

## Main Question or Discussion Point

Is it possible to integrate x^2*e^(x^2)?
Also, is it possible to integrate x*e^(x^2)?

If so, would you do it by parts?

yes
yes
the first one looks a little tricky, I think you'd have to state your answer in terms of an integral function though
the second one is pretty simple if you change variables

The one you gave in the title is impossible to do, but I think if it is taken as an integral from 0 to infinity the Gamma function may yield an appropriate result. The other one is just substitution.

HallsofIvy
Homework Helper
It depends upon what you mean by "integrate". Both of those functions are continuous and so integrable. If you mean "have an elementary function as anti-derivative", no. But they can be integrated in terms of the "error function", erf(x) , which is itself defined as the integral of $e^{x^2}$.

Like stated above, the first expression, when integrated, will probably result in an imaginary error function in terms of a "function" for the anti-derivative.

The second one is easy.
∫x(ex)dx
u=x2
du=2xdx
1/2∫eudu
=(1/2)eu+c
=(1/2)ex2+c

P.S: @HallsofIvy i love your signature

Last edited:
arildno
Homework Helper
Gold Member
Dearly Missed
Euclid Alone Has Looked On Beauty Bare
-----------------------------
Euclid alone has looked on Beauty bare.
Let all who prate of Beauty hold their peace,
And lay them prone upon the earth and cease
To ponder on themselves, the while they stare
At nothing, intricately drawn nowhere
In shapes of shifting lineage; let geese
Gabble and hiss, but heroes seek release
From dusty bondage into luminous air.
O blinding hour, O holy, terrible day,
When first the shaft into his vision shone
Of light anatomized! Euclid alone
Has looked on Beauty bare. Fortunate they
Who, though once only and then but far away,
Have heard her massive sandal set on stone.

-- Edna St Vincent Millay

D H
Staff Emeritus
Look at the solution and you'll see it contains a mystery function erfi(x). So what is this? It's a rabbit pulled out of the hat. This hat:
$$\text{erfi}(z) = \frac 2{\sqrt{\pi}} \int_0^z e^{t^2}dt$$
You can use every integration technique you know and you will not be able to find $\int \exp(x^2)\,dx$ unless you pull this rabbit out of its magical hat. Those magical hats that contain rabbits are very important. Most functions (almost all functions) are not integrable in terms the elementary functions. They are "nonelementary integrals". Some examples: The arc length of an ellipse, the normal probability distribution, and the first function in the opening post.

When one of these nonelementary integrals appears enough times, mathematicians will give it a special definition as some new special function. erfi(x) is just one example of these special functions.

Nice explanation from PF MENTOR !

Sure, I will remember " It's a rabbit pulled out of the hat." :rofl:

A somewhat similar explanation (For French readers) : "Safari au pays des Fonctions Spéciales",
http://www.scribd.com/JJacquelin/documents

arildno
Homework Helper
Gold Member
Dearly Missed
I beg to differ..

Mathematicians are NOT wily magicians who pull rabbits out of their hats.
Rather, the error function is a pesky, annoying rabbit jumping out of the hat, despite all the desperate attempts of mathematicians to keep them inside, or as second-best, make a nice coney stew out of it.

Finally, the mathematicians give up, and let the rabbit jump out of the hat whenever it wants to.

the error function is a pesky, annoying rabbit jumping out of the hat, despite all the desperate attempts of mathematicians to keep them inside, or as second-best, make a nice coney stew out of it.
The "error function" is a name given to a particular definite integral (related to the antiderivatives of the exp(-x²) function).
The "logarithmic function" is a name given to a particular definite integral (related to the antiderivatives of the 1/x function).
So, similary :
<< the logarithmic function is a pesky, annoying rabbit jumping out of the hat, despite all the desperate attempts of mathematicians to keep them inside, or as second-best, make a nice coney stew out of it >>

Last edited by a moderator:
D H
Staff Emeritus

Rather, the error function is a pesky, annoying rabbit jumping out of the hat, despite all the desperate attempts of mathematicians to keep them inside, or as second-best, make a nice coney stew out of it.
That pesky rabbit breeds too quickly to be constrained.

arildno
Homework Helper
Gold Member
Dearly Missed
Actually, it is possible to prove whether a function has an elementary antiderivative:

http://en.wikipedia.org/wiki/Liouville's_theorem_(differential_algebra)

I was hesitant at first about these pesky functions but I now know that these integrals have actually been proven not to have an elementary solution
Provable peskiness does not make the rabbits LESS pesky!

Well, I got headache at catching the pesky rabbits humor.

Just from what I've observed before:
∫xaex2 dx has an elementary antiderivative when a is odd.

If you have an odd number of hats, the rabbit stays inside; if the number of hats is even, the rabbit comes out.

Let's send every rabbit in hat a to 2a...

Well, pesky is a word with an odd number of letters :tongue: Nature has a funny way of expressing itself (see attachment)

#### Attachments

• 41.6 KB Views: 379
Well, pesky is a word with an odd number of letters :tongue:
Interesting point. I myself find it odd that "odd" has an odd number of letters too...

Nature has a funny way of expressing itself (see attachment)
Love it! Thanks for sharing

Zondrina
Homework Helper
You can do something very interesting to integrate ex^2 in terms of the elementary functions.

Recall that the Maclaurin series ( Taylor expansion with a=0 ) for ex = $\sum$xn/n! where the sum goes from n=0 to ∞.

So with some simple substituting you can observe that :

ex^2 = $\sum$x2n/n!

And now you can integrate both sides of this equation with respect to x which results in your desired answer :

$\int$ex^2 dx = $\int$ $\sum$x2n/n! dx

$\sum$ x2n+1/(2n+1)n! + c