How does an integral becoming negative effect limits of integration

calculusintegration

In the following question I am struggling to understand how the limits of integration have be changed. Mainly the reasoning behind this part:

"This gives a sign change
(“dy = −dx”) which we incorporate by changing the order of the limits of integration."

enter image description here

In essence why when f(-y) and g(-y) become negative why can we move 'a' to the top of the integral and why does it become posotive.

Best Answer

We have $x=-a \implies y=a$ and then

$$\int_{-a}^0 f(x) \,dx=\int_{a}^0 f(-y) \cdot(-1)\cdot dy=-\int_{a}^0 f(-y) dy=\int_{0}^a f(-y) dy$$