CATAPULT - UP AND AWAY BRIEF ABSTRACT We maximize the range of a projectile by backing up an incline in the opposite direction of the range to give some initial lift, but what is the best lift. GENERAL INFORMATION FileName: CATAPULT Full title: Catapult - Up and Away Last Revision Date: 27 May 1996. Developers: Kimberly Foltz, Mathematics and Computer Science Division , Indiana Academy for Science, Mathematics, and Humanities, Muncie IN 47306 USA. Dave Horn, Rogers High School, Michigan City IN 46360 USA. Contact: Brian J. Winkel, Department of Mathematical Sciences, United States Military Academy, West Point NY 10996 USA. Phone: 914-938-3200. Email: ab3646@usma2.usma.edu. FAX: 914-938-2409. Aaron D. Klebanoff, Department of Mathematics, Rose-Hulman Institute of Technology, Terre Haute IN 47803 USA. Phone: 812-877-8151. Email: Aaron.Klebanoff@Rose-Hulman.Edu. FAX: 812-877-3198. Support: The production of this material is supported by the National Science Foundation under Division of Undergraduate Education grant DUE-9352849: Development Site for Complex, Technology-Based Problems in Calculus with Applications in Science and Engineering and the Arvin Foundation of Columbus IN. STATEMENT OF THE PROBLEM 1. A projectile fired from a catapult moves according to the parametric equations x(t) = (v0 cos a)t +x0, y(t) = -1/2 g t^2 + (v0 sin a)t + y0 where (x0, y0) is the starting point of the projectile, v0 is the initial velocity, a is the angle of elevation of the launch of the projectile from horizontal, and g is the acceleration due to gravity (either 32 ft/sec^2 or 9.81 m/sec^2). The functions x(t) and y(t) give the coordinates of the projectile at time t in seconds. This model does not take into consideration air resistance. The distance that a catapult fires a projectile depends on two factors: (1) the projectile's initial velocity and (2) the angle of elevation of the launch of the projectile from horizontal. Suppose you can give the projectile an initial velocity of 300 ft/sec. Investigate the effect of varying the angle of elevation from the horizontal on the horizontal range of the projectile. What angle maximizes this range? 2. You are at the base of a long, steep hill which has an angle of elevation from the horizontal measuring 60 degrees. Before you lies a level plane. A target on the plane lies 3,000 ft from where you stand. You decide to catapult a projectile set at 45 degrees angle of elevation of the launch of the projectile from horizontal. Your projectile has an initial velocity of 300 feet per second. Because of a stream which runs across the plane, you can only advance the catapult 30 ft. Where should you put it in order to score a direct hit on the target? 3. How far can we put the target and have it still within range of our catapult? Justify your answer. KEYWORDS Projectile motion, angle of elevation, velocity, maximum range, optimization, parametric equations. TEACHER NOTES ISSUES RELATED TO THE PROBLEM Prerequisites One can do this problem and get good results with the use of tables of data. One needs to know the motion equations for two dimensional projectile motion. No resistance is presumed here. One can use the calculus of one variable to solve for determining the angle of elevation for a projectile to attain maximum range along a horizontal plane. One can also determine the combination of angle and distance up an inclined plane to give range or maximum range. This problem is a function of two variables and can be solved using optimization techniques (partial derivatives). Time allotment - time management To be determined. But estimating the effort this should be assigned with about one week to perform the analysis or say three days in class to do the same. Expectations The problem (Part 1) could serve as a review or introduction to projectile motion in two-dimensions. Parts 2 and 3 pose a new twist in that the non-obvious thing, namely back up a hill - away from the target - in order to get a bigger range for the catapult's projectile. Future payoffs This can be a pretty complicated problem setting with the students keeping track of angles, x and y distance, maximum range, and specified target. Thus the complexity of the problem, if mastered, will permit students to do other complex activities. Extensions This is a non-traditional projectile problem with a counterintuitive solution. One could further ask the students to consider what is the best thing to do, i.e. determine angle and distance up the hill as a function of the inclination of the hill as well. We have not done this yet ourselves, but it might be interesting to plot the the angle of elevation of the launch of the projectile from horizontal using a minimum distance up the hill as a function of the angle of inclination of the hill itself. References and Sources None but a traditional text to gain the formulae for two-dimensional projectile motion. POSSIBLE SOLUTION(S) 1. (Restatement) A projectile fired from a catapult moves according to the parametric equations x(t) = (v0 cos a)t +x0, y(t) = -1/2 g t^2 + (v0 sin a)t + y0 where (x0, y0) is the starting point of the projectile, v0 is the initial velocity, a is the angle of elevation of the launch of the projectile from horizontal, and g is the acceleration due to gravity (either 32 ft/sec^2 or 9.81 m/sec^2). The functions x(t) and y(t) give the coordinates of the projectile at time t in seconds. This model does not take into consideration air resistance. The distance that a catapult fires a projectile depends on two factors: (1) the projectile's initial velocity and (2) the angle of elevation of the launch of the projectile from horizontal. Suppose you can give the projectile an initial velocity of 300 ft/sec. Investigate the effect of varying the angle of elevation from the horizontal on the horizontal range of the projectile. What angle maximizes this range? Table Approach We will use Mathematica to produce a table that shows how changing the barrel angle changes the range. Then we will study the table for conclusions about maximizing range. Basically this table is created by determining the time at which the projectile hits the ground (found in the command Solve[ y[t,theta]==0,t]) for given theta and then ascertains the x position (range) for that time. vnaught= 300; x[t_, theta_]=vnaught * Cos[theta] *t; y[t_, theta_]=-16t^2 + vnaught* Sin[theta] *t; TableForm[Table[ {theta, x[t,theta]/. Solve[ y[t,theta]==0,t] [[2]] //N }, {theta,0,Pi/2,Pi/24} ] , TableHeadings->{None,{"theta","landing pt"}}] theta landing pt 0 0 Pi -- 24 727.929 Pi -- 12 1406.25 Pi -- 8 1988.74 Pi -- 6 2435.7 5 Pi ---- 24 2716.67 Pi -- 4 2812.5 7 Pi ---- 24 2716.67 Pi -- 3 2435.7 3 Pi ---- 8 1988.74 5 Pi ---- 12 1406.25 11 Pi ----- 24 727.929 Pi -- 2 0 This table indicates that range increases as theta increases, up to Pi/4, and then begins to decrease. The following graph, which plots range vs. angle, confirms that Pi/4, 45 degrees, does produce the maximum range. Again range function is produced by determining the x coordinate for the time t (Solve[ y[t,theta]==0,t]) at which the projectile strikes the ground. range[theta_] = x[t,theta]/. Solve[ y[t,theta]==0,t] [[2]]; Plot[range[theta], {theta,0,Pi/2} ] -Graphics- We confirm the time of t = 13.2583 sec and range of 2812.5 ft for our trajectory with our angle of elevation a = Pi/4 . hittime=Solve[y[t,Pi/4]==0,t]//N x[t,Pi/4]/.hittime[[2]]//N {{t -> 0}, {t -> 13.2583}} 2812.5 Optimization Approach Using Calculus We define our variables again. vnaught= 300; x[t_, theta_]=vnaught * Cos[theta] *t; y[t_, theta_]=-16t^2 + vnaught* Sin[theta] *t; We determine the range function by determining the x coordinate for the time t (Solve[ y[t,theta]==0,t]) at which the projectile strikes the ground. range[theta_] = x[t,theta]/. Solve[ y[t,theta]==0,t] [[2]] 5625 Cos[theta] Sin[theta] We plot the range function to estimate the value of theta which gives a maximum range. Plot[range[theta],{theta,0, Pi/2}] -Graphics- Thus it appears that at about Pi/4 or near .75 radians we have a maximum range. To determine the value of theta which maximizes this range precisely we determine where range'[theta]=0, i.e. where the derivative with respect to theta is 0. derrange[theta_] = range'[theta]; sol = FindRoot[derrange[theta]== 0,{theta, Pi/8}] {theta -> 0.785398} range[theta]/.sol[[1]]//N 2812.5 We thus see that the maximum range of 2812.5 feet occurs when our angle of elevation theta is .785398 which is (as we see below) actually Pi/4. Pi/4//N 0.785398 2. (Restatement) You are at the base of a long, steep hill which has an angle of elevation from the horizontal measuring 60 degrees. Before you lies a level plane. A target on the plane lies that plane 3,000 ft from where you stand. You decide to catapult a projectile set at 45 degrees angle of elevation of the launch of the projectile from horizontal. Your projectile has an initial velocity of 300 feet per second. Because of a stream which runs across the plane, you can only advance the catapult 30 ft. Where should you put it in order to score a direct hit on the target? We proceed upon the assumption that the angle of elevation with the horizontal remains Pi/4 radians or 45 degrees no matter if we are on level ground or up the hill we proceed to address this question. Table approach We impose a coordinate system scaled in feet. We stand at the origin and the target is at (3,000, 0) . The hill extends from the origin back into the second quadrant. Then, we want to position the catapult at such a point that the path of the projectile will intersect the x-axis at (3000,0). Before moving the catapult, it makes sense to figure out where the projectile will land if we launch it from the origin. We know this from Part 1, namely our maximum range when the catapult is at the origin will be 2,812.5 feet downrange. Thus our shot will fall about 87.5 feet short of the target. We present this analysis here again for completeness. When fired form the origin, the projectile's position t seconds after being fired will be given by the parametric equations x(t) = 300 (cos 45)t y(t) = -16t^2 + 300 (sin 45) t We are interested in the time(s) that make y(t)= 0 and the range at which this occurs. We know from Part 1 that the angle of elevation theta which give rise to the maximum range is Pi/4. Mathematica can then tell us the maximum range via the following code: theta = Pi/4; vnaught= 300; x[t_, a_]=vnaught * Cos[theta] t; y[t_, a_]=-16t^2 + vnaught* Sin[theta] t; hittime=Solve[y[t,theta]==0,t]//N x[t,Pi/4]/.hittime[[2]]//N {{t -> 0}, {t -> 13.2583}} 2812.5 Again, from the above analysis we see that if our catapult is positioned at the origin, the projectile will hit 2,812.5 feet downrange. Thus our shot will fall about 187.5 feet short of the enemy camp which is out at (3000, 0). The intuitive solution is to move the catapult closer to their camp. Since this horizontal translation does not affect the range of the catapult, if we fire it from (x, 0), it will land at (x + 2812.5, 0). However, the river prevents moving along the x-axis further than the point (30, 0). A projectile launched from this point will land at (2842.5, 0), still about 57.5 feet short of the target. We cannot reach our target by moving the catapult closer to the target. There seems to be no way to hit the target. And there isn't, by moving forward! Now we examine the non-intuitive possibility--move the catapult backwards, up the hill. It is a very steep hill, and perhaps what we gain in range by elevating the gun will offset the horizontal loss of moving the gun away from the target. Because the hill is so steep, every horizontal foot we lose allows a vertical gain of square root of 3 feet. The following parametric equations describe the the projectile's position t seconds after being fired from the point (- a, b), where a > 0 and b > 0. NOTE: We presume that our catapult still has an angle of elevation with the horizontal of Pi/4 for maximum range - although later we consider the possibility that another angle might give a further range. We proceed to solve by creating a table of maximum ranges or landing points, using Mathematica to try several locations up the hill. Remove[x,y,theta] 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; TableForm[Table[ {k, x[t,k]/.Solve[ y[t,k]==0,t] [[2]] //N}, {k,0,1000,100}], TableHeadings->{None,{"x-coord","landing pt"}}] x-coord landing pt 0 2812.5 100 2876.18 200 2924.34 300 2960.69 400 2987.69 500 3007.02 600 3019.93 700 3027.35 800 3030.02 900 3028.51 1000 3023.3 This table shows us that we can reach the target which is out at 3,000 ft. Our maximum landing point is around 3030 ft when k is somewhere between 700 and 900. So we can surely hit our target at 3,000 ft out, but exactly what value of k should we use? We now focus our table on the interval 400 to 500. TableForm[Table[{k, x[t,k]/.Solve[ y[t,k]==0,t] [[2]]//N}, {k,400,500,10}] , TableHeadings->{None,{"x-coord","landing pt"}}] x-coord landing pt 400 2987.69 410 2989.94 420 2992.12 430 2994.23 440 2996.26 450 2998.23 460 3000.12 470 3001.94 480 3003.7 490 3005.39 500 3007.02 This table shows that moving the catapult back up the hill to the the point (-460, 460 Sqrt(3)) will shoot a projectile on the point (3000.12, 0). This means we have to move the catapult some 920 ft overland up the hill. If this hit is not direct enough, we can do better with closer examination of the interval -460 < x < - 450. distance = Sqrt[460^2 + (Sqrt[3] 460)^2]//N 920. Optimization Approach Using Calculus Again assuming we have an angle of elevation of Pi/4 radians or 45 degrees we determine the range (rangeHill(k)) when shooting from the hill as a function of how far back we shoot, i.e. the catapult is located at (-k, Sqrt[3] k). 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; The rangeHill function determines the range as a function of k (rangeHill(k)) by substituting the time the projectile strikes the ground as a function of k into the x[t,k] function. rangeHill[k_] = x[t,k]/.Solve[ y[t,k]==0,t][[2]]; We plot this rangeHill function and estimate its maximum range to be at around 3,000 feet when the catapult is moved back about 900 ft. Plot[rangeHill[k],{k,0,4000}, AxesLabel->{"angle-a","range"}] -Graphics- But what is the exact value of k which will permit the projectile to hit the target at (3000, 0)? sol = Solve[rangeHill[k]==3000,k]//N {{k -> 459.358}, {k -> 1224.53}} Sqrt[3] k/.sol[[1]]//N 795.632 Thus if we move to location (-459.358, Sqrt[3] 459.358) we can hit the target exactly. This is a distance of 918.716 ft. Sqrt[k^2 + (Sqrt[3] k)^2]/.sol[[1]]//N 918.716 This says that if we move the catapult to a point 459.358 feet back from the origin and 795.632 feet up the hill we can hit the target at (3000, 0) with our projectile. rangeHill[k]/.sol[[1]]//N 3000. We now consider the more general case of moving the catapult up the hill AND changing the angle of elevation in order to reach the target. Perhaps we can determine a different angle which will still permit us to hit the target AND move the catapult up the hill less than when we fire at an angle of elevation of Pi/4 radians or 45 degrees. Remove[theta,x,y,xrange,dist1,dist2,vnaught] vnaught= 300; x[t_, a_]=vnaught * Cos[theta] t - a; y[t_, a_]=-16t^2 + vnaught* Sin[theta] t+ Sqrt[3]*a -a + 300 t Cos[theta]; 2 Sqrt[3] a - 16 t + 300 t Sin[theta] We determine the time at which the projectile strikes the ground. sol = Solve[y[t,a] == 0,t]; And we find the range as a function of a and theta, eliminating t. xrange[a_,theta_] = x[t,a]/.sol[[2]]; We now determine when the range is 3000 ft and use this to write the distance a as a function of the one variable theta. sol = Solve[xrange[a,theta]==3000,a]; dist1[theta_] = a/.sol[[1]]; dist2[theta_] = a/.sol[[2]]; We plot these distances to see what they look like. Plot[{dist1[theta],dist2[theta]},{theta,0, Pi/2}, PlotRange->{{0,1},{0,4000}}, AxesLabel->{"theta","a"}] -Graphics- And we see that many combintations of angle theta and distance a along the above curve would give a path such that the projectile would hit the target at (3000,0). But could we select an angle which would minimize the distance we have to move the catapult and still hit the target at (3000, 0)? In the case where we presume that theta = Pi/4 we got a minimum distance to move the catapult of 918.716 ft if we move to the location (-459.358, Sqrt[3] 459.358) - and we can hit the target from there. But we seek a smaller distance through which we have to move the catapult and still hit the target. d[theta_] = Sqrt[dist1[theta]^2 + (Sqrt[theta] dist1[theta])^2]; Plot[d[theta],{theta,0, Pi/2}] -Graphics- We use the calculus to minimize d[theta]. dd[theta_] = d'[theta]; sol = FindRoot[dd[theta]==0,{theta,.7}] {theta -> 0.698465} dist1[theta]/.sol[[1]]//N 318.464 And we determine the distance the catapult must move in this case. d[theta]/.sol[[1]]//N 415.039 Thus we see that if we pick theta to be 0.703091 (less then Pi/4) and distance a =415.039 ft we only have to move the catapult 718.869 feet up the hill and still be able to hit the target. 415.039 Sqrt[3]//N 718.869 3. (Restatement) How far can we put the target and have it still within range of our catapult? Justify your answer. Based upon the assumption that the angle of elevation with the horizontal we should choose remains Pi/4 radians or 45 degrees no matter if we are on level ground or up the hill we proceed to address this question. Table approach The first table produced in Part 2 showed that we can not only hit the target, we can overshoot it. However, there is a limit to how much we can increase our range by moving back the hill - say with an angle of elevation of Pi/4 radians or 45 degrees. The target will be unreachable beyond this maximum range. Expanding our table from Part 2, we get theta = Pi/4; TableForm[Table[ {k, x[t,k]/. Solve[ y[t,k]==0,t] [[2]] //N }, {k,0,5000,200} ] , TableHeadings->{None,{"x-coord","landing pt"}}] x-coord landing pt 0 2812.5 200 2924.34 400 2987.69 600 3019.93 800 3030.02 1000 3023.3 1200 3003.25 1400 2972.31 1600 2932.23 1800 2884.37 2000 2829.75 2200 2769.2 2400 2703.4 2600 2632.89 2800 2558.14 3000 2479.54 3200 2397.43 3400 2312.09 3600 2223.78 3800 2132.71 4000 2039.08 4200 1943.06 4400 1844.81 4600 1744.46 4800 1642.14 5000 1537.97 This tells we can make a projectile land at (3030, 0) by moving our catapult back and up to (-800, 800 Sqrt[3]). This is close to our maximum range. Even if we move the catapult higher, eventually the effect of gravity will accelerate it toward earth before it has a chance to increase its range. We continue to isolate the optimal placement by focusing in on the interval from 750 to 850. TableForm[Table[ {k, x[t,k]/. Solve[ y[t,k]==0,t] [[2]] //N }, {k,750,850,10} ] , TableHeadings->{None,{"x-coord","landing pt"}}] x-coord landing pt 750 3029.24 760 3029.48 770 3029.68 780 3029.84 790 3029.95 800 3030.02 810 3030.05 820 3030.03 830 3029.98 840 3029.89 850 3029.75 From this table (3030.05, 0) would appear to be the farthest point we could hit on the plane where the enemy camps - assuming we still place our catapult so that its angle of elevation with the horizontal is Pi/4 radians or 45 degrees. We get this range by moving the catapult to position (-810, 810 Sqrt[3]). 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. 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]]; Plot[hitspot[a],{a, 0, 10000}, AxesLabel->{"angle-a","range"}] -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. bestplace=a/.FindRoot[hitspot'[a]==0,{a,1000}] 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.. maxrange=hitspot[bestplace]//N 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. We now consider the more general case of moving the catapult up the hill AND changing the angle of elevation in order to reach the target. Perhaps we can determine a different angle which will still permit us to hit the target AND move the catapult up the hill less than when we fire at an angle of elevation of Pi/4 radians or 45 degrees. 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]; From a plot of xrange[a,theta] we see that there appears to be a maximum range around a = 4,000 and theta = .6 or so. ContourPlot[xrange[a,theta],{a,0,4000},{theta,0,Pi/3}] We proceed to optimize this function of two variables a and theta, using the calculus approach of setting the respective partial derivatives with respect to a and theta equal to 0 and solving for values of a and theta which make these partial derivatives equal to 0. We use our contour plot to obtain an initial starting point for our root finding algorithm. Remove[theta] axrange[a_,theta_] = D[xrange[a,theta],a]; thetaxrange[a_,theta_] = D[xrange[a,theta],theta]; sol = FindRoot[{axrange[a,theta]==0, thetaxrange[a,theta]==0}, {a,2000},{theta,.6}] {a -> 1623.8, theta -> 0.523599} position = {-a, Sqrt[3] a}/.sol//N {-1623.8, 2812.5} distance = Sqrt[position[[1]]^2 + position[[2]]^2]/5280 0.615075 xrange[a,theta]/.sol//N 3247.6 Thus we see that if we move the catapult up the hill to the new position (-1623.81, 2812.5), about 0.61 miles along the hill we could hit the target when it is as far out as 3,247.6 feet. This is the farthest we can expect to go with our catapult as this approach allows us to vary the angle of elevation from the horizontal at which we shoot AND the position along the hill. ISSUES IN SOLUTION This is a complex problem and the common (incorrect) assumption is to assume that even on the hill the angle of elevation with the horizontal is Pi/4 radians or 45 degrees for maximal range. But the student who uses this angle gets good results. However, if the target is moved out as far as the predicted maximum ranges for angle of elevation of Pi/4 radians (i.e., 3030.5 ft, then with a different angle (0.61507 radians) the catapult can hit the target as far out as 3247.6 ft.