Finding Anti-Derivatives - Integration.nb

Finding Anti-Derivatives (a.k.a. Indefinite Integrals)

Computing an anti-derivative uses the command "Integrate"

Integrate[a x^2,  x]

The "x" at the end of the example above tells the software to integrate with respect to "x". Compare to the command below:

Integrate[a x^2,  a]

Note that Mathematica does not include "....+C" at the end, so it just gives you one anti-derivative!

Finding Definite Integrals

If you want to compute a definite integral, include the limits of integration as follows:

Integrate[a x^2,  {x, 0, 3}]

If you prefer a numerical answer (or if Mathematica cannot find the symbolic answer for you), put an "N" up front:

NIntegrate[Sin[x^2], {x, 0, 4 Pi}]

Checking Your Answers

Mathematica does not compute anti-derivatives in exactly the same way you are taught in class; consequently its answers will not always look like yours. How do you check that your answer is correct? One way is to graph Mathematica's answer and yours, and check whether both only differ by a constant.

f[x_] = Integrate[x Log[x^5], x]

Suppose your answer is

g[x_] = 5/2 x^2 Log[x] - 5  x^2/4

Here is the graph of both functions, Mathematica's answer in red, your answer in blue:

\(Plot[{f[x], g[x]}, {x, 0, 5}, 
	
      PlotStyle -> {{AbsoluteThickness[2], RGBColor[1, 0, 0]}, 

          														{AbsoluteThickness[2], 
            RGBColor[0, 0, 1], 
															
            Dashing[{0.04, 0.03}]}}]\)

Remember that it is perfectly okay for the two answers to differ by a constant! So you might want to check their difference instead:

\(Plot[Chop[f[x] - g[x]], {x, 0, 5}, 
	
      PlotStyle -> {{AbsoluteThickness[2], RGBColor[0, 1, 0]}}]\)

A less foolproof method is to check that the derivative of their difference is 0

FullSimplify[f'[x] - g'[x]]

As you see this method can even "fail" in easy examples such as the one above.

Non-Elementary Anti-Derivatives

Not every "nice" function has an "elementary" anti-derivative, i.e., we might not be able to use our standard mathematical symbolism to write down the answer. Here is an example:

Integrate[Exp[Sin[x^3]], x]

Be aware that Mathematica's vocabulary is somewhat enlarged; it gives "answers" to the following integration problems:

Integrate[Exp[-x^2], x]Integrate[Sin[x^3], x]

Etc.

Author: H. Knaust (helmut@math.utep.edu)
Created: August 2000
Last Edits: August 20, 2000