Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem #2 (25 points) (10 points) Let the exact solution for a given function t

ID: 3741272 • Letter: P

Question

Problem #2 (25 points)

(10 points) Let the exact solution for a given function to be x =2, but the approximated solution using an computing iterative method was found to be ???=1.9. Calculate the absolute error and the relative error of the approximated function?

B- (10 points) What is the basic concept behinds evaluating the zeros of a function using the bracket method? What are its limitations?

C- (5 points). In computational programming, explain how an iterative algorithm exists the iteration in while loop?

Explanation / Answer

A. Given, the information, True Value = 2, Approximated Value = 1.9

Thus Absolute Error = |Approximated Value - True Value| = |1.90 - 2| = 0.1 [Ans]

Relative Error = (Absolute Error) / True Value = 0.10 / 2 = 0.05 [Ans]

B. What is the basic concept behinds evaluating the zeros of a function using the bracket method? What are its limitations?

When we are given a function that needs to be evaulated to 0 (to find the zeroes of a function) using the bracket method, we first need to solve the expression contained within the brackets first (i.e expressions contained with the brackets gain higher priority as compared to the normal mathematical operators like *, ^, /, +, -, etc). After having solved the bracketed expression, then we can solve the rest of the expression using BODMAS Rule.

eg:- 5 + (5 * (7 + 3)) / 3 = 5 + (5 * (10)) / 3 = 5 + 50 / 3 = 5 + 16.67 = 21.67

Limitations:-

C. In computational programming, explain how an iterative algorithm exits the iteration in while loop?

Say, we want to reverse a number given as input, we will opt for iterative algorithm and show how it can exit the while loop:-

Lets take num = 124.

Iteration 1:- While(124>0) is True, remainder = 4, reverse = 0 + 4 = 4, num = 12

Iteration 2: While (12>0) is True, remainder = 2, reverse = 4*10 + 2 = 42, num = 1

Iteration 3: While (1 > 0) is True, remainder = 1, reverse = 42 * 10 + 1 = 421, num = 0

Thus after the Iteration 3, num becomes 0 and while loop evaluates to false and thus exits.

Please let me know in case of any clarifications required. Thanks!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote