This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 MATHEMATICA TUTORIAL

# Indefinite Integrals

The Mathematica function Integrate gives you the indefinite integral . You can think of the operation of indefinite integration as being an inverse of differentiation. If you take the result from Integrate, and then differentiate it, you always get a result that is mathematically equal to the original expression f.
In general, however, there is a whole family of results which have the property that their derivative is f. Integrate gives you an expression whose derivative is f. You can get other expressions by adding an arbitrary constant of integration, or indeed by adding any function that is constant except at discrete points.
If you fill in explicit limits for your integral, any such constants of integration must cancel out. But even though the indefinite integral can have arbitrary constants added, it is still often very convenient to manipulate it without filling in the limits.
Mathematica applies standard rules to find indefinite integrals.
 Out[1]=
You can add an arbitrary constant to the indefinite integral, and still get the same derivative. Integrate simply gives you an expression with the required derivative.
 Out[2]=
This gives the indefinite integral .
 Out[3]=
Differentiating should give the original function back again.
 Out[4]=
You need to manipulate it to get it back into the original form.
 Out[5]=
The Integrate function assumes that any object that does not explicitly contain the integration variable is independent of it, and can be treated as a constant. As a result, Integrate is like an inverse of the partial differentiation function D.
The variable is assumed to be independent of .
 Out[6]=
The integration variable can be any expression that does not involve explicit mathematical operations.
 Out[7]=
Another assumption that Integrate implicitly makes is that all the symbolic quantities in your integrand have "generic" values. Thus, for example, Mathematica will tell you that is even though this is not true in the special case .
Mathematica gives the standard result for this integral, implicitly assuming that is not equal to .
 Out[8]=
If you specifically give an exponent of , Mathematica produces a different result.
 Out[9]=
You should realize that the result for any particular integral can often be written in many different forms. Mathematica tries to give you the most convenient form, following principles such as avoiding explicit complex numbers unless your input already contains them.
This integral is given in terms of ArcTan.
 Out[10]=
This integral is given in terms of ArcTanh.
 Out[11]=
This is mathematically equal to the first integral, but is given in a somewhat different form.
 Out[12]=
The derivative is still correct.
 Out[13]=
Even though they look quite different, both ArcTan and -ArcTan[1/x] are indefinite integrals of .
 Out[14]=
Integrate chooses to use the simpler of the two forms.
 Out[15]=