Brainfreeze, can't integrate $x-1$

132 Views Asked by At

If $f(x)=x-1$, I want to find $$ \int (x-1) \ dx $$. I make a variable substitution z = x-1, dx = dz so it becomes $$ \int z \ dz \\ = \frac{z^2}{2} + C $$. If I now substitute back $z=x-1,$ I get: $$ \int x-1 \ dx = \frac{(x-1)^2}{2} + C $$

Now if I do it another way without variable substitution I get: $$ \int x \ dx - \int 1 \ dx = \frac{x^2}{2} - x + C$$

What is going on here since these answers seem different to me? Are they both right but the constans $C$ are different or what am I missing here?

3

There are 3 best solutions below

2
On BEST ANSWER

Both answers are correct.

$$\begin{align}\frac{(x-1)^2}{2}&=\frac{x^2-2x+1}{2}\\ &=\frac{x^2}2-x+\frac{1}{2} \end{align}$$

So your two solutions differ by a constant.

0
On

Both answers are correct. Indefinite integrals are defined up to a constant C.

4
On

First solution: $${\dfrac {(x-1)^2}{2} + C = \dfrac {(x^2-2x+1)}{2}+C = \dfrac {x^2}{2}-x + \dfrac {1}{2}+C}.$$ The $\dfrac {1}{2} +C$ is also constant; thus, both solutions are correct.