I'm struggling with the integral

$$\int e^x e^{x^2} \mathrm{d}x$$

how can you possibly integrate that?

  • $\begingroup$ Indefinite? definite? $\endgroup$ – tilper Jan 27 '17 at 18:46
  • $\begingroup$ Maybe you mean $(e^x)^2$ which is much easier. $\endgroup$ – MathematicsStudent1122 Jan 27 '17 at 19:01
  • $\begingroup$ @MathematicsStudent1122 I don't really think that he meant that... $\endgroup$ – Von Neumann Jan 27 '17 at 19:02

If you want to integrate $e^x \cdot e^{x^2}$ over all of $\Bbb R$, then you can complete the square. First:

$$e^x \cdot e^{x^2} = e^{x + x^2}$$


$$ x + x^2 = \left(x + \frac12\right)^2 - \frac14$$

Therefore: $$ e^x \cdot e^{x^2} = e^{\left(x+\frac12\right)^2 - \frac14} = e^{\left(x+\frac12\right)^2} e^{-\frac14}$$

And so:

$$\int_{\Bbb R} e^x \cdot e^{x^2} \, dx = \int_{\Bbb R} e^{\left(x+\frac12\right)^2} e^{-\frac14} \, dx$$

$e^{-1/4}$ is just a constant. Factor it out, then use substitution and a well-known formula to handle the rest.

  • 2
    $\begingroup$ @AlanTuring, I did study your answer. You refer to the imaginary error function and then you provide a link with information about it. In that link it says $\displaystyle\operatorname{erfi}(x) = \dfrac2{\sqrt{\pi}} \int_0^x e^{t^2} \, dt$. So, I ask again, why it is not ok to for me to assume $\displaystyle\int_{-\infty}^{+\infty}$ even if I explicitly state it, but it is ok for you to assume $\displaystyle\int_0^x$ when (at the time) you didn't explicitly state it? $\endgroup$ – tilper Jan 27 '17 at 19:24
  • $\begingroup$ Would the second downvoter mind explaining? $\endgroup$ – tilper Jan 28 '17 at 1:13
  • $\begingroup$ I downvoted. This doesn't answer the question. When a question asks to "integrate a function" and no bounds are specified, that's generally taken to mean "find the antiderivative (+$C$) for that function". $\endgroup$ – MathematicsStudent1122 Jan 28 '17 at 1:34
  • $\begingroup$ @MathematicsStudent1122, please read the edit history on the question. OP was unclear about whether the integral was definite or not. The indefinite integral is an assumption made by an editor. $\endgroup$ – tilper Jan 28 '17 at 1:42

It's not a trivial integral, if its limits are undefined.

I mean: if you know a bit about special functions, then it's trivial because its result is in the form of the Imaginary Error Function, and it is:

$$\int e^x e^{x^2}\ \text{d}x = \frac{\sqrt{\pi } \text{erfi}\left(x+\frac{1}{2}\right)}{2 \sqrt[4]{e}} + C$$

I'll write some detail later.

More on error function:


  • 2
    $\begingroup$ I've never really liked using the error function as an "answer" to these, because the error function is basically defined to be an integral of $\exp(-x^2)$ - so the answer is basically a definition massaged in the right way. $\endgroup$ – Cameron Williams Jan 27 '17 at 19:06
  • $\begingroup$ The integral is undefined, hence this answer is the most correct one. I know that is a quite circular thing, but as long as we don't have limits in the integral... $\endgroup$ – Von Neumann Jan 27 '17 at 19:07
  • 1
    $\begingroup$ Yeah that's fair. It's just a personal opinion. Same goes for the W function with me. $\endgroup$ – Cameron Williams Jan 27 '17 at 19:11
  • 1
    $\begingroup$ This is clearly the better answer. Don't understand the downvotes. $\endgroup$ – MathematicsStudent1122 Jan 27 '17 at 22:31
  • $\begingroup$ @MathematicsStudent1122 Don't worry, I'm used to random people who randomly dowvote just because. The down vote problem is a frequent problem over here. Down votes shall be applied for wrong answers or bad and useless one. This is not. Maybe is not the best one but it's correct. Anyway, still :) Thank you for your appreciation nay! $\endgroup$ – Von Neumann Jan 27 '17 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.