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?

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$.
