Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Orbital mechanics: bisect vs . false position In orbital mechanics you sometimes need to use root finding to determine trajectories that will get your craft
Orbital mechanics: bisect vs false position
In orbital mechanics you sometimes need to use root finding to determine trajectories that will get your craft to its destination. The roots of
can tell you possible transit times to reach a particular planet from Earth where is the time in years.
Copy the bisect function and modify it to create a false position function. Compute the possible transit times and the number of iterations required to find these times as described below. Use an error tolerance of
You will need to modify both functions to include the number of iterations as a return value from the function. Modify the false position function to add a max iteration parameter. If the number of iterations exceeds the
maximum number of allowed iterations, the algorithm should stop and return the current value for the root.
A Plot the function between and
B Compute the root between and for both methods. Limit the false position method to iterations. Create a table using fprintf with columns: the method, the root specify what the root represents and its
units in the header and the number of iterations to find the root using that method. Display the root with decimal places. Just above the table, use an fprintf statement to display a statement such as: 'Using and
as the bounds'. After the table, explain the difference in the number of iterations between the two methods in text.
C Create the table again but use and as the bounds. Explain the difference in the number of iterations between part and for the False Position method as text.
D Plot all solutions in the figure from part a using:
Bisection part b: red asterisk
False Position part b: red square
Bisection part c: green asterisk
False Position part c: a green square
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started