$3 \sin x- \sin^3x$ on $[0, 2\pi]$
First derivative is :$3 \cos x-3 \sin^2x \cos x$.
I have written it like this: $3 \cos x(1-\sin^2x)$.
Using the identity $1 - \sin^2x = \cos^2x$, I get: $3 \cos x \cos^2x$.
I mark '$\cos x$' as 't' and then: second derivative is $9t^2$.
Comparing it to $0$, I get $x=\pi/2$ and $3\pi/2$.
In the workbook, it didn't assign value $t$ as $\cos x$ but instead went like this:
$-9 \cos^2x\sin x$
That is the second derivative and the span of solution it gets is: $x=0,x=\pi/2,x=\pi$ and $x=3\pi/2$. I fully understand this way, but why does marking '$\cos x$' as '$t$' get me a different span of solutions than in the workbook?
After you apply the clain rule to obtain the second derivative (see N. F. Taussig's description below), your derivative should have been $f''(t) = 9t^2 t'$. Then, you can split the resulting equation $-9 \cos^2 x \sin x = 0$ into two parts to find the inflection points.
For your first part ($-9 \cos^2 x = 0$) the two solutions you obtained are absolutely correct ($\pi/2 \text { and } 3\pi/2$). For the second part ($\sin x = 0$) we have $x = 0 \text { or } x = \pi$. Plugging in $x = 0$ gives us no change in sign, so no inflection point, but plugging in $\pi$ does; hence the three inflection points are $\pi/2, \pi \text {, and } 3\pi/2.$