Optimization Approach Using Calculus
First we determine the range (call this function hitspot(a)) in terms of how far back we place the catapult, i.e., to the point (-a, a Sqrt[3]) given initial muzzle velocity of 300 ft/sec, and angle of elevation with the horizontal of Pi/4 radians. Then we plot this hitspot(t) function.
Input :=
theta = Pi/4;
vnaught= 300;
x[t_, a_]=vnaught * Cos[theta] * t - a;
y[t_, a_]=-16t^2 + vnaught * Sin[theta] * t+ Sqrt[3]*a;
sol=Solve[y[t,a]==0,t];
hitspot[a_]=x[t,a]/.sol[[2]];
Input :=
Plot[hitspot[a],{a, 0, 10000},
AxesLabel->{"angle-a","range"}]
Output =
-Graphics-
The graph shows the maximum impact point occurs at about 3200 when we move the catapult back (horizontally) around 1000 ft. We could hone this answer by zooming in on this point. However, we will have the computer take the derivative of the hitspot function with respect to the distance a, set the derivative equal to zero, and solve to determine the value of a.
Input :=
bestplace=a/.FindRoot[hitspot'[a]==0,{a,1000}]
Output =
811.899
This tells us the catapult's range is maximized when we move it to the point (-811.899, 811.899 Sqrt[3]). Next we find the corresponding impact point..
Input :=
maxrange=hitspot[bestplace]//N
Output =
3030.05
Thus if we move the target out beyond (3030.5, 0) our catapult cannot hit the target when we are restricted to launching at an angle of Pi/4 radians or 45 degrees from the horizontal.