# Find the number of integral values of $k$ if $\sin4x - \cos4x + 3 \sin2x= k$

Please help me with this question How to find the number of integral values of $k$ that satisfy the given equation:

$$\sin4x - \cos4x + 3 \sin2x= k$$

My attempt: On solving the above equation, the final equation i got

$$10\sin x\cdot \cos x - 8\sin^3 x\cdot\cos x + 8\sin^2 x\cdot\cos^2x = k+1$$ Now how to proceed further or is there any other wayout?

Let $a = \cos (2x), b = \sin (2x)\to 2ab-(a^2-b^2)+3b=k(a,b), a^2+b^2 = 1$. Can you use Lagrange Multiplier to find the min and max value of $k$, and go from there?
I would like to solve this more intuitively.. This ($y = \sin 4x−\cos 4x+3\sin2x$) is a continuous function with maximum value +4 and minimum value -3. So the number of k's which are integers are from -3 to 4, i.e 8.
Put $y=2x$ and differentiate both sides wrt. $y$. $$\cos 2y + \sin 2y + \frac 32 \cos y = 0$$ The resulting equation defines the extrema locations of the LHS function.
From there $$\sin 2y = -\cos 2y - \frac 32 \cos y$$ We substitute to the original equation to get: $$4 \sin^2 y + \frac 32 \sin y = k+2$$ Let $h=\sin y$ – the equation is now $$h^2+\frac 32 h-2 = k$$ Test the quadratic function on the LHS behaviour for $h \in [-1, 1]$ to find out what integral values $k$ can satisfy the equation.