Solving $\cos\phi\cos(2\theta - \phi)+\sin(\theta - \phi)\sin(\theta + \phi)=0$ for $\theta$

Let $$d = \frac{2v_i \cos(\theta)\sin(\theta - \phi)}{g\cos^2\phi}$$ Now I have to equate $$\frac{d}{d\theta}$$ to $$0$$ and find $$\theta$$. $$\frac{(2(v_i)^2\sin{\theta}\sin(\theta - \phi)+2(v_i)^2\cos{\theta}\cos(\theta - \phi))g\cos^2\theta+4(v_i)^2\cos{\theta}\sin(\theta - \phi)g\cos{\theta}\sin\phi}{g^2\cos^4\phi}=0$$ Then I get to the following expression: $$-\cos{\phi}\sin{\theta}\sin({\theta - \phi})+\cos{\theta}\cos(\theta - \phi)\cos\phi+2\cos{\theta}\sin(\theta - \phi)\sin \theta=0$$

$$\cos\phi\cos(2\theta - \phi)+\sin(\theta - \phi)\sin(\theta + \phi)=0$$ I need to get to $$\theta = \frac{\pi}{4}-\frac{\phi}{2}$$ but I don't know how to continue. I tried different ways but I never get to the desired solution.

• Have you tried the angle-addition formulas? Aug 25 at 2:47
• This $$-\cos{\phi}\sin{\theta}\sin({\theta - \phi})+\cos{\theta}\cos(\theta - \phi)\cos\phi+2\cos{\theta}\sin(\theta - \phi)\sin \theta=0$$ will be equal to $cos(\phi)cos(2\theta-\phi)+sin(\theta-\phi)sin(2\theta)$ Aug 25 at 2:51
• This looks like a physics question. Is $d$ the distance, $v_i$ the initial velocity, and $g$ the gravity scalar? If so, you can pull them out of the derivative to make things a little easier. Aug 25 at 2:51
• It looks like you miscalculated the derivative and basically need to start over. Try doing it step by step, and write down exactly what you are doing and why at each step. Aug 25 at 2:51
• @DavidK yes he made mistakes in the derivative I think... Some of them are visible directly Aug 25 at 2:55

use Mathematica Solve

Solve[Cos[\[Phi]]*Cos[2 \[Theta] - \[Phi]] +
Sin[\[Theta] - \[Phi]]*Sin[\[Theta] + \[Phi]] == 0, \[Theta],
Assumptions -> {\[Theta] \[Element] Reals, \[Phi] \[Element]
Reals}] // FullSimplify


$$\left\{\left\{\theta \to \fbox{\frac{1}{2} \pi (4 c_1-1)\text{ if }c_1\in \mathbb{Z}}\right\},\left\{\theta \to \fbox{\frac{1}{2} (4 \pi c_1+\pi )\text{ if }c_1\in \mathbb{Z}}\right\},\left\{\theta \to \fbox{2 \phi +\pi \left(2 c_1-\frac{1}{2}\right)\text{ if }c_1\in \mathbb{Z}}\right\},\left\{\theta \to \fbox{\frac{1}{2} (4 \phi +4 \pi c_1+\pi )\text{ if }c_1\in \mathbb{Z}}\right\}\right\}$$

Since you want the critical points, then want the local maximum or local minimum of $$d$$ as a function of $$\theta$$. This can be tackled directly from the expression for $$d$$. $$\phi$$ is fixed, so what we should concentrate on is

$$f(\theta) = \cos(\theta) \sin(\theta - \phi)$$

Using the identity

$$cos(A) sin(B) = 1/2 ( \sin(B + A) + \sin(B - A) )$$

We get

$$f(\theta) = 1/2 ( \sin( 2 \theta - \phi) + \sin(- \phi) )$$

The second term is constant, and does not depend on $$\theta$$. So the maximum of $$f$$ is when

$$2 \theta - \phi = \dfrac{\pi}{2}$$

This leads to $$\theta = \dfrac{\phi}{2} + \dfrac{\pi}{4}$$

If you looking for the minimum then this occurs when

$$2 \theta - \phi = - \dfrac{\pi}{2}$$

And this leads to $$\theta = \dfrac{\phi}{2} - \dfrac{ \pi}{4}$$

I got the expression $$\cos \theta \cos ( \theta- \varphi) = \sin \theta \sin ( \theta-\varphi)$$ from the derivative to solve for $$\theta$$. This gets expanded out to

$$\cos \theta ( \cos \varphi \cos \theta + \sin \varphi \sin \theta) = \sin \theta ( \cos \varphi \sin \theta - \sin \varphi \cos \theta) \tag{1}$$

Now apply the tangent-half-angle substitution(s) of

$$\begin{array}{c|c} z = \tan \left( \tfrac{\varphi}{2} \right) & t = \tan \left( \tfrac{\theta}{2} \right) \\ \varphi = 2 \tan^{-1}(z) & \theta = 2 \tan^{-1}(t) \\ \hline \cos(\varphi) = \tfrac{1-z^2}{1+z^2} & \cos(\theta) = \tfrac{1-t^2}{1+t^2} \\ \sin(\varphi) = \tfrac{2 z}{1+z^2} & \sin(\theta) = \tfrac{2 t}{1+t^2} \end{array} \tag{2}$$

The result is

$$\small \frac{1-t^2}{1+t^2} \left( \frac{(1-z^2)(1-t^2)}{(1+z^2)(1+t^2)} + \frac{(2 z)(2 t)}{(1+z^2)(1+t^2)} \right) = \frac{2 t}{1+t^2} \left( \frac{(2 t)(1-z^2)}{(1+z^2)(1+t^2)} - \frac{(1-t^2)(2 z)}{(1+z^2)(1+t^2)} \right)$$

which is simplified by eliminating common terms down to

$$(1-t^2)(z^2 (1-t^2)-4 t z + t^2-1) = 4 t (t z^2 + (1-t)^2 z -t)$$

Finally, bring both sides together to get

$$(1-z^2) t^4 -8 z t^3 - 6 (1-z^2) t^2 + (8 z) t + (1-z^2) = 0 \tag{3}$$

which is a solvable quatric polynomial in terms of $$t$$ and hence $$\theta = 2 \tan^{-1}(t)$$

If you restict $$\varphi = 0 \ldots \pi/2$$ then $$z (1-z^2) \ge 0$$ and the four solutions of $$t$$ are

$$\large t = \begin{cases} \text{-} \frac{ \sqrt{2} (1-z) \sqrt{1+z^2}-z^2-2z-1}{1-z^2} \\ \text{+} \frac{ \sqrt{2} (1-z) \sqrt{1+z^2}+z^2+2z+1}{1-z^2} \\ \text{-} \frac{ \sqrt{2} (1+z) \sqrt{1+z^2}+z^2-2z+1}{1-z^2} \\ \text{+} \frac{ \sqrt{2} (1+z) \sqrt{1+z^2}-z^2+2z-1}{1-z^2} \\ \end{cases} \tag{4}$$

Expanded out, the above is also written as

$$\large \tan \left( \frac{\theta}{2} \right) = \begin{cases} \frac{(1+\sin(\varphi))\sqrt{1+\cos(\varphi)}-\cos(\varphi)+\sin(\varphi)-1}{\cos(\varphi)\sqrt{1+\cos(\varphi)}} \\ \frac{(1+\sin(\varphi))\sqrt{1+\cos(\varphi)}+\cos(\varphi)-\sin(\varphi)+1}{\cos(\varphi)\sqrt{1+\cos(\varphi)}} \\ \frac{(\sin(\varphi)-1)\sqrt{1+\cos(\varphi)}-\cos(\varphi)-\sin(\varphi)-1}{\cos(\varphi)\sqrt{1+\cos(\varphi)}} \\ \frac{(\sin(\varphi)-1)\sqrt{1+\cos(\varphi)}+\cos(\varphi)+\sin(\varphi)+1}{\cos(\varphi)\sqrt{1+\cos(\varphi)}} \\ \end{cases}$$

• PS I used Derive to solve the quartic polynomial. Aug 25 at 4:41