# Evaluate the integral \int_0^{\pi/4} \sec^2 x (4 + \sin x) \,dx

## Question:

Evaluate the integral

{eq}\int_0^{\pi/4} \sec^2 x (4 + \sin x) \,dx {/eq}

## Definite Integrals:

When calculating precisely defined integrals is required, the corresponding indefinite integral must first be resolved, taking into account that if there are trigonometric functions in the integrand, the use of trigonometric identities may be useful. Once the indefinite integral is solved, the evaluation is carried out using the fundamental theorem of calculus.

We need to calculate {eq}\displaystyle \int_0^{\pi/4} \sec^2 x (4 + \sin x) \,dx {/eq}

Knowing that {eq}\displaystyle \sec^2 x*\sin x=\frac{1}{\cos^2x}\sin x=\frac{1}{\cos x}\frac{\sin x}{\cos x}=\sec x\tan x {/eq}, we can write:

{eq}\displaystyle \int_0^{\pi/4} \sec^2 x (4 + \sin x) \,dx=\int_0^{\pi/4} 4\sec^2 x + \sec x \tan x) \,dx {/eq}

Solving the integral:

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

Applying the fundamental theorem of calculus:

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