Question: Finding the root of a polynomial equation. Please write answer in Java! Problem D. (20 pts) To find a root of a polynomial equation, we

 Finding the root of a polynomial equation. Please write answer in

Finding the root of a polynomial equation. Please write answer in Java!

Problem D. (20 pts) To find a root of a polynomial equation, we can use an iterative process. We start with an initial guess for the value of the root. Xo plug it in to the iterative formula and solve for X]. Then we plug x; back into the iterative formula and solve for X2. We continue this process until Xm-1 and Xn are equal to a specified number of decimal places. When this happens, this is our approximate solution to the polynomial equation. We will be solving for a root of a cubic equation: f(x,) = c3 x + c2 x 2 + cl xn + c0 where c3, c2,cl and co are the coefficients of each polynomial term. The iterative formula we will use is: Xn+1 = xn-(f(x) / f '(x)) where f '(x) is the derivative of f(x) Define a public static method named cubicRoot that accepts the coefficients of the cubic equation and an initial guess for the root This method computes and returns a root of the cubic equation by using the iterative process described below (you must use a while loop): 1. Start with the guess for the root passed to the method as Xn 2. Compute Xx-1 using the formula above Note: you can write the equation for the derivative in terms of the coefficients, exponents and x terms. 3. Compare X, and X, i if these are equal within 4 decimal places, then return the value ii. If not, Xn should be updated - repeat Step 2

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!