Question: Programming in C Question 31 (Programming) A clever COMP 208 the root of a function, f(x) that she thinks will converge faster than the bisection
Question 31 (Programming) A clever COMP 208 the root of a function, f(x) that she thinks will converge faster than the bisection method. We can call this method the trisection method. The description of the algorithm follows: student has proposed a modification of the bisection method for finding Start with an interval Io [a,b] such that f(a) and f(b) have different signs. At the k-th step of the iteration, we have [, bk]. We divide this interval into 3 segments with endpoints w = ak, X = ak + Find one of the subintervals over which fchanges sign. Make this the interval I+ Repeat iterating until the length of the interval is less than 0.00001 Return the midpoint of the final interval bk-ak Write a function definition for a function called trisection rf that implements this algorithm. Your function takes three arguments, a function and the endpoints of the initial interval Your function should validate the arguments and make sure that there is a change in sign over the initial interval. If not it should print an error message and return. Note that you do not have to write a program that uses this function, just a definition of the function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
