4

I'm struggling with the integral

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

how can you possibly integrate that?

Enrico M.
  • 26,114
user43783
  • 151
  • 5

2 Answers2

10

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}$$

Then:

$$ 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
    @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? –  Jan 27 '17 at 19:24
  • Would the second downvoter mind explaining? –  Jan 28 '17 at 01:13
  • 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". – MathematicsStudent1122 Jan 28 '17 at 01:34
  • @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. –  Jan 28 '17 at 01:42
3

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:

https://en.wikipedia.org/wiki/Error_function

Enrico M.
  • 26,114
  • 2
    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. – Cameron Williams Jan 27 '17 at 19:06
  • 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... – Enrico M. Jan 27 '17 at 19:07
  • 1
    Yeah that's fair. It's just a personal opinion. Same goes for the W function with me. – Cameron Williams Jan 27 '17 at 19:11
  • 1
    This is clearly the better answer. Don't understand the downvotes. – MathematicsStudent1122 Jan 27 '17 at 22:31
  • @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!

    – Enrico M. Jan 27 '17 at 22:33
  • @MathematicsStudent1122, what makes this "clearly" the better answer? I don't mind if anyone or everyone likes someone else's answer better than mine, but I'd like to understand what makes such a subjective matter so clear. –  Jan 28 '17 at 01:15
  • @tilper I think that it's just because I put a definite result. It's ok to say that the Erf is basically the definition itself of the integral. But in a certain way, looking at it, things get direct, to say so. You plug $x = 0$ and you get a numerical value, you want the definite integral for, to say, $3$ and $109$ and you just plugs the value taking the difference. In that sense my result is better, because it doesn't leave to further calculations. I can take the critics, I'm not that touchy. What I don't get are the down votes when an answer is anyway correct, although not the best one! – Enrico M. Jan 28 '17 at 08:46