Show $\frac{d}{dx} \tan^3{x}-3 \tan{x}+3x = 3 \tan^4{x}$ How do I go about doing this?

Show $\frac{d}{dx} \tan^3{x}-3 \tan{x}+3x = 3 \tan^4{x}$.

My work.
$$
\begin{align*}
\frac{d}{dx} \tan^3 x -3 \tan x+3x 
&= 3 \tan^2 x \sec^2 x - 3 \sec^2 x + 3
\\ &= 3 \frac{\sin^2 x}{\cos^2 x} \frac{1}{\cos^2 x} - 3 \frac{1}{\cos^2 x} + 3
\\ &= 3 \frac{\sin^2 x}{\cos^4 x} - 3 \frac{1}{\cos^2 x} + 3
\\ &= \frac{3\sin^2 x - 3\cos^2 x + 3\cos^4 x}{\cos^4 x} 
\\ &= \frac{3(\sin^2 x - \cos^2 x + \cos^4 x)}{\cos^4 x}. 
\end{align*}
$$
I got here so far, did I make a mistake or something?

No mistakes. Keep going...
From where you left off:
$$\eqalign{
{3(\sin^2 x-\cos^2 x+\cos^4 x)\over\cos^4 x}
&={3\bigl(\sin^2 x+\cos^2 x(\cos^2 x-1)\bigr)\over\cos^4 x}\cr
&={3\bigl(\sin^2 x+\cos^2 x(-\sin^2 x)\bigr)\over\cos^4 x}\cr
&={3\bigl(\sin^2x ( 1-\cos^2 x) \bigr)\over\cos^4 x}\cr
&={3 \sin^2x (\sin^2 x)\over\cos^4 x}\cr
&={3 \sin^4x \over\cos^4 x}\cr
&=3\tan^4 x.
}
$$
