WolframAlpha can give step by step solution for indefinite integral. There seems to be similar question but for derivatives. Is there a way that I can generate my own step by step solution for indefinite integrals (for simple integrals having closed form)?
1 Answers
RUBI, the RUle-Based Integrator package, does what you want.
You can download a copy of the rules to use with Mathematica at this link: http://www.apmaths.uwo.ca/~arich/. Follow the instructions to install and make sure that you select the option to "Show Steps". The package's Int command performs indefinite integration and will also show the substitution rules it used to get to the final result.
Suppose for instance that you want to obtain the antiderivative from $\int{x^2 \sin{x} \ \text{d} x}$. Using RUBI's Int command:
Int[x^2 Sin[x], x]

This has applied one of the rules in RUBI's rule base to simplify the integral. The intermediate results can be simplified further by evaluating them in turn:
-x^2 Cos[x] + Dist[2, Int[x Cos[x], x], x]

-x^2 Cos[x] + 2 x Sin[x] - Dist[2, Int[Sin[x], x], x]

Once further evaluations do not change the expression any more, the last output is the antiderivative we sought.
- 67,153
- 18
- 91
- 189
easily realize the code. – Vahagn Poghosyan Sep 20 '13 at 21:02