Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know the whole purpose of adding a constant termed constant of integration everytime we integrate an indefinite integral $\int f(x)dx$. I am aware that this constant "goes away" when evaluating definite integral $\int_{a}^{b}f(x)dx $. What has that constant have to do with anything? Why is it termed as the constant of integration? Where does it come from?

The motivation for asking this question actually comes from solving a differential equation $$x \frac{dy}{dx} = 5x^3 + 4$$ By separation of $dy$ and $dx$ and integrating both sides, $$\int dy = \int\left(5x^2 + \frac{4}{x}\right)dx$$ yields $$y = \frac{5x^3}{3} + 4 \ln(x) + C .$$

I've understood that $\int dy$ represents adding infinitesimal quantity of $dy$'s yielding $y$ but I'am doubtful about the arbitrary constant $C$.

share|cite|improve this question
Integral is set of antiderivatives, and no antiderivative is distinguished. See for what happens if you try to forget about it. – sdcvvc Dec 26 '11 at 18:26
If I asked you to solve $x^2 = 4$, and you determined that $2$ was a square root of $4$, why would you bother writing the solution as $\pm 2$? The answer to your question is the same as the answer to my question. – Hurkyl Dec 26 '11 at 18:27
What's most important, I think, is to know how to answer simple questions like: Find all the antiderivatives of $1/x$ over $\mathbb R\setminus\{0\}$. – Pierre-Yves Gaillard Dec 26 '11 at 18:29
"I've understood that ∫dy represents adding infinitesimal quantity of dy's yielding y" -- this is not correct. – user16697 Dec 26 '11 at 18:35
Check out the Wikipedia atricle on Constant of integration and the section Necessity of the constant. – user2468 Dec 26 '11 at 18:37
up vote 5 down vote accepted

Sometimes you need to know all antiderivatives of a function, rather than just one antiderivative. For example, suppose you're solving the differential equation $$ y'=-4y $$ and there's an initial condition $y(0)=5$. You get $$ \frac{dy}{dx}=-4y $$ $$ \frac{dy}{y} = -4\;dx $$ $$ \int\frac{dy}{y} = \int -4\;dx $$ $$ \log_e y = -4x + C. $$ Here you've added a constant. Then $$ y = e^{-4x+C} =e^{-4x}e^C $$ $$ 5=y(0)= e^{-4\cdot0}e^C = e^C $$ So $$ y=5e^{-4x}. $$

(And sometimes you need only one antiderivative, not all of them. For example, in integration by parts, you may have $dv=\cos x\;dx$, and conclude that $v=\sin x$.)

share|cite|improve this answer

The key concept to note here is that when you differentiate a constant you get 0, this is due to the fact that the slope of the tangent line of a constant function, say $f(x) = 4$, will simply be a horizontal line spanning the x-axis with a slope of zero everywhere.

When you differentiate a particular function that has a constant at the end, say $f(x) = x^2 +2x +4$ to get $f'(x) = 2x +2$, you have no way, given only the derivative $f'(x)$, to recover the "constant information" about the original function.

This is precisely why you have to have a slope field representation of the anti-derivative of a function. When you integrate a particular function, you must add that $+C$ because it says that, the anti-derivative of the function could be one of any of the slope field lines in $\mathbb{R}^2$. The particular value for $C$ collapses it to exactly one of these slope field lines. Here is a graphical representation of a slope field and three particular values of $C$ that draw out the purple functions. The slope field anti-derivative is given by: $$ \int \cos(x) dx = \sin(x) +C$$


The three purple functions drawn out are: $$f(x) = \sin(x) -2$$ $$f(x) = \sin(x) + 0$$ $$f(x) = \sin(x) +2 $$

It may also make more sense when you take a differential equations course, but this should be a sufficient explanation.

share|cite|improve this answer
I aggree.That's why i included a simple differential equation which i solved.i'am sorry.i took a long time to edit. – alok Dec 26 '11 at 18:07
So, is there anything that I can add to my answer that you still have a question about? – Samuel Reid Dec 26 '11 at 18:19
Right.I've just started with differential equations and this slope field is yet to make sense,however i will try to comprehend.By the way which tool do you use to draw slope fields?I'am sure that it'll come in handy when i get there. – alok Dec 26 '11 at 18:31
I got this picture off of a university website, but for any sort of figure drawing, I use Adobe Illustrator CS5 for figures in all of my papers. Another way of thinking of the slope field is that it covers the plane with all of the possible "flow lines of the function", so if you have water running down a stream (think of this as from -x to +x), the water will run along the paths described by the slope field. Values for $C$ correspond to what particular path the function (or the water) is running along. – Samuel Reid Dec 26 '11 at 18:38
What if we have a definite integral? – user104111 Dec 11 '15 at 7:40

The indefinite integral $\int f(x)dx$ is the function $F(x)$ such that $\frac{d}{dx}F(x) = f(x)$. Problem is, there are multiple (in fact infinitely many) such functions $F(x)$. We cannot allow the expression $\int f(x)dx$ to refer to multiple functions, so to get around this we introduce the constant of integration $C$. This fixes things, because though there are infinitely many $F(x)$ such that $\frac{d}{dx}F(x) = f(x)$, if we pick any single such function $F(x)$ then all solutions to $\frac{d}{dx}G(x) = f(x)$ are of the form $G(x) = F(x) + C$ for some value of $C$, while for any value of $C$ the function $F(x)+C$ satisfies $\frac{d}{dx}(F(x)+C) = f(x)$. Hence we say $\int f(x)dx = F(x) + C$.

share|cite|improve this answer

The indefinite integral $\int f(x) dx$ denotes, in this particular context, the set of all primitives of $f(x)$. If you find one primitive, say $F(x)$, then you know all other primitives have the form $F(x) + C$, where $C$ is any constant. This is what we mean when we write $\int f(x) dx = F(x) + C$: the set of all primitives of $f(x)$ is the set of all the functions of the form $F(x) + C$.

share|cite|improve this answer

The indefinite integral $\int f(x)\,dx$ is defined to be the general class of functions whose derivatives are $f(x)$.

Now, given any function $F$ with $F'=f$, it follows that $F+C$ is also an antiderivative of $f$: $$ (F+C)'=F'+C'=F'+0=F'=f. $$ Conversely if $G$ is an antiderivative of $f$, then $G$ has the form $F+C$ for some constant $C$.

That's why we write, for example: $$ \tag{1} \int x^2\,dx={x^3\over 3}+C. $$ The derivative of ${x^3\over 3}+C$ is $x^2$. Moreover if $F'(x)=x^2$, then $F$ must have the form $F(x)={x^3\over3}+C$.

So, the general antiderivative of $f(x)=x^2$ has the form $F(x)={x^3\over3}+C$, and equation (1) is just stating this fact.

The differential equation you are considering has more than one solution. The general solution is as you have, with the arbitrary parameter $C$. It does belong there. Any function of that form will be a solution to the equation.

If you were given an initial value problem where, say, you needed $y(1)=2$, then that constant $C$ could be determined.

share|cite|improve this answer

The "integration constant" $C$ does have the "purpose" to make a seemingly true equation at least halfway true. In fact it is what many people call a "dangling variable", similar to the $i$ and $k$ when we talk about a "matrix $\bigl[a_{ik}\bigr]\ $". As noted in other answers, an indefinite integral is not a function, but an infinite set of functions, any two of them differing by a constant. Writing $\langle F(x)\rangle$ (or similar) instead of $F(x)+C$ for the set of all functions differing from the term $F(x)$ by a constant, one could write, e.g., $$\int (5x -6x^4)\ dx =\langle {5\over2} x^2-{6\over5} x^5\rangle\ ,$$ and the mysterious constant has disappeared.

share|cite|improve this answer

It is simply a special case of the ubiquitous linear principle that the general solution of a nonhomogeneous linear equation is given by adding any particular solution to the general solution of the associated homogeneous equation. Namely, if $\rm\:D\:$ is a linear map then one easily proves

Lemma $\ \ $ If $\rm\ D\:f_1\ =\ g\ $ then $\rm\ D\:f_2\ =\ g\ \iff\ 0\ =\ D\:f_1 - D\:f_2\ =\ D\:(f_1-f_2)$

Therefore $\rm\ D^{-1}(g)\ =\ f_1\ +\ ker\ D\ =\:\: $ particular + homogeneous solution, as in linear algebra.

In particular $\rm\quad\:\: \int g\ =\ f_1\: +\ c,\ $ for $\rm\ c\in ker\ \dfrac{d}{d\:x}\: =\:\: $ constants w.r.t. the derivation $\rm\ D\: =\: \dfrac{d}{d\:x}\:.$

Compare this to $\rm \ x\ =\ 3\ +\ 5\ \mathbb Z\:,\:$ the solution of $\rm\ 2\: x\ \equiv\ 6\pmod{10}\:,\: $ with particular solution $\rm x \equiv 6/2 \equiv 3\:,\: $ and homogeneous: $\rm\ 2\: x\:\equiv 0\pmod{10}\iff 10\:|\:2\:x\iff 5\:|\:x\iff x\in 5\ \mathbb Z\:.$

share|cite|improve this answer

There are many great answers here, but I just wanted to chime in with my favorite example of how things can go awry if one forgets about the constant of integration.

Consider $$\int \sin(2x) dx.$$ We will find antiderivatives in two ways. First, a substitution $u=2x$ yields: $$\int \frac{\sin(u)}{2}du = -\frac{\cos(u)}{2} = -\frac{\cos(2x)}{2}.$$ Second, we use the identity $\sin(2x)=2\sin(x)\cos(x)$ and a substitution $v=\sin(x)$: $$\int \sin(2x)dx = \int 2\sin(x)\cos(x)dx = \int 2vdv =v^2 = \sin^2(x).$$ Thus, we have found two antiderivatives of $\sin(2x)$ that are completely different! Namely $$F(x)=\sin^2(x) \quad \text{and} \quad G(x)=-\frac{\cos(2x)}{2}.$$ Notice that $F(x)=\sin^2(x)\neq -\cos(2x)/2=G(x)$. For instance, $F(0)=\sin^2(0) = 0$ but $G(0)=-\cos(2\cdot 0)/2=-1/2$. So, what happened?

We forgot about the constant of integration, that's what happened. The theory of integration tells us that all antiderivatives differ by a constant. So, if $F(x)$ is an antiderivative, then any other antiderivative $G(x)$ can be expressed as $G(x)=F(x)+C$ for some constant $C$. In particular, our antiderivatives above must differ by a constant. Indeed, the constant $C$ in this case is exactly $C=-\frac{1}{2}$: $$F(x)+C = F(x) - \frac{1}{2} = \sin^2(x)-\frac{1}{2} = \frac{(1-\cos(2x))}{2}-\frac{1}{2} = -\frac{\cos(2x)}{2} = G(x),$$ where we have used the trigonometric identity $\sin^2(x) = (1-\cos(2x))/2.$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.