Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Complete the following questions related to Bracket methods: (a) Write a function to perform the Bisection method for any scalar nonlinear equation f(x)

2. Complete the following questions related to Bracket methods: (a) Write a function to perform the Bisection

2. Complete the following questions related to Bracket methods: (a) Write a function to perform the Bisection method for any scalar nonlinear equation f(x) = 0. The inputs to your function should be: a function that calculates the nonlinear equation, the endpoints of the bracketing region, a convergence tolerance and a maximum number of iterations. The function should output the approximate root and the number of iterations. Your function should include an error check to make sure that the bracketing region is valid (a root exists). As an error measure, use both a which is related to the length of the bracketing region and ef which is related to the value of f(r). Both are defined in the problem above. Thoroughly comment your code to show you know what you are doing. (b) Write a function to perform the False Position method for any scalar nonlinear equation f(x) = 0. The instructions for this function are the same as for the Bisection method (see above). (e) Use both of your developed functions in (a) and (b) to complete the following problem: The upward velocity of a rocket can be computed by mo mo-qt, v = u In gt where v upward velocity, u = the velocity at which fuel is expelled relative to the rocket, mo = the initial mass of the rocket at time t = 0, q = the fuel consumption rate, and the downward gravitational acceleration g = 9.81 [m/s]. If u = 1800 [m/s], mo = 160000 [kg], and q = 2600 [kg/s], compute the time at which v= 750 [m/s]. Note: t is somewhere between 10 and 50 [s]. Use a convergence tolerance of 1 x 10-5. In addition, calculate the value of f(x) at the root to show that it is indeed a root of the problem.

Step by Step Solution

3.29 Rating (149 Votes )

There are 3 Steps involved in it

Step: 1

a Heres a Python function to perform the Bisection method def bisectionf a b tol1e5 maxiter100 Perform the Bisection method to find the root of fx 0 i... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Methods With Chemical Engineering Applications

Authors: Kevin D. Dorfman, Prodromos Daoutidis

1st Edition

1107135117, 978-1107135116

More Books

Students also viewed these Programming questions

Question

Let a, b, c, x R. Compute et a,b,c,x e R. Compate. la la+x x x x2

Answered: 1 week ago

Question

Cu l es la altura m nima de un rbol binario con 1 nodos?

Answered: 1 week ago