1
$\begingroup$
Integrate[x^4 E^-x^2, {x, 0, +∞}]

Output:

(3 Sqrt[π])/8

Can someone explain to me the specific calculation process ?

$\endgroup$
6
  • $\begingroup$ Can you clarify what you mean with "calculation process"? You want to know how to solve this specific integral (as with pen and paper)? Or rather how Mathematica solves this integral? $\endgroup$ Commented Jul 28, 2013 at 15:13
  • 1
    $\begingroup$ Possible duplicate: (148) $\endgroup$
    – Mr.Wizard
    Commented Jul 28, 2013 at 15:18
  • $\begingroup$ @ Pinguin Dirk,I want to know how to solve this specific integral (as with pen and paper)? If it can't operate,I would how Mathematica solves this integral. $\endgroup$
    – user8336
    Commented Jul 28, 2013 at 15:20
  • $\begingroup$ If it's just this specific integral, you might substitute $u=x^2$ and bring it to the form of the Gamma-function, and find that the result is $\frac{1}{2} \Gamma\left(\frac{5}{2}\right)$ (for def of Gamma function and numeric results, see en.wikipedia.org/wiki/Gamma_function $\endgroup$ Commented Jul 28, 2013 at 15:55
  • $\begingroup$ @Nikola Dimitrov,“specific calculation process” is a translation error,I would like to ask the question that step by step process of Integrat[x^4 E^-x^2, {x, 0, +∞}]. $\endgroup$
    – user8336
    Commented Jul 29, 2013 at 14:54

1 Answer 1

10
$\begingroup$

For another approach, if you are interested in learning about rule-based integration, you can use Rubi package to find the rules that can be used to evaluate many integrals. This applies for indefinite integrals. For example, using your integral, Rubi shows 3 transformation steps that can be used to obtain the final answer, then you can easily obtain from that, the result you want using limits.

Int[x^4 E^-x^2, x]
-(1/2) E^-x^2 x^3 + Dist[3/2, Int[E^-x^2 x^2, x], x]
-(3/4) E^-x^2 x - 1/2 E^-x^2 x^3 + Dist[3/4, Int[E^-x^2, x], x]
-(3/4) E^-x^2 x - 1/2 E^-x^2 x^3 + 3/8 Sqrt[Pi] Erf[x]

The rule used for each integration step is given by a number, such as rule 1071, rule 1064, etc... in the display between each step. (screen shot below). Then you look up the rule itself at Rubi's web page or from the documentation that comes with the package.

The final answer above can be now be easily used to obtain the definite integral:

r = ((-(3/4))*x)/E^x^2 - ((1/2)*x^3)/E^x^2 + (3/8)*Sqrt[Pi]*Erf[x]; 
Limit[r, x -> Infinity] - r /. x -> 0

Out[26]= (3*Sqrt[Pi])/8

You can download the Rubi Mathematica package from Albert Rich site, the author of the package. The integration transformation rules are here

This is very useful, not only in learning rule-based integration, but very useful for learning about how do integration by hand, since the rules used are those we can use on paper and in school, and one can see the rule itself and learn much more about integration this way.

To do this, obtain the package, and open the rubi notebook, and evaluate it. Now simply use Int instead of Integrate and this will use Rubi. After each step, hit the Enter key again to see the next step. Keep doing that, until the final result is reached and no more transformation is shown, like below. This will be the final result. If you do not want to see each step, but want to see the final result, then issue the command ShowSteps=False, now you will not see the step by step integration process.

(ps. if you really want to learn how Integrate itself works, the best way I can think of is to issue this command Trace[Integrate[x^4 E^-x^2, x], TraceInternal -> True] and try to follow the output ! You can also see the top level code on Integrate using the command

ClearAttributes[Integrate, ReadProtected];
?? Integrate

But it is not very useful. Learning Rubi rules is more useful.

Here is a screen shot of the whole process for Rubi's Int

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ +1 never heard of Rubi before! Thanks for bringing it up :) $\endgroup$
    – Leo Fang
    Commented Jul 28, 2013 at 19:25