I have a question that requires me to find out the minimum value (length) of a segment of a tangent to the ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ intercepted by the coordinate axes.
This is the diagram,

This is what I have done,
We know that, equation of tangent to ellipse in parametric form is,
$$\frac{x\cos\theta}{a}+\frac{y\sin\theta}{b}=1$$
So, $$\frac{x}{a\sec\theta}+\frac{y}{b\csc\theta}=1$$
So, segment of tangent between coordinate axes = $\sqrt{a^2\sec^2\theta+b^2\csc^2\theta}$
Therefore we need to find the minimum value of $\sqrt{a^2\sec^2\theta+b^2\csc^2\theta}$. How do I do that?
$$a^2\sec^2\theta+b^2\csc^2\theta= a^2(1+\tan^2\theta)+b^2(1+\cot^2\theta)$$ $$=a^2+b^2+ (a\tan\theta-b\cot\theta)^2+2ab\ge a^2+b^2+2ab$$
The equality i.e., the minimum length occurs if $a\tan\theta-b\cot\theta=0\iff \tan^2\theta=\frac ba$