Root Finding You are to write a program named Lab5a_Act1.py that will find one single root of a cubic polynomial. A cubic polynomial is of the form: f(x) = Ax² + Bx² + Cx + D We are only concerned with single ronts Method for Finding a Single Root: One valid method for finding a single root uses a bisection procedure. With this method, we are trying to find an interval on x such that the root lies in this interval, but the interval width is yery small. So, we are not trying to find a value of x sych that f(x) is exactly zero. Instead, we are trying to find an interval on x which contains the root and Which is of arbitrarily smll width. Let's assume that we know that a single root lies between x = a and x = b. We can express this interval as [a, b]. Let's also assume that we know that a < b so that a lies to the left of b on the x-axis. There are two cases to consider: 1. Case 1: The plotted curve is increasing from left to right. (See Case 1 in figure above/left.) a. Therefore, f(a) is negative and f(b) is positive, provided that neither x = a nor x = b is a root. b. If the interval [a, b] is wider than a specified tolerance, we bisect the interval. This involves finding x = p such that p is halfway between a and b. c. Our new interval will either be [a, p] or [p, b]. How do we choose? d. First, evaluate f(p). i. If f(p) < 0, replace a such that the new interval is [p, b]. i. If f(p) > 0, replace b such that the new interval is [a, p]. e. Note that after the bisection, the interval is half the width of the previous interval. f. Continue this procedure until we find an interval of width < tolerance and specify either of the interval limits as the root. 2. Case 2: The plotted curve is decreasing from left to right. (See Case 2 in figure above/left.) a. Therefore, f(a) is positive and f(b) is negative, provided that neither x = a nor x = b is a root. b. If the interval [a, b] is wider than a specified tolerance, we bisect the interval. This involves finding x = p such that p is halfway between a and b. c. Our new interval will either be [a, p] or [p, b]. How do we choose? d. First, evaluate f (p). i. If f(p) > 0, replace a such that the new interval is [p, b]. i. If f(p) < 0, replace b such that the new interval is [a, p]. e. Note that after the bisection, the interval is half the width of the previous interval. f. Continue this procedure until we find an interval of width < tolerance and specify either of the interval limits as the root.
Root Finding You are to write a program named Lab5a_Act1.py that will find one single root of a cubic polynomial. A cubic polynomial is of the form: f(x) = Ax² + Bx² + Cx + D We are only concerned with single ronts Method for Finding a Single Root: One valid method for finding a single root uses a bisection procedure. With this method, we are trying to find an interval on x such that the root lies in this interval, but the interval width is yery small. So, we are not trying to find a value of x sych that f(x) is exactly zero. Instead, we are trying to find an interval on x which contains the root and Which is of arbitrarily smll width. Let's assume that we know that a single root lies between x = a and x = b. We can express this interval as [a, b]. Let's also assume that we know that a < b so that a lies to the left of b on the x-axis. There are two cases to consider: 1. Case 1: The plotted curve is increasing from left to right. (See Case 1 in figure above/left.) a. Therefore, f(a) is negative and f(b) is positive, provided that neither x = a nor x = b is a root. b. If the interval [a, b] is wider than a specified tolerance, we bisect the interval. This involves finding x = p such that p is halfway between a and b. c. Our new interval will either be [a, p] or [p, b]. How do we choose? d. First, evaluate f(p). i. If f(p) < 0, replace a such that the new interval is [p, b]. i. If f(p) > 0, replace b such that the new interval is [a, p]. e. Note that after the bisection, the interval is half the width of the previous interval. f. Continue this procedure until we find an interval of width < tolerance and specify either of the interval limits as the root. 2. Case 2: The plotted curve is decreasing from left to right. (See Case 2 in figure above/left.) a. Therefore, f(a) is positive and f(b) is negative, provided that neither x = a nor x = b is a root. b. If the interval [a, b] is wider than a specified tolerance, we bisect the interval. This involves finding x = p such that p is halfway between a and b. c. Our new interval will either be [a, p] or [p, b]. How do we choose? d. First, evaluate f (p). i. If f(p) > 0, replace a such that the new interval is [p, b]. i. If f(p) < 0, replace b such that the new interval is [a, p]. e. Note that after the bisection, the interval is half the width of the previous interval. f. Continue this procedure until we find an interval of width < tolerance and specify either of the interval limits as the root.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
5act1 Please help me answer this problem in python
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY