# Thread: integrating exponential

1. ## integrating exponential

Um is this right:
The integral of e^(1/4 x^2 s) dx
= e^(s x^2 /4) x?

Thank you

2. Originally Posted by gconfused
Um is this right:
The integral of e^(1/4 x^2 s) dx
= e^(s x^2 /4) x?

Thank you
I take it you mean $\displaystyle \int e^{\frac{sx^2}{4}} dx$.

If $\displaystyle s$ is a constant - ie. just a number - then the integral would be:

$\displaystyle \frac{2}{sx} e^{\frac{sx^2}{4}} + C$

3. Thanks!! Coz i tried writing it up in mathematica to check my answer, and it gave me that and that just looked dodgy. yeahh must have typed it wrong... thanks again

4. Just a little tip on integrating exponentials.

If the question is $\displaystyle \int e^{f(x)} dx$

Then the answer is $\displaystyle \frac{1}{f'(x)} e^{f(x)} + C$

For example, $\displaystyle \int e^{9x} dx$ would be $\displaystyle \frac{1}{9} e^{9x} + C$

You can of course check this by differentiating your answer and see if you get your original equation.

NOTE: This only works if the f(x) is a linear equation.

5. Originally Posted by craig
I take it you mean $\displaystyle \int e^{\frac{sx^2}{4}} dx$.

If $\displaystyle s$ is a constant - ie. just a number - then the integral would be:

$\displaystyle \frac{2}{sx} e^{\frac{sx^2}{4}} + C$
Sorry but if that's the question then this answer is totally wrong. Differentiate it and see for yourself.

$\displaystyle \int e^{\frac{sx^2}{4}} dx$ has no elementary primative.

Originally Posted by craig
Just a little tip on integrating exponentials.

If the question is $\displaystyle \int e^{f(x)} dx$

Then the answer is $\displaystyle \frac{1}{f'(x)} e^{f(x)} + C$

For example, $\displaystyle \int e^{9x} dx$ would be $\displaystyle \frac{1}{9} e^{9x} + C$

You can of course check this by differentiating your answer and see if you get your original equation.
Sorry but in general this is totally wrong. It is only correct when f(x) is a linear function.

6. Originally Posted by mr fantastic
Sorry but if that's the question then this answer is totally wrong. Differentiate it and see for yourself.

$\displaystyle \int e^{\frac{sx^2}{4}} dx$ has no elementary primative.

Sorry but in general this is totally wrong. It is only correct when f(x) is a linear function.
So what do you mean by no elementary primative? Because i did try and integrate it, and got the same answer as that guy. If that's not right, then how would i go about answering that question?

7. Originally Posted by mr fantastic
Sorry but if that's the question then this answer is totally wrong. Differentiate it and see for yourself.

$\displaystyle \int e^{\frac{sx^2}{4}} dx$ has no elementary primative.

Sorry but in general this is totally wrong. It is only correct when f(x) is a linear function.
I was not aware of this , didn't know that the function of x had to be linear, I apologise.

8. Originally Posted by gconfused
So what do you mean by no elementary primative? Because i did try and integrate it, and got the same answer as that guy. If that's not right, then how would i go about answering that question?
I mean that the answer to $\displaystyle \int e^{\frac{sx^2}{4}} \, dx$ cannot be expressed as a finite number of elementary functions. If you post the details of your calculation I will point out your mistakes. Did you try differentiating your answer? Do you get $\displaystyle e^{sx^2/4}$?

If this integral arises as a result of a question you're trying to answer, I suggest you post the entire question exactly as it's written.

9. Originally Posted by gconfused
So what do you mean by no elementary primative? Because i did try and integrate it, and got the same answer as that guy. If that's not right, then how would i go about answering that question?
It is not correct because the derivative of $\displaystyle \frac{2}{sx}e^{sx^2/4}$ has to be done by the product rule: (fg)'= f'g+ fg'. The derivative of $\displaystyle e^{sx^2/4}$ is $\displaystyle \frac{2sx}{4}e^{sx^2/4}$ and that, multiplied by $\displaystyle \frac{2}{sx}$ will give $\displaystyle e^{sx^2/4}$ but then the derivative of $\displaystyle \frac{2}{sx}$ is $\displaystyle -\frac{2}{sx^2}$ so the derivative of the entire $\displaystyle \frac{2}{sx}e^{sx^2/4}$ is $\displaystyle e^{sx^2/4}- \frac{2}{sx^2}e^{sx^2/4}$, not just $\displaystyle e^{sx^2/4}$.

Craig's advice for integrating $\displaystyle e^{f(x)}$ in general is not correct because what he is trying to do is use the substitution u= f(x). Then du= f'(x)dx so dx= du/f'(x). Putting those into the integral we have $\displaystyle \int e^u\left(du/f'(x)\right)$ and, apparently, he is taking that f'(x) outside the integral. But if f is not linear, then f' is a function of x and cannot be taken outside the integral- it must be integrated also. If f were linear, that is, if f(x)= ax+ b then f'(x)= a, a constant and we can do that: Letting u= ax+ b, du= adx so dx= dx/a and $\displaystyle \int e^{ax+ b}dx= \int e^u (du/a)= \frac{1}{a}\int e^u du$$\displaystyle = \frac{1}{a}e^u+ C= \frac{1}{a}e^{ax+b}+ C$. But that is only possible with a being a constant.

You should understand that most (in a very specific sense "almost all") integrable functions do NOT have "elementary functions" as integrals. (Elementary functions" are basically all the functions that you see in Calculus or lower level courses.)

About the best you can do with $\displaystyle \int e^{sx^2/4}dx$ is make the linear substitution $\displaystyle u= \sqrt{s}x/2$. Then $\displaystyle du= \sqrt{s}/2 dx$ and $\displaystyle dx= \frac{2}{\sqrt{s}} du$ so $\displaystyle \int e^{sx^2/4} dx = \frac{2}{\sqrt{s}} \int e^{u^2} du = \frac{2}{\sqrt{s}} \text{erf}(x)$ where "erf(x)" is defined as $\displaystyle \int e^{u^2}du$. It is a non-elementary function, called the "error function" and is used extensively in statistics. In fact, I wouldn't be surprised if that problem came from a statistics course.