Question: We have a cannon that can fire projectiles with speed var at an angle . What angle should we use to force our cannon to

We have a cannon that can fire projectiles with speed var at an angle . What angle should we use to force our cannon to hit a target that is R meters away. The trajectory of the projectile is given by the equation:
y(x)=xtan-12g(xvarcos)2
The distance R is the location of x when y is zero. So the function to determine the angle given a distance R is:
f()=Rtan-12g(Rvarcos)2
Where var is the velocity (ms),R is the target range (m), is the angle needed to reach the target range (degrees), and g is the gravity (ms2).
What is the angle needed to reach a target 150 meters away if the speed of your projectile is 60ms?
Task 1: Due 11/06 at 11:59 pm
Plot the function to determine the initial interval for closed methods. Use an interval of width 4 degrees. In addition, use the plot to determine the initial guess for open methods. Use the degree nearest the root. For secant do 1 degree less than the initial guess for Newton -Raphson for x-1. Display interval and initial guesses with fprintf.
Using a tolerance of 10-8. Plot the Absolute Percentage Relative Error vs. iteration number for each iteration for all 4 methods on the same plot. There is a plot in lecture notes you can use as a reference. Include title, axis labels and a legend.
For tolerances 10-4,10-6 and 10-8 report how many iterations of each method are required to reach the tolerances.
Discuss which methods are better. Weigh computational effort alongside coding effort.
For 2-4 write your root finding methods as user defined functions at the bottom of your script and call the functions to perform the relevant tasks.
We have a cannon that can fire projectiles with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mechanical Engineering Questions!