Two Equations Applied Equations Newton Raphson Method C Code Code Include Include Using Na Q43883045
there is a two equations.I applied these equations newtonraphson method in c++ code my code is below
#include<iostream>
#include<cmath>
using namespace std;
double f(double x) {
return 53.1187-14.701*log(x)-4849.3/x; // this is myfirst equation
}
double f1(double x) {
return 4849.3/x*x-14.701/x*In(10); // I tried to writesecond equation but there is a error about In(10) how to writeIn(10) functions
}
int main () {
double x=300;
double err;
double tol=0.001;
while (1) {
err=f(x)/f1(x);
x=x-err;
cout<<x<<“”<<err<<” “<<f(x)<<” “<<endl;
if (fabs(err)<tol) break;
}
}
4849.3 Let f(T)= 53.1187- differentiatinga -F’T) = -14701109T=0 wie get 4 849.3 14.701 dLog(T). %3D Tin10 TxLn 10 Show transcribed image text 4849.3 Let f(T)= 53.1187- differentiatinga -F’T) = -14701109T=0 wie get 4 849.3 14.701 dLog(T). %3D Tin10 TxLn 10
Expert Answer
Answer to there is a two equations.I applied these equations newton raphson method in c++ code my code is below #include #include …
OR