Answer
a) $$\int^{\pi/4}_0\tan x\sec^2xdx=\frac{1}{2}$$
b) $$\int_{-\pi/4}^0\tan x\sec^2xdx=-\frac{1}{2}$$
Work Step by Step
Part a) $$A=\int^{\pi/4}_0\tan x\sec^2xdx$$
Set $u=\tan x$, we then have $$du=\sec^2xdx$$
For $x=0$, we have $u=0$ and for $x=\pi/4$, we have $u=1$.
Therefore, $$A=\int^1_0udu$$ $$A=\frac{u^2}{2}\Big]^1_0$$ $$A=\frac{1}{2}(1^2-0^2)=\frac{1}{2}$$
Part b) $$A=\int_{-\pi/4}^0\tan x\sec^2xdx$$
We carry out a similar substitution as in part a).
For $x=0$, we have $u=0$ and for $x=-\pi/4$, we have $u=-1$.
Therefore, $$A=\int^0_{-1}udu$$ $$A=\frac{u^2}{2}\Big]^0_{-1}$$ $$A=\frac{1}{2}(0^2-1^2)=\frac{1}{2}(-1)=-\frac{1}{2}$$