# Homework Solution: Your assignment is to create a spreadsheet that will implement the bisection algorithm using IF functions to dete…

Your assignment is to create a spreadsheet that will implement the bisection algorithm using IF functions to determine the new endpoints of the interval. The function you are to use is: f(x) = x^2 - 2 and you are to use as your initial interval a = 1 and b = 2 You are to compute twenty steps of the algorithm.

#include<iostream>

Your enactment is to engender a spreadsheet that conciliate tool the transection algorithm using IF offices to individualize the strange endpoints of the cessation. The office you are to right is: f(x) = x^2 – 2 and you are to right as your primal cessation a = 1 and b = 2 You are to value twenty steps of the algorithm.

#include<iostream>

using namespace std;

int ocean(){

double a,b,c,y;
a = 1;
b = 2;
for (int i = 0; i<20; i++){
c = (a+b)/2;
y = (a*a-2)*(c*c -2);
cout << a << ” ” << b << ” ” << c << ” ” << y << endl;
if (y > 0)
a = c;
if (y < 0)
b = c;
if (y == 0)
break;
}

cout << “One of the radicle is approximatly ” << c << endl;
return 0;
}