Problem involving trigonometry and cubics One of my teachers proposed me the following problem:
$$\text{If } (3\sec x+\csc x)\sin x=5\cos^2 x\text{, calculate } z=\tan x+\sec x$$
I started by manipulating
$$3\tan x +1=5\cos^2 x$$
$$\sec^2 x(3\tan x +1)=5$$
$$(1+\tan^2 x)(3\tan x +1)=5$$
$$3\tan^3x +\tan^2 x + 3\tan x -4=0$$
$$3a^3 +a^2 + 3a -4=0$$
Unfortunately, this doesn't have any rational zeroes. Replacing $a=b-1/9$, we get
$$3b^3+26b/9-1051/243=0$$
Unfortunately again, the linear term is positive, so we can't solve using cosines and arcocosines directly.Alternatively, this can be seen as $(3a^3 +a^2 + 3a -4)'=(3a+1/3)^2+26/9>0$, so it is strictly increasing, therefore it has only one real root, therefore we can't use trigonometric solutions. Of course there is a solution using radicals, but it goes really ugly and I am quite convinced that was not the intent of the problem. Is there a good solution to this? Or was the problem ill-posed because of a typo?

Maybe this will be helpful for you. It seems the following.
Put $y=\pi/2-x$. Then $\cos x=\sin y$, $\sin x=\cos y$ and $\frac 1z=\frac {\cos x}{1+\sin x}=\frac {\sin y}{1+\cos y}=\tan\frac y2$. Then $\sin y=\frac {2z}{z^2+1}$,
$\cos y=\frac {z^2-1}{z^2+1}$ and 
$$\frac{3(z^2-1)}{z^2+1}+\frac{2z}{z^2+1}=5\left(\frac {2z}{z^2+1}\right)^3,$$
or $3z^6+2z^5+3z^4-36z^3-3z^2+2z-3=0$. Mathcad yieds that four roots of this equation are not real and other two are $z_1\simeq –.50330721831204403873$ and $z_2\simeq 1.9868580533252213137$.
