# How to integrate (x^3)(e^2x) ?

1. May 12, 2010

### shinkansenfan

Thanks.

2. May 12, 2010

### Dickfore

by parts.

3. May 12, 2010

### Count Iblis

Or by integrating exp(p x) and differentiating the result 3 times w.r.t. the parameter p.

Or by integrating exp(p x) and comptuting the third order Taylor expansion around p = 2.

The last option requires the least number of computations, because Taylor expansions can be obtained by using the standard Taylor expansions for the standard functions, rather than using the general Taylor expansion formula in which you have to repeatedly differentiate the function.

4. May 12, 2010

### shinkansenfan

Thanks very much.

5. May 17, 2010

### g_edgar

Or: get a computer to do it for you. Maple, Mathematica, etc,

(Is that a lot different that getting Physics Forums to do it for you?)

6. May 17, 2010

### Count Iblis

Yes it is, because the whole point of this exercise is to let the student learn how to compute such integrals, not merely to know the answer to this problem. Using Mathematica is ok. for people like me who know all about computing integrals but who need to go on with their work and not waste a lot of time doing integrals themselves.

When I use Mathematica for complicated problems I often have to write small programs or give commands that tells Mathematica what to do. Those steps that I put in myself require far more thinking than the steps needed to solve simple integrals by substitution. All that Mathematica is doing for me is to mechanically use certain rules to produce hundreds of pages full of formula, something that would take me more than a lifetime to do by hand. I then use that output to extract the information I want.

7. May 19, 2010

### ibmichuco

So I did this three times and I got something like e^2x[x^3/2-3x^2/4+6x/8-16/6] + C
which sounds reasonable, but then when I tried

\int_{-\infty}^{\infty} x^2 e^{-2 x^2} dx

with integration by parts, I ended up with something like infinity ..?

Michuco

8. May 19, 2010

### Cyosis

The integral

$$\int_{-\infty}^{\infty} x^2 e^{-2 x^2} dx$$

does converge.

Show the steps you've made so we can see where it went wrong.

9. May 19, 2010

### ibmichuco

u = x^2 -> du = 2xdx
dv = e^{2x^2} -> v = \sqrt{\pi/2}

\int ... = x^2\sqrt{\pi/2}|_{-\infty}^\infty -\int_{-\infty}^\infty \sqrt{\pi/2} 2 x dx

The first term looks like zero, and the second doesn't looks like it would converge.
I also tried u=e^{-2x^2} and dv = x^2dx, but then I ran into problem with v.

10. May 19, 2010

### Cyosis

You need to put [.tex][./tex] tags around your latex code (without the dots).

Fixing your tex so I can read it.
$$u = x^2 -> du = 2xdx \; dv = e^{2x^2} -> v = \sqrt{\pi/2} \int ... = x^2\sqrt{\pi/2}|_{-\infty}^\infty -\int_{-\infty}^\infty \sqrt{\pi/2} 2 x dx$$

I am not sure what you're doing here, but it is definitely wrong.

\begin{align*} \int_{-\infty}^{\infty} x^2 e^{-2 x^2} dx& =\int_{-\infty}^{\infty} x \left(x e^{-2 x^2}\right) dx \\ &= -\frac{1}{4}x e^{-2 x^2}|_{-\infty}^\infty+\frac{1}{4} \int_{-\infty}^\infty e^{-2x^2}dx \end{align*}

Last edited: May 19, 2010
11. May 19, 2010

### ibmichuco

I take that by the parenthesis, you define $$u=x$$ and $$dv=xe^{-2x^2}$$? But wouldn't this give $$v=0$$ with $$xe^{-2x^2}$$ being an odd function?

Sorry, I am particularly densed today

12. May 19, 2010

### Cyosis

Why would v be zero? The primitive of an odd function is not zero. Example: according to you $\int xdx=0$, yet $\int x dx= 1/2 x^2$, which I am sure you know.

13. May 19, 2010

### ibmichuco

I am thinking of
$$\begin{equation*} v = \int_{-\infty}^{\infty} x e^{-2 x^2} d x = 0 \end{equation*}$$

Don't I need the definite integral in this step also?

14. May 19, 2010

### Dickfore

That's because you took the lower bound to be $-\infty$ and the exponential function $e^{2x}$ is infinitely large in that limit.

15. May 20, 2010

### Cyosis

Sure that integral is zero. However that integral never enters in the solution so I am not sure why you're trying to calculate. It has become clear to me now what you did wrong in post #9 as well. You're using the boundary values to determine v. This is wrong, do not plug in the boundary values until you're done integrating. I really suggest you review integration by parts since it seems you don't understand how it works when limits are involved.

Last edited: May 20, 2010
16. May 20, 2010

### ibmichuco

My bad. Most of what I have read indicate that you use the boundary in the integration and I thought that also includes the evaluation of v. Thanks for clearing that out. Can you suggest any particular book that helps in evaluating tough(er) integrals. I am trying eventually integrate

$$\int_{-\infty}^\infty(x-a)^n(x-b)^m e^{\alpha(x-c)^2} dx$$

where $n$ and $m$ are integers. I know the result from Mathematica but would like how to work it out. I tried the simplest one and encountered gamma function.

Again, thanks for you patient explanations

17. May 20, 2010

### cstoos

I got e2x($$\frac{1}{2}$$x3-$$\frac{3}{2}$$x2-3x-3)
Of course, I did it by hand and have not checked for mistakes.

18. May 20, 2010

### Cyosis

Have you solved the previous integrals yet? Also I suggest you check what kind of restrictions you need on all the constants in order to have the integral converge.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook