Indefinite Integrals

The Wolfram Language function (RefLink[Integrate, paclet:ref/Integrate])[f,x] gives you the indefinite integral ∫f dx. You can think of the operation of indefinite integration as being an inverse of differentiation. If you take the result from (RefLink[Integrate, paclet:ref/Integrate])[f,x], 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. (RefLink[Integrate, paclet:ref/Integrate])[f,x] 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.

The Wolfram Language applies standard rules to find indefinite integrals:

Integrate[x^2,x]

You can add an arbitrary constant to the indefinite integral, and still get the same derivative. (RefLink[Integrate, paclet:ref/Integrate]) simply gives you an expression with the required derivative:

D[%+c,x]

This gives the indefinite integral ∫((dx)/((x^2)-1)):

Integrate[1/(x^2-1),x]

Differentiating should give the original function back again:

D[%,x]

You need to manipulate it to get it back into the original form:

Simplify[%]

The (RefLink[Integrate, paclet:ref/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, (RefLink[Integrate, paclet:ref/Integrate]) is like an inverse of the partial differentiation function (RefLink[D, paclet:ref/D]).

The variable a is assumed to be independent of x:

Integrate[a x^2,x]

The integration variable can be any expression that does not involve explicit mathematical operations:

Integrate[x b[x]^2,b[x]]

Another assumption that (RefLink[Integrate, paclet:ref/Integrate]) implicitly makes is that all the symbolic quantities in your integrand have "generic" values. Thus, for example, the Wolfram Language will tell you that ∫(x^n)dx is ((x^(n+1))/(n+1)) even though this is not true in the special case n==-1.

The Wolfram Language gives the standard result for this integral, implicitly assuming that n is not equal to -1:

Integrate[x^n,x]

If you specifically give an exponent of -1, the Wolfram Language produces a different result:

Integrate[x^-1,x]

You should realize that the result for any particular integral can often be written in many different forms. The Wolfram Language 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 (RefLink[ArcTan, paclet:ref/ArcTan]):

Integrate[1/(1+a x^2),x]

This integral is given in terms of (RefLink[ArcTanh, paclet:ref/ArcTanh]):

Integrate[1/(1-b x^2),x]

This is mathematically equal to the first integral, but is given in a somewhat different form:

%/.b->-a

The derivative is still correct:

D[%,x]

Even though they look quite different, both (RefLink[ArcTan, paclet:ref/ArcTan])[x] and -(RefLink[ArcTan, paclet:ref/ArcTan])[1/x] are indefinite integrals of 1/(1+(x^2)):

Simplify[D[{ArcTan[x],-ArcTan[1/x]},x]]

(RefLink[Integrate, paclet:ref/Integrate]) chooses to use the simpler of the two forms:

Integrate[1/(1+x^2),x]