Unexpected results when integrating definite integral with variable bounds

177 Views Asked by At

When I plug something like this into Mathematica:

$$\int_0^{x^2-1} k y \, dy$$

I get exactly what I would expect:

$$\frac{k}2 (x^2-1)^2 $$

However, when I change my bounds ever so slightly, from $x^2-1$ to $1-x^2$ I would expect this:

$$\frac{k}2 (1-x^2)^2 $$

But I actually end up with the same as before:

$$\frac{k}2 (x^2-1)^2 $$

I'm at a loss as to what I'm missing. I ran these through WolframAlpha as well and got the same results, so I must be missing some basic rule of integration. For reference, here are the Mathematica commands I'm running:

Integrate[k y, {y, 0, (x^2 - 1)}]
Integrate[k y, {y, 0, (1 - x^2)}]
2

There are 2 best solutions below

4
On BEST ANSWER

Rewrite $(x^2-1)^2$ as $((-1)(1-x^2))^2$ to convince you it's the same.

0
On

The two are the same since $(-x)^2 = x^2$.