Resolving $\sec{x}\left(\sin^3x + \sin x \cos^2x\right)=\tan{x}$ Going steadily through my book, I found this exercise to resolve

$$ \sec{x}\left(\sin^3x + \sin x \cos^2x\right)=\tan{x}$$

Here's how I resolve it ($LHS$) and again bear with me as I truly reverting to a feeling of vulnerability, like a child actually
As $\sec x$ is equal to $\frac{1}{\cos x}$
That leads us to this
$$\frac{(\sin^3x+\sin x\cos^2x)}{\cos x}$$
I'm factorizing one $\sin x$
$$\frac{\sin x(\sin^2x+\cos^2x)}{\cos x} = \frac{\sin x(1)}{\cos x} = \tan x$$
That seems to work otherwise I completly messed this up
Reading the book's solution, I have something different...
$$\begin{align*}
LHS&=\frac{\sin^3x}{\cos x}+ \sin x \cos x \\[4pt]
&=\frac{\sin x}{\cos x}-\frac{\sin x\cos^2x}{\cos x}+\sin x\cos x\\[4pt]
&= \tan x\end{align*}$$
What did I miss?

So the book does about the same thing as you but in a different order (your solution is hence correct too). 
By the trigonometric one we get $\sin^2 x= (1-\cos^2 x) $. Thus
$$\frac{\sin^3 x}{\cos x}=\frac{\sin x (\sin^2 x)}{\cos x}= \frac{\sin x(1-\cos^2 x)}{\cos x} = \frac{\sin x-\sin x\cos^2 x}{\cos x}= \frac{\sin x}{\cos x} -\frac{\sin x\cos ^2 x}{\cos x}$$
Thus 
$$LHS =\frac{\sin^3 x}{\cos x}+\sin x\cos x= \frac{\sin x}{\cos x} -\frac{\sin x\cos ^2 x}{\cos x} +\sin x\cos x = \frac{\sin x}{\cos x}=\tan x$$
