Question: You are to write a program that will find a root of a cubic polynomial. A cubic polynomial is of the form: You should write

You are to write a program that will find a root of a cubic polynomial. A cubic polynomial is of the form:

VOHA3G+n0dgAR+mQO3s9WUb9BuL6J8iAv8jAv8Ar

You should write a program that takes in the coefficients of the polynomial: A, B, C, and D, along with a bound on one single root: a,b. The user should be expected to input a and b such that a<b and there is exactly one single root of the polynomial between a and b. You should report the value of the root, accurate to within 10-6.

you should create a program that performs bisection to determine the root. More specifically, your program should do the following:

  • Read in the coefficients of the polynomial from the user
  • Read in the upper and lower bounds around a single root of the polynomial
  • Determine the value of that root to within 10-6
  • Print the result of that root finding, as a single number
  • Print out how many iterations it took to find that root.

Be sure to include comments in your code.

PYTHON


 

f(x)= Ax + Bx + Cx + D 3 2 f(x)= Ax + Bx + Cx + D 3 2

Step by Step Solution

3.44 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

CODE def funcA B C D x return Axxx Bxx Cx D Prints root of funcx with er... View full answer

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 Computer Engineering Questions!