0

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?

Thomas Andrews
  • 186,215
Clone
  • 315

3 Answers3

5

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

3

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.

Thomas Andrews
  • 186,215
  • Which equivalent answer is considered the most simplified or generally preferred form? – user946772 Aug 19 '21 at 01:30
  • 2
    There isn’t really a preferred answer, as far as I know. I think $x^2/2-x+C$ solution is simpler to derive, and generalizes to all polynomials, but there is an elegance to the substitution method, too, and might even be preferred when integrating something like $(x-1)^3.$ – Thomas Andrews Aug 19 '21 at 01:34
1

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.

bjcolby15
  • 4,210
  • Which equivalent answer (entailing both solutions differing by a constant of integration) is considered the most simplified or generally preferred form? The most expanded vs factorized one? – user946772 Aug 19 '21 at 01:31
  • 1
    Why write $\rightarrow$ when $=$ will do? – Thomas Andrews Aug 19 '21 at 01:35
  • It depends on how much you want it simplified. If you prefer your solution neater, use the first method of substitution and do not expand your solution; otherwise, you can integrate term separately. – bjcolby15 Aug 19 '21 at 01:36
  • 1
    @ThomasAndrews You know, I had that first and then thought arrows would be better, but you're right - equals signs work much better. I've corrected my post. – bjcolby15 Aug 19 '21 at 01:37