Question: I want these code to converted in PYTHON. it just a conversion don't make an excuse 1 question policy if u don't want to answer

 I want these code to converted in PYTHON. it just a

conversion don't make an excuse 1 question policy if u don't wantto answer please leave my question will refunded. Problem 10 Composite Trapezoidalrule Question 31: Write a C++ program to evaluate the integral of

f(x) = Vx2 +1 over [0,2] with 10 subintervals using the Composite

I want these code to converted in PYTHON. it just a conversion don't make an excuse 1 question policy if u don't want to answer please leave my question will refunded.

Problem 10 Composite Trapezoidal rule Question 31: Write a C++ program to evaluate the integral of f(x) = Vx2 +1 over [0,2] with 10 subintervals using the Composite Trapezoidal rule. #include #include using namespace std; int main() intniji double h , sum , I , x0, xn, xc, fxo, fxn, fxc; - // //-- Input Section cout> XO cout> xn cout>n; -- // Processing Section h = (x - x0); // finding step size fx0 = sqrt(x0*x0 + 1); fxn = sqrt(xnxn + 1); I = fxo + fxn; x = x0 ; sum = 0.0 ; for(j=1 ; j #include using namespace std; #define N 100 // maximum number of iterations int main() { int k ; double xn, xp, fxpdfxp ; cout> xn; Processing Section -- // for (k=1 ; k #include using namespace std; #define TOL 0.000001 #define N 100 // error tolerance Il maximum number of iterations int main() { intk; double x0, xn, xp, fxpdfxp , err: cout> XO: xn = 0; Processing Section for ( k=1 ; k #include using namespace std; #define TOL 0.000001 // error tolerance #define N 100 // maximum number of iterations double fval double x) 1 double y = 4*x + sin(x) - exp(x); return y; } // Evaluating f(x) double dfval(double x) { double y = 4 + cos(x) - exp(x); return y } // Evaluating f'(x) int main() { int k ; double x0, xn, xp, fxpdfxp , err; cout> XO; xn = x; Processing Section -1/ for (k=1 ; k #include using namespace std; int main() intniji double h , sum , I , x0, xn, xc, fxo, fxn, fxc; - // //-- Input Section cout> XO cout> xn cout>n; -- // Processing Section h = (x - x0); // finding step size fx0 = sqrt(x0*x0 + 1); fxn = sqrt(xnxn + 1); I = fxo + fxn; x = x0 ; sum = 0.0 ; for(j=1 ; j #include using namespace std; #define N 100 // maximum number of iterations int main() { int k ; double xn, xp, fxpdfxp ; cout> xn; Processing Section -- // for (k=1 ; k #include using namespace std; #define TOL 0.000001 #define N 100 // error tolerance Il maximum number of iterations int main() { intk; double x0, xn, xp, fxpdfxp , err: cout> XO: xn = 0; Processing Section for ( k=1 ; k #include using namespace std; #define TOL 0.000001 // error tolerance #define N 100 // maximum number of iterations double fval double x) 1 double y = 4*x + sin(x) - exp(x); return y; } // Evaluating f(x) double dfval(double x) { double y = 4 + cos(x) - exp(x); return y } // Evaluating f'(x) int main() { int k ; double x0, xn, xp, fxpdfxp , err; cout> XO; xn = x; Processing Section -1/ for (k=1 ; k

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!