Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved 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 want to answer

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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.

bro it just a 4 codes to be converted in python. there will be no work on logic

DTUVICII IV cumpUJIC mapeluruumTuru 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. #includeiostream> #include using namespace std; int main() { int n, double h , sum , I , x0, xn, xc, fxo, fxn, fxc; -1/ //--- Input Section cout>x0; cout> xn; cout>n; // Processing Section h = (xn - x0); // finding step size fx0 = sqrt(xO*x0 + 1); fxn = sqrt(xn*xn + 1); I = fxO + fxn; xc = 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 // maximum number of iterations int main() { intk; double xo, xn, xp , fxp , dfxp , err ; cout> X0; xn = x; Processing Section for (k=1; k #include using namespace std; #define TOL 0.000001 11 error tolerance #define N 100 // maximum number of iterations double fval(double x) { double y = 4*x + sin(x) - exp(x): returny: Il Evaluating f(x) double afval(double x) { double y = 4 + cos(x) - exp(x); return y: } // Evaluating + x) int main() { int k ; double x0, xn, xp, fxp , dfxp , err; cout> XO: xn = x0; Processing Section - // for ( k=1 ; k

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions