Professional Documents
Culture Documents
P8
P8
//Newton-Raphson Method
#include<iostream>
#include<cmath>
#include<iomanip>
double f(double x); //declare the function for the given equation
double a=cos(x)-2*x; //write the equation whose roots are to be found out
return a;
double fprime(double x)
return b;
int main()
double x,x1,e,fx,fx1,d;
cout.setf(ios::fixed);
cin>>d;
cin>>e;
fx=f(x);
fx1=fprime(x);
do
x1*/
return 0;