Maximise a parametrised $\sin^2$ function

34 Views Asked by At

How to find the optimal value of $k$ that maximises $\sin^{2}((2k + 1)\theta)$ assuming $ \theta \in \left(0,\frac{\pi}{4}\right)$ and $k$ is a natural number.

As per my understanding the value of $k$ must initially decrease till $\theta$ reaches $\frac{\pi}{8}$ then it will start to increase and will go to infinity for $\theta = \frac{\pi}{4}$

Any suggestions how to show it mathematically and get an equation that gives back $k$?