Maximum Range for Projectile Motion This is a question concerning a trick I observed while solving for the angle responsible for maximum range of a projectile.
What I have observed is :
If you draw two lines, one opposite to the acceleration faced by the body(i) , another in the direction we want to find the projectile(ii), the angle for maximum range is always half the angle between the two lines .
In other words , the body should be thrown along the angle bisector of the two lines mentioned above to get the maximum range .
We note that this trick works for all the normal projectile cases because we know the angle should be 45° .
For an example , let's say a body is projected and faces acceleration due to gravity , 'g' in both vertical and horizontal directions. Line (i) will be at 135° from the horizontal opposite to the resultant acceleration √2g and line (ii) will be along 0° from the horizontal. So 67.5° is the angle for maximum range which is also the result derived after differentiating the range w.r.t the angle .
For projections along/down inclined planes as well , the trick seems to work. If x° is the angle of the inclined plane,line (i) is along y-axis and line (ii) ,x° from the horizontal. The angle for maximum range is thus (90°-x)/2 = 45°-x/2 from the inclined plane .
For down the incline , line (i) is as usual 90° from the horizontal and rotating line(i) through 90°+x° gives us line(ii) . The angle for maximum range is thus 45°+x/2 from the inclined plane .
I would like to know if there is some solid mathematical proof behind this trick . Why does it seem to work everytime ? Are there any cases where it doesn't?
I am sorry if I am missing something trivial .
 A: Lets call the dimension along which range is to be maximised $x$ and the perpendicular dimension $y$. Let $g_x$ and $g_y$ be acceleration components and $u_x$ and $u_y$ be initial velocity components. Then, the time of flight is given by $t = -\frac{2 u_y}{g_y}$ and the range is given by $R = u_xt + \frac{1}{2}g_x t^2$.
Substituting $t$ in $R$, we get
$R = -2 u_x u_y\frac{1}{g_y} + 2u_y^2 \frac{g_x}{g_y^2}$  ---- (1)
Let $\theta$ be the angle between $x$ and $g$ and $\alpha$ be the angle between $x$ and $u$
Then,
$g_x = g \cos{\theta}$
$g_y = g \sin{\theta}$
$u_x = u \cos{\alpha}$
$u_y = u \sin{\alpha}$
Putting this in (1),
$R = -u^2 (2 \sin(\alpha) \cos(\alpha)) \frac{1}{g_y} - u^2 (2 \sin^2(\alpha))\frac{g_x}{g_y^2}
 = -\frac{u^2}{g_y^2} (\sin(2\alpha) g_y + (\cos(2\alpha)-1) g_x) 
 = -\frac{u^2}{g_y^2} (\sin(2\alpha) g \sin{\theta} + \cos(2\alpha) \cos {\theta} - g \cos{\theta})  = -\frac{u^2 g}{g^2 \sin^2{\theta}} (\sin(2\alpha) \sin{\theta} + \cos(2\alpha) \cos {\theta} - \cos{\theta}) = \frac{u^2}{g \sin^2{\theta}} (\cos{\theta} - \cos({2\alpha - \theta}) ) $
$\theta, g$ and $u$ are constants. Hence, $\alpha$ which maximises $R$ should minimize $\cos({2\alpha - \theta})$ which is when $\cos({2\alpha - \theta}) = -1
\implies 2\alpha - \theta = (2m+1)\pi \implies \alpha = m\pi + \frac{\pi}{2} + \frac{\theta}{2}$
Observe that $\theta \in [-\pi,0]$ for time $t$ to be positive because $g \sin{\theta}$ needs to be negative.
If we choose $\theta \in [-\pi, 0]$, then $\alpha = \frac{\pi}{2} + \frac{\theta}{2}$
A: The proof of this is a straightforward generalization of the one for maximizing horizontal distance given downward acceleration. You mention differentiating with respect to the angle so I'm not sure which part you got stuck on.
Nevertheless, orient your axes WLOG so that the distance you want to maximize is $x$. Let the launch angle be $\theta$ and the acceleration angle be $\phi$. The position of the projectile at time $t$ is then
\begin{align}
x &= v_0 \cos\theta t + \frac{1}{2} a \cos \phi t^2 \\
y &= v_0 \sin\theta t + \frac{1}{2} a \sin \phi t^2.
\end{align}
The projectile lands at the greater solution of $y = 0$ so you can plug in this time to get
\begin{align}
x &= v_0 \cos\theta \left ( \frac{-2v_0 \sin\theta}{a \sin\phi} \right ) + \frac{1}{2} a \cos\phi \left ( \frac{-2v_0 \sin\theta}{a \sin\phi} \right )^2 \\
&= \frac{2v_0^2 \sin\theta \sin(\phi + \theta)}{a \sin^2 \phi}
\end{align}
after some trig identities. A sanity check is that $\sin 2\theta$ appears for $\phi = 3\pi / 2$ (downward acceleration) which has a maximum in the right place. More generally, we maximize $x$ by solving
\begin{align}
\frac{dx}{d\theta} = 0 \Leftrightarrow \frac{2v_0^2 \sin(\phi + 2\theta)}{a \sin^2\phi} = 0.
\end{align}
Within the relevant quadrant, this is solved by $\theta = \frac{2\pi - \phi}{2}$ which reproduces your examples above.
I'm not sure if it reproduces your prose description of the rule because at one point you say "perpendicular to the acceleration" and at another you say "opposite to the resultant acceleration".
