Find the maximum value of $f(\theta)=\frac{\sin(\theta-a)\sin(\theta-b)}{\sin(\theta-c)\sin(\theta-d)}$

calculusreal-analysistrigonometry

Context: I am deriving the formula for active earth pressure for an inclined soil mass behind a retaining wall. The formula is given in a textbooks (page 25 of Theoretical Foundation Engineering by Braja M. Das). I am restating the problem without any soil mechanics terminology.

Problem: Find the maximum value of the following function $-$

$
f(\theta)=\dfrac{\sin(\theta-a)\sin(\theta-b)}{\sin(\theta-c)\sin(\theta-d)}
$

Solution: Maximum value of the function, as given in the book, is $-$

$
f_{max}=\dfrac{\sin^{2}(a-b)}{\left\{\sqrt{\sin(d-b)\sin(a-c)}+\sqrt{\sin(d-a)\sin(b-c)}\right\}^{2}}
$

My attempt: I tried deriving the above maxima by the following procedure $-$

Obtain the point of maxima, $\theta_{max}$, by $\left.\dfrac{df(\theta)}{d\theta}\right|_{\theta=\theta_{max}}=0$

I get the following equation $-$

$$
\begin{aligned}
\sin(2\theta_{max}-a-b)\cos(d-c)-\sin(2\theta_{max}-c-d)\cos(a-b)=\sin(c+d-a-b)
\end{aligned}
$$

Which can also be written as $-$
$$
\sin(2\theta_{max}-a-b-c-d)\left[\cos(d+c)\cos(d-c)-\cos(a+b)\cos(a-b)\right]+\cos(2\theta_{max}-a-b-c-d)\left[\sin(d+c)\cos(d-c)-\sin(a+b)\cos(a-b)\right]=\sin(c+d-a-b)
$$

I can obtain $2\theta_{max}-a-b-c-d$ (by writing the above equation as a quadratic), but the equation becomes too complicated to simplify and put back in $f(\theta)$.

Please let me know if there is a better method or if I should go ahead with this method.

Thanks

PS: I have checked the accuracy of the solution by comparing with the optimum solution in Python. The solution is correct.

Best Answer

Lots of algebra, but here we go.

Let $\alpha=\cos(a+b-c-d)$, $\beta=\sqrt{1-\alpha^2}$, $\gamma=\cos(d-c)$ and $\delta=\cos(b-a)$. Using the Prosthaphaeresis formulas, the end result can be written as $$f_\max=\frac{1-\delta^2}{\alpha-\gamma\delta+\sqrt\Delta}\tag1$$ where $\Delta=\alpha^2+\gamma^2+\delta^2-2\alpha\gamma\delta+1$. To prove that $(1)$ is the maximum of $$f(\theta)=\frac{\sin(\theta-a)\sin(\theta-b)}{\sin(\theta-c)\sin(\theta-d)}=\frac{\alpha\cos(2\theta-c-d)+\beta\sin(2\theta-c-d)-\delta}{\cos(2\theta-c-d)-\gamma},\tag2$$ we set the derivative with respect to $u=\cos(2\theta-c-d)$ to zero. This gives $$\small\left(\alpha\mp\frac{\hat u}{\sqrt{1-{\hat u}^2}}\beta\right)(\hat u-\gamma)=\alpha \hat u\pm\sqrt{1-{\hat u}^2}\beta-\delta\implies(\alpha\gamma-\delta)^2(1-{\hat u}^2)=\beta^2(\gamma\hat u-1)^2\tag3$$ so $$f_\max=\frac{\delta \hat u-\alpha}{\gamma \hat u-1}:\hat u=\frac{(1-\alpha^2)\gamma\pm(\alpha\gamma-\delta)\sqrt\Delta}{\gamma^2+\delta^2-2\alpha\gamma\delta}\tag4$$ using $(3)$ twice. Direct substitution yields \begin{align}f(\theta)&\le\frac{\delta((1-\alpha^2)\gamma\pm(\alpha\gamma-\delta)\sqrt\Delta)-\alpha(\gamma^2+\delta^2-2\alpha\gamma\delta)}{\gamma((1-\alpha^2)\gamma\pm(\alpha\gamma-\delta)\sqrt\Delta)-(\gamma^2+\delta^2-2\alpha\gamma\delta)}\\&=\small\frac{(1+\alpha^2)\gamma\delta-\alpha(\gamma^2+\delta^2)\pm\delta(\alpha\gamma-\delta)\sqrt\Delta}{-(\alpha\gamma-\delta)^2\pm\gamma(\alpha\gamma-\delta)\sqrt\Delta}\frac{(1+\alpha^2)\gamma\delta-\alpha(\gamma^2+\delta^2)\mp\delta(\alpha\gamma-\delta)\sqrt\Delta}{(1+\alpha^2)\gamma\delta-\alpha(\gamma^2+\delta^2)\mp\delta(\alpha\gamma-\delta)\sqrt\Delta}\\&=\frac{(\alpha\gamma-\delta)^2(\gamma^2-2\alpha\gamma\delta+\delta^2)(1-\delta^2)}{(\alpha\gamma-\delta)^2(\gamma^2-2\alpha\gamma\delta+\delta^2)(\alpha-\gamma\delta+\sqrt\Delta)}.\end{align} As this is equivalent to $(1)$, the proof is complete.

Related Question