Official solution
\[f(x) = \left( {1 - {{\cos }^2}x} \right)\left( {\lambda + \sin x} \right)\]
\[ \Rightarrow \] f(x) = sin2 x(\[\lambda \] + sinx) ....(1)
\[ \therefore \] f'(x) = 2sinx cosx (\[\lambda \] +sinx) + sin2x (cosx)
\[ \Rightarrow \] f'(x) = sin2x(\[{{2\lambda + 3\sin x} \over 2}\])
For maixma and minima, f'(x) = 0
\[ \therefore \] sin2x = 0 or 2\[\lambda \] + 3sinx = 0
when sin2x = 0 \[ \Rightarrow \] x = 0
or when 2\[\lambda \] + 3sinx = 0
\[ \Rightarrow \] sin x = \[ - {{2\lambda } \over 3}\]
As \[x \in \left( { - {\pi \over 2},{\pi \over 2}} \right)\]
\[ \therefore \] -1 < sinx < 1
\[ \Rightarrow \] -1 < \[ - {{2\lambda } \over 3}\] < 1
\[ \Rightarrow \] \[ - {3 \over 2}\] < \[\lambda \] < \[ {3 \over 2}\]
\[ \therefore \] \[\lambda \] \[ \in \] \[\left( { - {3 \over 2},{3 \over 2}} \right)\] - {0}
Note : If \[\lambda \] = 0 \[ \Rightarrow \] f(x) = sin3x [from (1)]
Which is monotonic. so no maxima/minima.