Applic. Of derivatives The straight line $x\cos \alpha + y \sin \alpha = p$ touches the curve $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$. Prove that $a^{2}\cos 2\alpha+b^{2} \sin 2\alpha=p^{2}$
 A: Notice, solving the given equations by setting $y=\frac{p-x\cos \alpha}{\sin\alpha}$ in the equation of the curve: $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$, we get $$\frac{x^2}{a^2}+\frac{\left(\frac{p-x\cos \alpha}{\sin\alpha}\right)^2}{b^2}=1$$ $$b^2x^2\sin^2\alpha+a^2(p-x\cos \alpha)^2=a^2b^2\sin^2\alpha $$
$$(a^2\cos^2\alpha+b^2\sin^2\alpha)x^2-2(a^2p\cos\alpha)x+(a^2p^2-a^2b^2\sin^2\alpha)=0$$
Since, the straight line touches the curve (ellipse), hence the roots of the above quadratic equation should be equal hence the discriminant $\Delta=B^2-4AC=0$
$$(-2a^2p\cos\alpha)^2-4(a^2\cos^2\alpha+b^2\sin^2\alpha)(a^2p^2-a^2b^2\sin^2\alpha)=0$$
$$a^4b^2\sin^2\alpha\cos^2\alpha+a^2b^4\sin^4\alpha-a^2b^2p^2\sin^2\alpha=0$$
 Dividing the equation by $a^2b^2\sin^2\alpha$, we get 
$$a^2\cos^2\alpha+b^2\sin^2\alpha-p^2=0$$ $$\color{red}{a^2\cos^2\alpha+b^2\sin^2\alpha=p^2}$$
A: Hint:
Notice that the slope $m$ of a tangent line to the curve $\displaystyle{\frac{x^2}{a^2}+\frac{y^2}{b^2}=1}$ by a point $(x_0,y_0)$ satisfies
$$m=\frac{dy}{dx}_{(x,y)=(x_0,y_0)}=-\frac{b^2x_0}{a^2y_0}$$
Also, $$x_0\cos \alpha+y_0\sin \alpha=p$$
Now, you can compare the slope of the line $x\cos \alpha+y\sin \alpha=p$ with $m$.
