As we know sec2θ−tan2θ=1,
then,(secθ−tanθ)(secθ+tanθ)=1
secθ−tanθ=1secθ+tanθ
secθ−tanθ=1p........................(1)
secθ+tanθ=p.......................................(2)
Add equation (1) and (2),
secθ=12(p2+1p)
Subtract equation (1) and (2),
tanθ=12(p2−1p)
From the values of secθ and tanθ,
sinθ=p2−1p2+1