# Definite integral problem.

I am stuck on this one:

$$\int_0^{\frac{\pi}{4}} \frac{1 - \cos^2{\theta}}{\cos^{2}{\theta}} d \theta$$

$$= \int_0^{\frac{\pi}{4}} \tan^{2} \theta$$

What is the antiderivative of $\tan^2{\theta}$

Is it this:

Since:

$$\frac{d}{dt} \tan{t} = \sec^2{t} = 1 + \tan{t}$$

then: $$\left [ -t + \tan{t} \right ]_0^{\frac{\pi}{4}}$$

$$= \frac{-\pi}{4} + 1$$

But Wolfram alpha gets this:

Where did I go wrong?

$$\int_0^{\frac{\pi}{4}} \frac{1 - \cos^2{\theta}}{\cos^{2}{\theta}} d \theta = \int_0^{\frac{\pi}{4}} sec^2\theta d\theta - \int_0^ {\frac{\pi}{4}} 1 d\theta = \left[ tan\theta -\theta \right]_0^ {\frac{\pi}{4}}$$
$$\frac{d}{dt}\tan t=\sec^2t=1+\tan^2 t$$ so an antiderivative of $\tan^2t$ is $-t+\tan t$.