How do I convert the equation
$$\frac{a^2b^2}{p^2}=a^2+b^2-\frac{1}{u^2}$$
into the following equivalent form?
$$u^2=\frac{\sin^2 \theta}{b^2}+\frac{\cos^2 \theta}{a^2}$$
where $$\frac{1}{p^2}=u^2+\left( \frac{du}{d\theta} \right)^2$$
EDIT:
I have tried and found out
$$\frac{uab}{\sqrt{u^2(a^2+b^2)-1-u^4a^2b^2}}\, du = d\theta$$
How do I integrate and express the result in terms of $\sin \theta$ and $\cos \theta$?
$p$ is the perpendicular distance from $O$ to the tangent line to $C$ at the point in case of pedal equation of a curve. It is converted to $u$ as stated above.