How to find the maximum value of $\frac{2\sin\theta\cos\theta}{(1+\cos\theta)(1+\sin\theta)}$?

Let $$\theta\in\left(0,\frac{\pi}{2}\right)$$, then find the maximum value of $$\dfrac{2\sin\theta\cos\theta}{(1+\cos\theta)(1+\sin\theta)}$$

I found the derivative, which is equal to $$\dfrac{(\cos\theta−\sin\theta)(\sin\theta+\cos\theta+1)^2}{(1+\sin\theta+\cos\theta+\sin\theta\cos\theta)^2}$$

But there were complicated calculations involved. Is there a simpler way to find the maximum of this function?

• Maximum at $\theta=\operatorname{acos}\left( \frac{\sqrt{5}}{2}-\frac{1}{2}\right)$ Aug 22, 2021 at 6:26
• Divide by $\sin\theta\cos\theta$ in the numerator and denominator. This will make the differentiation easy to carry out. Aug 22, 2021 at 6:47
• @Asher2211 simultaneously is the key word here. Sometimes you can consider the numerator and denominator separately. Aug 22, 2021 at 8:00

Change the variable:

$$t=\tan{\frac{\theta}{2}}; t\in (0,1)$$

$$\tan{\frac{\theta}{2}}$$ is one to one in this interval.

$$\sin{\theta}=\frac{2t}{1+t^2}$$

$$\cos{\theta}=\frac{1-t^2}{1+t^2}$$=>

$$f(\theta)=g(t)=2\frac{\frac{2t}{1+t^2}\frac{1-t^2}{1+t^2}}{\left(1+\frac{2t}{1+t^2}\right)\left(1+\frac{1-t^2}{1+t^2}\right)}=2t\frac{1-t}{1+t}$$

Now is easy to find the maximum!

• Can you finish your solution? Aug 22, 2021 at 7:26
• For a shortcut to the final step, $\,2t\frac{1-t}{1+t} = 2\left(3 - \left(t+1 + \frac{2}{t+1}\right)\right) \le 2\left(3 - 2 \sqrt{2}\right)\,$ by AM-GM.
– dxiv
Aug 22, 2021 at 7:39

Step 1: Find the critical points of $$f(\theta)$$:

For this, it is necessary to find the derivative of the function and do $$f'(\theta)=0$$, such that:

\begin{align*} f'(\theta)=&-\dfrac{2\cos^2\theta\sin\theta}{(cos\theta+1)(\sin\theta+1)^2} +\\ &+\dfrac{2\cos^2\theta}{(\cos\theta+1)(sin\theta+1)}+ \\ &+\dfrac{2\cos\theta\sin^2\theta}{(\cos\theta+1)^2(\sin\theta+1)} -\\ &-\dfrac{2\sin^2\theta}{(\cos\theta+1)(\sin\theta+1)}=0 \end{align*}

We can rewrite this:

$$$$f'(x)=\dfrac{2(\cos\theta-\sin\theta)(\cos\theta+\cos^2\theta+\sin\theta+\cos\theta\sin\theta+\sin^2\theta)}{(\cos\theta+1)^2(\sin\theta+1)^2}=0$$$$

dividing by 2 both sides and reduce trigonometric functions:

$$$$\dfrac{3\cos\theta+4\cos(2\theta)+\cos(3\theta)-3\sin\theta +\sin(3\theta)}{4(\cos\theta+1)^2(\sin\theta+1)^2}=0$$$$

multiplying both sides by 4 and assuming $$(\cos\theta+1)\neq 0$$ and $$(\sin\theta+1)\neq 0$$, we can treat the problem in another way, such that:

$$$$3\cos\theta+4\cos(2\theta)+\cos(3\theta)-3\sin\theta +\sin(3\theta)=0$$$$

Show that this equation is equal to:

$$$$16\sqrt{2}\cos^2\left(\dfrac{\theta}{2}\right)\sin\left(-\theta+\dfrac{\pi}{4}\right)\sin^2\left( \dfrac{\theta}{2}+\dfrac{\pi}{4} \right)$$$$

This implies that:

$$$$\cos^2\left(\dfrac{\theta}{2}\right)\sin\left(-\theta+\dfrac{\pi}{4}\right)\sin^2\left( \dfrac{\theta}{2}+\dfrac{\pi}{4} \right)=0$$$$

We have 3 possibilities:

\begin{align} \cos^2\left(\dfrac{\theta}{2}\right)&=0 \\ \sin\left(-\theta+\dfrac{\pi}{4}\right)&=0 \\ \sin^2\left( \dfrac{\theta}{2}+\dfrac{\pi}{4} \right)&=0 \end{align}

Solving this 3 equations, you find that:

$$\theta=\dfrac{\pi}{4}$$

Step 2: Determine the endpoints of the domain of $$f(\theta)$$

For $$\theta=0^+$$ and $$\theta=\dfrac{\pi}{2}^{-}$$, we have $$f(\theta)=0$$, this implies:

$$\fbox{f\left(\dfrac{\pi}{4}\right)=6-4\sqrt{2}}$$

Is the global maximum of $$f(\theta)$$.

Let $$f(\theta)=\frac{2\sin\theta\cos\theta}{(\sin\theta+1)(\cos\theta+1)}=\frac{2\sin\theta\cos\theta}{1+\sin\theta+\cos\theta+\sin\theta\cos\theta}$$ Taking $$\sin2\theta=t,\ t\in(0,1],$$ $$f(t)=\frac t{1+\sqrt{1+t}+\frac t2}=\frac{2t}{2+2\sqrt{1+t}+t}=\frac2{\left(\frac 1t+\sqrt{\frac 1t+1}\right)^2}$$

In order to maximize the given function in the question one needs to find the minimum value of the denominator of the expression after the manipulations done in the image. The minimum value of denominator will be obtained at t=1 and it's easy to see that. Putting t=1 gives the maximum value of function to be $$6-4\sqrt2$$.

• Nice, but answers are meant to be presented in MathJax here.
– Babu
Aug 22, 2021 at 9:35
• I don't know how to present in MathJax . Can you please help me. Aug 22, 2021 at 9:40
• Aug 22, 2021 at 9:42

The first derivative is:

$$\frac{2\sqrt{2}cos(\theta+\frac{\pi}{4})}{(1+\cos\theta)(1+\sin\theta)}$$,

which becomes null in:

$$\theta=\frac{5\pi}{4}$$, $$\theta=\frac{-3\pi}{4}$$, $$\theta=\frac{\pi}{4}$$.

The maximum is for $$\theta=\frac{\pi}{4}$$ and, and is equal to $$-4\sqrt{2}+6$$.