Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following two functions: f(x) = x 3 + 2x 2 + 10x 20, g(x) = x tan x. (a) Write a Matlab or

Given the following two functions: f(x) = x 3 + 2x 2 + 10x 20, g(x) = x tan x.

(a) Write a Matlab or Fortran or C code (in double precision) to apply the Bisection Method to f(x) = 0 on the interval [1, 2]. Find the root to full machine precision. Output your final computed root and the number of iterations required to obtain it.

(b) Modify your code such that it will stop when the function value at the computed root is less than 105 . Again, output your final computed root and the number of iterations required to obtain it. Are the results same as those of Question (a)?

(c) Write another Matlab or Fortran or C code (in double precision) to implement Newtons Method for finding the zero of g(x) that is closest to 99 (radians). Stop the computation when two successive iterates differ by 106 . Output your final computed root and the number of iterations required to obtain it. (Hint: Extremely accurate starting values are needed for this function. You may want to use the computer to construct a table of values of g(x) around 99 to see the behavior of this function.)

(d) Maple and Matlab have built-in programs to solve nonlinear equations. Maples program is fsolve and Matlabs is fzero. Try both programs on the functions f(x) and g(x). If you do not know how to use the built-in programs, type: ?fsolve in Maple and type: help fzero in Matlab to see the help pages.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

Students also viewed these Databases questions

Question

How is operations performance judged at a strategic level? Plo8

Answered: 1 week ago

Question

Explain all drawbacks of the application procedure.

Answered: 1 week ago

Question

Determine Leading or Lagging Power Factor in Python.

Answered: 1 week ago