# Why is there a constant of integration?

$\int (2x^2 +1)dx = \dfrac{2}{3}x^3 + x +C$.

This is a simple integral, and as you all know, the answer to an integral will always have a '$+C$' at the end, the constant of integration.

Why is it there?

-
The derivative only tells you about the change that occurred. So, if you integrate the derivative, you will accumulate the entire change that occurred over the range of integration. However, it doesn't tell you where you started, hence $C$ is a generic 'starting point'. – copper.hat Jan 13 '13 at 22:00

## 7 Answers

One way to look at it is that an indefinite integral $\int f$ asks for a solution to the differential equation $F'(x)=f(x)$. That is, the function $f(x)$ is given and you are looking for a function $F(x)$ such that $F'(x)=f(x)$. Now, it may be that a solution does not exist but if a solution does exist, say $G(x)$ is found such that $G'(X)=f(x)$ then for any constant $C$, the function $G(x)+c$ is also a solution (just compute the derivative to see that).

So the existence of a single solution implies the existence of infinitely many solutions. There is no particular reason to prefer one over the other so we indicate the entire family of solution by the (magical) '+C'.

It should be noted that any two solutions of $F'(x)=f(x)$ differ by a constant (to prove that consider the difference between two such solutions, and take the derivative) so that writing the (family of) solutions as $F(x) + C$ very precisely gives all of the solutions.

-
This is for a differential equation on an interval. If it were on disjoint intervals the most general solution needs a potentially different constant for each interval. For instance, strictly speaking the antiderivative of $1/x$ is $\ln|x|+C_1$ for $x > 0$ and $\ln|x| + C_2$ for $x < 0$, where $C_1$ and $C_2$ are constants (not necessarily the same). – KCd Jan 14 '13 at 4:17

In addition to the answers given above (with which I concur), here's another, equivalent, though slightly different way to look at it.

The fundamental theorem of calculus tells you how to calculate the indefinite integral of a function in terms of the regular definite integral: you fix a point $a$ and integrate up to the point $x$. That is, using standard methods of evaluating integrals (using the fundamental theorem again, or approximating it numerically, or however you wish to solve them) $$\int_a^x f(t)dt = F(x)-F(a).$$

However, here you immediately see that our arbitrary choice of $a$ is manifestly present in the end result of the indefinite integral. Since $a$ is just some number, $F(a)$ is also just an arbitrary constant. In that sense, you could see the integration constant as a relic of choosing an arbitrary basis point in your definition of the indefinite integral.

-

$F'(x) = f(x)$ iff $(F + \mathrm{const}_C)'(x) = f(x)$. Also, if $F'(x) - G'(x) = 0$, then $F(x) - G(x) = \mathrm{const}$. Thus, if a function has an antiderivative, then the set of antiderivatives of a given function are exactly $\{F(x) + C \ \vert \ C \in \mathbb{R}\}$, where $F$ is one of the antiderivatives.

-

Differentiating a constant always gives 0, so a primitive is always defined up to a constant. Said differently, for any value of C, differentiating F + constant will give you back the same f for any C.

-

We usually find the integral of a function $f(x)$ by finding a function $F(x)$ such that $F'(x) = f(x)$. For example, if our function is $f(x) = x^2$ we quickly know that the function $F(x) = x^3/3$ has derivative equal to $f(x)$. However, $F(x) = x^3/3 + 5$ and $F(x) = x^3/3 - \pi$ also have derivative equal to $f(x)$.

The "$+C$" is there because the function $F(x)$ is not a unique answer to the question we posed. By adding the general "$+C$", we can formally write down what the entire class of solutions looks like.

-

The argument: differentiation operator maps k-vectors to (k-1) vectors, effectively discarding one piece of information.

In principle, the derivative operator maps a (k+1)-dimensional linear space $P$ into a k-dimensional linear space $\dot P$. Seen in this way, the derivative operator has an inverse only if some extra condition (typically a boundary condition) is specified.

You can make it bold: This quote answers everything.

I understood it like the $k \times (k-1)$ matrix (here is 4-dim x $\mapsto$ 3-dim $\dot x$ example)

$$\dot x = \begin{bmatrix} \dot x_1 \\ \dot x_2 \\ \dot x_3 \end{bmatrix}= \begin{bmatrix} -1 & 1 & 0 & 0 \\ 0 & -1 & 1 & 0 \\ 0 & 0 & -1 & 1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = \begin{bmatrix} x_2-x_1 \\ x_3-x_2 \\ x_4 - x_3 \end{bmatrix}.$$

I tried to recover the original vector by applying the inverse, inegration, operator $$x = \begin{bmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} x_2-x_1 \\ x_3-x_2 \\ x_4 - x_3 \end{bmatrix} = \begin{bmatrix} x_2-x_1 \\ x_3-x_1 \\ x_4 - x_1 \end{bmatrix}.$$

It feels like the first element must be $x_1 - x_1$ to recover to 4-dim vector. Yet, we get $[x_1-x_1,x_2-x_1,x_3-x_1,x_4-x_1]^T$. Another problem is that the accumulation starts with $x_1-x_1=0$. This corresponds to the case of $const_C = 0$. Yet, the constant of integration must be $x_1$ to recover to the true original $[x_1,x_2,x_3,x_4]^T.$

The author also depicts the point graphically

You see that differentiation produces a dot from every two neighbor points and you get one point less in result. The leftmost and rightmost blue dots do not have the leftmost and rightmost neigbours to produce a difference. That is why we have the bolded quote, I suppose. Now, integration comes. You need to restore $x$ from $\dot x$. But, you have one point of information missing. This "extra condition (typically a boundary condition)" is the "constant of integration" exactly, if I got the Albert Tarantola right.

However, this interpretation did not survive for long in the Wikipedia. An expert has destroyed it on the basis that you cannot think of size variations regarding the infinite-dimensions. I am left puzzeled if it is A.Tarntola error or what is the mistake especially after the same expert says that this argument is exposed correctly in the derivative-atntiderivative treatment. So, I could not understand what is wrong with this argument. But

I like the people to know that the constant of integration is a single (real) number lost when we differentiated a (infinite-dimensional) vector/function.

-
Tarantola is talking about the finite difference operator, which is a discretized approximation of the derivative. This question, and the Wikipedia article, are about the original (continuous) derivative and integral. – Rahul Sep 24 '13 at 9:56
Yes, I understand that not always we can extend our finite intuition to infinity. But does it make this particular rationale wrong? IMO, the fact that we still loose one number in the infinite differetiation does prove that this rationale still applies not only to arbitrary-length vectors but even to the continuum. – Val Sep 24 '13 at 10:07

There are some extremely complicated answers here that are probably going to confuse the person asking the question (since it appears they have only just learned what integration is!).

Basically you were probably told by your teacher or by a book that differentiation and integration are inverses to each other. That is not quite true. When differentiating you lose information on what the original function was.

e.g. if we differentiate $x^2$ and $x^2 + 49730871208730750$ we get the same thing. This is due to the fact that the graphs "look the same" but one is a vertically shifted version of the other.

The derivative tells you the gradient of a curve at various points where it is defined. Intuitively you can see how this explains the behaviour above.

When integrating we are trying to "undo" the derivative to get one single function back...but which vertical shifting should we choose?

The answer is: It is impossible to know which one you started with. The best we can do is to say the answer is something with an ambiguity for the information that was lost, i.e. upto a constant $C$.

-