# Evaluate the integral \int_0^{\pi/4} ( 4\sin^2 x - \frac{1}{\cos^2 x})\,dx

## Question:

Evaluate the integral

{eq}\int_0^{\pi/4} ( 4\sin^2 x - \frac{1}{\cos^2 x})\,dx {/eq}

## Definite Integrals:

In order to calculate definite integrals it is necessary to first calculate the corresponding indefinite integral. If the integrand contains trigonometric functions, the use of trigonometric identities can be useful. Once the indefinite integral is solved, the fundamental theorem of the calculation is applied.

We need to calculate {eq}\displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx {/eq}

We can write:

{eq}\displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx= \int_0^{\pi/4} \left( 4\sin^2 x - sec^2x\right)\,dx {/eq}

Using the trigonometric identity: {eq}\displaystyle \sin^2x=\frac{1}{2}-\frac{1}{2}\cos(2x) {/eq}

{eq}\displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx=\int_0^{\pi/4} \left[ 4\left(\frac{1}{2}-\frac{1}{2}\cos(2x)\right) - sec^2x\right]\,dx \displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx=\int_0^{\pi/4} \left( 2-2\cos(2x) - sec^2x\right)\,dx {/eq}

Solving the integral:

{eq}\displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx=\left(2x-\sin(2x)-\tan(x)\right)\bigg\vert_0^{\frac{\pi}{4}} {/eq}

Applying the fundamental theorem of calculus:

{eq}\displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx= \left[2(\frac{\pi}{4})-\sin(2*\frac{\pi}{4})-\tan\left(\frac{\pi}{4}\right)\right]-\left[2(0)-\sin(2*0)-\tan\left(0\right)\right]\\ \displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx=\left[\frac{\pi}{2}-\sin\left(\frac{\pi}{2}\right)-1\right]-(0-\sin(0)-0)\\ \displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx=\left(\frac{\pi}{2}-1-1\right)-(0-0-0)\\ \displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx=\left(\frac{\pi}{2}-2\right)-0\\ \displaystyle \int_0^{\pi/4} \left( 4\sin^2 x - \frac{1}{\cos^2 x}\right)\,dx= \frac{\pi}{2}-2\\ {/eq}