Constant of integration

From HandWiki
Short description: Constant expressing ambiguity from indefinite integrals

In calculus, the constant of integration, often denoted by [math]\displaystyle{ C }[/math] (or [math]\displaystyle{ c }[/math]), is a constant term added to an antiderivative of a function [math]\displaystyle{ f(x) }[/math] to indicate that the indefinite integral of [math]\displaystyle{ f(x) }[/math] (i.e., the set of all antiderivatives of [math]\displaystyle{ f(x) }[/math]), on a connected domain, is only defined up to an additive constant.[1][2][3] This constant expresses an ambiguity inherent in the construction of antiderivatives.

More specifically, if a function [math]\displaystyle{ f(x) }[/math] is defined on an interval, and [math]\displaystyle{ F(x) }[/math] is an antiderivative of [math]\displaystyle{ f(x), }[/math] then the set of all antiderivatives of [math]\displaystyle{ f(x) }[/math] is given by the functions [math]\displaystyle{ F(x) + C, }[/math] where [math]\displaystyle{ C }[/math] is an arbitrary constant (meaning that any value of [math]\displaystyle{ C }[/math] would make [math]\displaystyle{ F(x) + C }[/math] a valid antiderivative). For that reason, the indefinite integral is often written as [math]\displaystyle{ \int f(x) \, dx = F(x) + C, }[/math][4] although the constant of integration might be sometimes omitted in lists of integrals for simplicity.


The derivative of any constant function is zero. Once one has found one antiderivative [math]\displaystyle{ F(x) }[/math] for a function [math]\displaystyle{ f(x), }[/math] adding or subtracting any constant [math]\displaystyle{ C }[/math] will give us another antiderivative, because [math]\displaystyle{ \frac{d}{dx}(F(x) + C) = \frac{d}{dx}F(x) + \frac{d}{dx}C = F'(x) = f(x) . }[/math] The constant is a way of expressing that every function with at least one antiderivative will have an infinite number of them.

Let [math]\displaystyle{ F:\R\to\R }[/math] and [math]\displaystyle{ G:\R\to\R }[/math] be two everywhere differentiable functions. Suppose that [math]\displaystyle{ F\,'(x) = G\,'(x) }[/math] for every real number x. Then there exists a real number [math]\displaystyle{ C }[/math] such that [math]\displaystyle{ F(x) - G(x) = C }[/math] for every real number x.

To prove this, notice that [math]\displaystyle{ [F(x) - G(x)]' = 0 . }[/math] So [math]\displaystyle{ F }[/math] can be replaced by [math]\displaystyle{ F-G, }[/math] and [math]\displaystyle{ G }[/math] by the constant function [math]\displaystyle{ 0, }[/math] making the goal to prove that an everywhere differentiable function whose derivative is always zero must be constant:

Choose a real number [math]\displaystyle{ a, }[/math] and let [math]\displaystyle{ C = F(a) . }[/math] For any x, the fundamental theorem of calculus, together with the assumption that the derivative of [math]\displaystyle{ F }[/math] vanishes, implying that

[math]\displaystyle{ \begin{align} & 0= \int_a^x F'(t)\,dt\\ & 0= F(x)-F(a) \\ & 0= F(x)-C \\ & F(x)=C \\ \end{align} }[/math]

thereby showing that [math]\displaystyle{ F }[/math] is a constant function.

Two facts are crucial in this proof. First, the real line is connected. If the real line were not connected, we would not always be able to integrate from our fixed a to any given x. For example, if we were to ask for functions defined on the union of intervals [0,1] and [2,3], and if a were 0, then it would not be possible to integrate from 0 to 3, because the function is not defined between 1 and 2. Here, there will be two constants, one for each connected component of the domain. In general, by replacing constants with locally constant functions, we can extend this theorem to disconnected domains. For example, there are two constants of integration for [math]\displaystyle{ \int dx/x, }[/math] and infinitely many for [math]\displaystyle{ \int \tan x\,dx, }[/math] so for example, the general form for the integral of 1/x is:[5][6]

[math]\displaystyle{ \int \frac{dx}{x} = \begin{cases} \ln \left|x \right| + C^- & x \lt 0\\ \ln \left|x \right| + C^+ & x \gt 0 \end{cases} }[/math]

Second, [math]\displaystyle{ F }[/math] and [math]\displaystyle{ G }[/math] were assumed to be everywhere differentiable. If [math]\displaystyle{ F }[/math] and [math]\displaystyle{ G }[/math] are not differentiable at even one point, then the theorem might fail. As an example, let [math]\displaystyle{ F(x) }[/math] be the Heaviside step function, which is zero for negative values of x and one for non-negative values of x, and let [math]\displaystyle{ G(x) = 0 . }[/math] Then the derivative of [math]\displaystyle{ F }[/math] is zero where it is defined, and the derivative of [math]\displaystyle{ G }[/math] is always zero. Yet it's clear that [math]\displaystyle{ F }[/math] and [math]\displaystyle{ G }[/math] do not differ by a constant, even if it is assumed that [math]\displaystyle{ F }[/math] and [math]\displaystyle{ G }[/math] are everywhere continuous and almost everywhere differentiable the theorem still fails. As an example, take [math]\displaystyle{ F }[/math] to be the Cantor function and again let [math]\displaystyle{ G = 0 . }[/math]

For example, suppose one wants to find antiderivatives of [math]\displaystyle{ \cos(x) . }[/math] One such antiderivative is [math]\displaystyle{ \sin(x) . }[/math] Another one is [math]\displaystyle{ \sin(x) +1 . }[/math] A third is [math]\displaystyle{ \sin(x)-\pi . }[/math] Each of these has derivative [math]\displaystyle{ \cos(x), }[/math] so they are all antiderivatives of [math]\displaystyle{ \cos(x) . }[/math]

It turns out that adding and subtracting constants is the only flexibility we have in finding different antiderivatives of the same function. That is, all antiderivatives are the same up to a constant. To express this fact for [math]\displaystyle{ \cos(x), }[/math] we write: [math]\displaystyle{ \int \cos(x)\,dx = \sin(x) + C. }[/math] Replacing [math]\displaystyle{ C }[/math] by a number will produce an antiderivative. By writing [math]\displaystyle{ C }[/math] instead of a number, however, a compact description of all the possible antiderivatives of [math]\displaystyle{ \cos(x) }[/math] is obtained. [math]\displaystyle{ C }[/math] is called the constant of integration. It is easily determined that all of these functions are indeed antiderivatives of [math]\displaystyle{ \cos(x) }[/math]: [math]\displaystyle{ \begin{align} \frac{d}{dx}[\sin(x) + C] &= \frac{d}{dx} \sin(x) + \frac{d}{dx}C \\ &= \cos(x) + 0 \\ &= \cos(x) \end{align} }[/math]


At first glance, it may seem that the constant is unnecessary, since it can be set to zero. Furthermore, when evaluating definite integrals using the fundamental theorem of calculus, the constant will always cancel with itself.

However, trying to set the constant to zero does not always make sense. For example, [math]\displaystyle{ 2\sin(x)\cos(x) }[/math] can be integrated in at least three different ways:

[math]\displaystyle{ \begin{alignat}{4} \int 2\sin(x)\cos(x)\,dx =&& \sin^2(x) + C =&& -\cos^2(x) + 1 + C =&& -\frac 1 2 \cos(2x) + \frac 1 2 + C\\ \int 2\sin(x)\cos(x)\,dx =&& -\cos^2(x) + C =&& \sin^2(x) - 1 + C =&& -\frac 1 2 \cos(2x) - \frac 1 2 + C\\ \int 2\sin(x)\cos(x)\,dx =&& -\frac 1 2 \cos(2x) + C =&& \sin^2(x) + C =&& -\cos^2(x) + C \\ \end{alignat} }[/math]

So setting [math]\displaystyle{ C }[/math] to zero can still leave a constant. This means that, for a given function, there is not necessarily any "simplest antiderivative".

Another problem with setting [math]\displaystyle{ C }[/math] equal to zero is that sometimes we want to find an antiderivative that has a given value at a given point (as in an initial value problem). For example, to obtain the antiderivative of [math]\displaystyle{ \cos(x) }[/math] that has the value 100 at x = π, then only one value of [math]\displaystyle{ C }[/math] will work (in this case [math]\displaystyle{ C = 100 }[/math]).

This restriction can be rephrased in the language of differential equations. Finding an indefinite integral of a function [math]\displaystyle{ f(x) }[/math] is the same as solving the differential equation [math]\displaystyle{ \frac{dy}{dx} = f(x) . }[/math] Any differential equation will have many solutions, and each constant represents the unique solution of a well-posed initial value problem. Imposing the condition that our antiderivative takes the value 100 at x = π is an initial condition. Each initial condition corresponds to one and only one value of [math]\displaystyle{ C, }[/math] so without [math]\displaystyle{ C }[/math] it would be impossible to solve the problem.

There is another justification, coming from abstract algebra. The space of all (suitable) real-valued functions on the real numbers is a vector space, and the differential operator [math]\displaystyle{ \frac{d}{dx} }[/math] is a linear operator. The operator [math]\displaystyle{ \frac{d}{dx} }[/math] maps a function to zero if and only if that function is constant. Consequently, the kernel of [math]\displaystyle{ \frac{d}{dx} }[/math] is the space of all constant functions. The process of indefinite integration amounts to finding a pre-image of a given function. There is no canonical pre-image for a given function, but the set of all such pre-images forms a coset. Choosing a constant is the same as choosing an element of the coset. In this context, solving an initial value problem is interpreted as lying in the hyperplane given by the initial conditions.