# How do you simplify f(theta)=sec(theta/4)-tan(theta/2+pi/2) to trigonometric functions of a unit theta?

$f \left(\theta\right) = \left(\frac{1}{2}\right) \left(2 \sec \left(\frac{\theta}{4}\right) + \cot \left(\frac{\theta}{4}\right) - \tan \left(\frac{\theta}{4}\right)\right)$

#### Explanation:

Given:
$f \left(\theta\right) = \sec \left(\frac{\theta}{4}\right) - \tan \left(\frac{\theta}{2} + \frac{\pi}{2}\right)$
$\tan \left(\frac{\theta}{2} + \frac{\pi}{2}\right) = - \cot \left(\frac{\theta}{2}\right)$

Thus,
$f \left(\theta\right) = \sec \left(\frac{\theta}{4}\right) - \left(- \cot \left(\frac{\theta}{2}\right)\right)$

Simplifying,
$f \left(\theta\right) = \sec \left(\frac{\theta}{4}\right) + \cot \left(\frac{\theta}{2}\right)$
$\frac{\theta}{2} = 2 \frac{\theta}{4}$

Replacing, we get
$f \left(\theta\right) = \sec \left(\frac{\theta}{4}\right) + \cot \left(2 \frac{\theta}{4}\right)$

Further, we know that
$\sec \left(\frac{\theta}{4}\right) = \frac{1}{\cos} \left(\frac{\theta}{4}\right)$

and
$\cot \left(2 \frac{\theta}{4}\right) = \cos \frac{2 \frac{\theta}{4}}{\sin} \left(2 \frac{\theta}{4}\right)$

Substituting the same,
$f \left(\theta\right) = \frac{1}{\cos} \left(\frac{\theta}{4}\right) + \cos \frac{2 \frac{\theta}{4}}{\sin} \left(2 \frac{\theta}{4}\right)$
$\cos \left(2 \frac{\theta}{4}\right) = {\cos}^{2} \left(\frac{\theta}{4}\right) - {\sin}^{2} \left(\frac{\theta}{4}\right)$
$\sin \left(2 \frac{\theta}{4}\right) = 2 \sin \left(\frac{\theta}{4}\right) \cos \left(\frac{\theta}{4}\right)$

Now,
f(theta)=1/cos(theta/4)+(cos^2(theta/4) - sin^2 (theta/4))/(2sin(theta/4)cos(theta/4)

=1/cos(theta/4)+cos^2(theta/4)/(2sin(theta/4)cos(theta/4))-sin^2 (theta/4)/(2sin(theta/4)cos(theta/4)
$\frac{1}{\cos} \left(\frac{\theta}{4}\right) = \sec \left(\frac{\theta}{4}\right)$
${\cos}^{2} \frac{\frac{\theta}{4}}{2 \sin \left(\frac{\theta}{4}\right) \cos \left(\frac{\theta}{4}\right)} = \left(\frac{1}{2}\right) \cot \left(\frac{\theta}{4}\right)$
${\sin}^{2} \frac{\frac{\theta}{4}}{2 \sin \left(\frac{\theta}{4}\right) \cos \left(\frac{\theta}{4}\right)} = \left(\frac{1}{2}\right) \tan \left(\frac{\theta}{4}\right)$
Then,
$\frac{1}{\cos} \left(\frac{\theta}{4}\right) + {\cos}^{2} \frac{\frac{\theta}{4}}{2 \sin \left(\frac{\theta}{4}\right) \cos \left(\frac{\theta}{4}\right)} - {\sin}^{2} \frac{\frac{\theta}{4}}{2 \sin \left(\frac{\theta}{4}\right) \cos \left(\frac{\theta}{4}\right)} =$
$\sec \left(\frac{\theta}{4}\right) + \left(\frac{1}{2}\right) \cot \left(\frac{\theta}{4}\right) - \left(\frac{1}{2}\right) \tan \left(\frac{\theta}{4}\right)$
Taking $\frac{1}{2}$ common in all the terms, we have
$f \left(\theta\right) = \left(\frac{1}{2}\right) \left(2 \sec \left(\frac{\theta}{4}\right) + \cot \left(\frac{\theta}{4}\right) - \tan \left(\frac{\theta}{4}\right)\right)$