Question: Q . Consider the following polynomial with a real variable, x ; p ( x ) = 3 x 3 - 5 x 2 -
Q Consider the following polynomial with a real variable, ;
The polynomial and its root are shown in the figure below.
a points Write a Python function for that takes as a formal
parameter and returns
b points Write a Python function for the derivative of that takes as
a formal parameter and returns the derivative of Take the derivative of
analytically with respect to before writing the function.
c points Write a Python function for root finding using the Newton
Raphson method that takes an initial guess, as a formal parameter, and
returns its root, of such that At each iteration, the function is
expected to print the iteration number, the new guess and the absolute
value of at the guess. Iterations should stop when the absolute value
of at a new guess is less than The function will return that guess
as
d points Write a main program that will get the initial guess, from a
user using the input statement, and call the functions developed earlier as
needed to find the root of the polynomial. It should call the function
developed for question b to find the root. The program is supposed to print
the root right after locating it
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
