Question: Please help with this Python problem. I need to round to significant figures and check for error! I have attached the code that I need

Please help with this Python problem. I need to round to significant figures and check for error! I have attached the code that I need help rounding and errors and the specific question. Please please help!

I cannot get chegg to give the correct indentation on the code when I paste it so I just added screenshots.

Please help with this Python problem. I need to round to significant

figures and check for error! I have attached the code that I

need help rounding and errors and the specific question. Please please help!

A) For =8.024x=8.024 and =8.006y=8.006,

  • Round each to three significant figures, giving xa and ya.
  • Compute the absolute errors in each of these approximations, and in their difference as an approximation of xy.
  • Compute the relative errors in each of these three approximations.

[3]: import numpy as np from matplotlib import pyplot as plt from numpy import cos, sin [4]: def f_1(x): return 10 - 2*x + sin(x) [5]: def Df_1(x): return -2 + cos(x) [6]: def newton (f, Df, xe, errorTolerance, maxIterations = 100, demoMode = False): if demoMode: print("Solving by Newton's Morthod.") functionEvaluations = 0 x = xe for iterations in range(1, maxIterations + 1): fx = f(x) Dfx = Df(x) functionEvaluations += 2 dx = fx/Dfx X -- dx errorEstimate = abs(dx) if demoMode: print(f"{iterations=}, {x=} with estimate error {errorEstimate:0.3}, backward error {abs(f(x)):0.3}") if error Estimate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!