I have a cubic equation of the form $$x^3-a^2x-b^2=0.$$
It is given that all roots are real, moreover, only one root is positive and the other two are negative. Let the positive root be $\alpha>0$. Can I express $\alpha$ in terms of $a,b$? In the problem $a,b$ are some function of $t$ and I have to differentiate $\alpha$ w.r.t. $t$.
You could express $\alpha$ in terms of $a$ and $b$ using the cubic formula, but the three real roots case is very messy and would not help you.
The trick to the problem is that if $$ x^3 - [a(t)]^2 x - [b(t)]^2 = 0$$ then $$ \frac{d}{dt}\left( x^3 - [a(t)]^2 x - [b(t)]^2 \right) = 0$$ so $$ 3x^2 \frac{dx}{dt} - 2a(t)\frac{da}{dt}x - [a(t)]^2\frac{dx}{dt} - 2b(t) \frac{db}{dt} = 0 $$ So your answer will be
$$\frac{d\alpha}{dt} = 2 \frac { a(t) \frac{da}{dt} \alpha + b(t) \frac{db}{dt} }{3\alpha^2 + [a(t)]^2} $$