Question: x=1; using newton-raphson method tol=0.01,write a c++ program my code is #include #include using namespace std; double f(double x) { return n(x)+sqrt(x)-2; // this is

 x=1; using newton-raphson method tol=0.01,write a c++ program my code is

x=1; using newton-raphson method tol=0.01,write a c++ program

my code is

#include #include using namespace std; double f(double x) { return n(x)+sqrt(x)-2; // this is faulty.how can I write In(x) function correctly.could you fix my code please? } double f1(double x) { return 1/x+1/2*sqrt(x); }

int main () { double x=0; double err; double tol=0.01; while (1) { err=f(x)/f1(x); x=x-err; cout In(1) + V1 -2 = 0

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!