# $\int(x+1)dx$ yielding different results with $u$-substitution and termwise integration

Considering two methods of integrating the very easy:

$\int(x+1)dx$

First just going term by term: $\int(x+1)dx = x^2/2 + x + C$

Or by making a u-subtitution. Let $u = x+1$, then $du = dx$ and the integral becomes

$\int u du = u^2/2$ = $\frac {(x+1)^2}{2} + C$, which is not the same. Where have I gone wrong?

• Nowhere, the anti derivatives just differ by a constant May 30, 2018 at 2:23
• This happens when you mix out an integral with a primitive function, here we have a definite integral with start and end coordinates, mathematical rigour notes that if you do variable substitution you do never forget to substitute interval values of this integral May 30, 2018 at 5:59

They are equivalent, they differ by a constant.

Change your second $C$ to $D$ and we have $C=\frac12 +D$.

The two results differ by a constant, which is zero when differentiated.$$\frac 12(x+1)^2=\frac 12x^2+x+\color{red}{\frac 12}=\frac 12x^2+x+\color{red}{C}$$

In fact, generally when you're evaluating an indefinite integral and you get two different results, most of the time, they're both valuable answers because they differ by a constant and not because you messed up in your work.

Of course, you can still make a mistake when evaluating indefinite integrals. I'm just saying, most of the time, it's the constant that changes the result and not your "error" you made.

Note that $F^{\prime}(x)=f(x)$ and $G^{\prime}(x)=f(x),$ then $F(x)=G(x)+C$

By Mean Value Theorem:-

If $F^{\prime}=G^{\prime}$ then $(F-G)^{\prime}=F^{\prime}-G^{\prime}=f-f=0$

Note that if a function's derivative is zero then it's a constant. So, $G(x)-F(x)=c$. $G(x)=F(x)+C$

This was a potential mutating comment, I drove it here to clear away any obscurity.

The thing is, for sake of reserving all the integrity of an integral, and for matter of its difference from a primitive function, you aren't allowed to remove start and ending coordinates, otherwise you are going to lose important informations that are crucially required to complete its formal identity.

See here in the example you provided: $\int_b^a (x+1)dx$ = by substituting variables you got $u=x+1$ where you blatantly forgot to substitute the interval coordinates too, for any $x_1=a$ and $x_2=b$, $u$ lays from $a+1$ to $b+1$, so the integral becomes like this $\int_{b+1}^{a+1} udu$ when you calculate it everything gets cleared.

From the graph we see clearly the similtitude between shaded spaces with $a=0$ and $b=0$ .

It is clear the difference at the same range [0,1] of both curves.

Here another example showing why the range of definite integral is important, take $f=x^2$ then $\int^2_0 x^2dx$ by sustituting values would be equal to $\int^4_0 \frac{\sqrt{u}}{2}du$ with $u=x^2$, from the graph figuring below ,it's neither visually nor analytically noticeable that the areas are comparable within the same range, but if we delate one range by squaring it, the similarity can be visibly noticeable.

Let's calculate the primitives now, $\int x^2dx=\frac{1}{3}x^{3}+c$, then we substitue variables, we get $\int \frac{\sqrt{u}}{2}=\frac{1}{3}x^{3/2}+c$, wait ... both integrals come from same orgin but they are different by a non-constant ? this is what happens when you ignore the starting and ending coordinates.

Briefly saying, these precedent informations qualify the difference between a definite integral, and an indifinite integral where the constant value $C$ does not always indicate a differnece.