Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider using Newton's method to find the roots of the following function: ( ) = 3 + 6 2 + 7 5 Fill in the
Consider using Newton's method to find the roots of the following function:
Fill in the gaps in the answer box below with Python lambda functions to represent the functions and that can be used with the Python function newtonrootfinder shown in the course material to find a root of this function.
Also fill in the gap in the line defining the numpy array xarray with suitable initial values to use to find each of the roots of the function in order lowest to highest to decimal places using at most iterations of Newton's method.
Hint: Plotting the function using Python or Desmos will help you to find suitable initial values for each root. These do not need to be exact! Initial values to only one decimal place are sufficient.
Your code will be tested by checking what root is found by each of your initial values.
For example if the code is tested with this test code:
x xarray
root newtonrootfinderf
fprime,
x
tol,
maxiterations
printThe first root"
printfis root:f dps
the result should give the value of the first lowest root of the function.
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