If $(\sec \theta+\tan \theta)=p$ then show that $(\sec \theta-\tan \theta)=\frac{1}{p}$.
Hence, show that $\cos \theta=\frac{2 p}{\left(p^{2}+1\right)}$ and $\sin \theta=\frac{p^{2}-1}{p^{2}+1}$.
Given: $\sec \theta+\tan \theta=p \quad \ldots$ (1)
We know
$\sec ^{2} \theta-\tan ^{2} \theta=1$
$\Rightarrow(\sec \theta-\tan \theta)(\sec \theta+\tan \theta)=1$
$\Rightarrow(\sec \theta-\tan \theta) p=1 \quad[$ From $(1)]$
$\Rightarrow \sec \theta-\tan \theta=\frac{1}{p} \quad \ldots \ldots(2)$
Adding (1) and (2), we get
$\sec \theta+\tan \theta+\sec \theta-\tan \theta=p+\frac{1}{p}$
$\Rightarrow 2 \sec \theta=\frac{p^{2}+1}{p}$
$\Rightarrow \sec \theta=\frac{p^{2}+1}{2 p}$
$\Rightarrow \frac{1}{\sec \theta}=\frac{2 p}{p^{2}+1}$
$\Rightarrow \cos \theta=\frac{2 p}{p^{2}+1} \quad \ldots \ldots(3)$
Subtracting (2) from (1), we get
$\sec \theta+\tan \theta-\sec \theta+\tan \theta=p-\frac{1}{p}$
$\Rightarrow 2 \tan \theta=\frac{p^{2}-1}{p}$
$\Rightarrow \tan \theta=\frac{p^{2}-1}{2 p} \quad \ldots \ldots(4)$
Now,
$\sin \theta=\tan \theta \times \cos \theta$
$\Rightarrow \sin \theta=\frac{p^{2}-1}{2 p} \times \frac{2 p}{p^{2}+1} \quad[$ Using $(3)$ and $(4)]$+
$\Rightarrow \sin \theta=\frac{p^{2}-1}{p^{2}+1}$