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 aconversion don't make an excuse 1 question policy if u don't wantto answer please leave my question will refunded. also convert the remarksection Question 31: Write a C++ program to evaluate the integral off(x) = Vx2 + 1 over [0,2] with 10 subintervals using theComposite Trapezoidal rule. #include #include using namespace std; int main() { int

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.

also convert the remark section

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() { int n,j; double h , sum , 1 , x0, xn, xc, fxo, fxn , fxc; --// Input Section cout> XO; cout> xn; cout>n; 11- Processing Section -- // = // finding step size h (xn - x0) ; fx0 = sqrt(x0*x0 + 1); fxn = sqrt(xn*xn + 1); I = fxO + fxn; XC = x0 ; sum = 0.0 ; for(j=1 ; j using namespace std; #define n 3 // number of unknowns int main() { char quit; int i, j, si double a[n][n] = {{1.7, 2.3, -1.5} , {1.1, 1.6, -1.9}, {2.7, -2.2, 1.5}}; double b[n] = {2.35, -0.94, 2.7} ; // right hand side constant vector double x[n]; double u[n][n], [n][n],y[n], s . Sum ; Processing Section // Formation of Land U as factors of A, i.e., A=LU for (i=0; i=0; i--) (*: = : -) sum = 0.0 ; for(j=i+1 ; j> quit return 0; } Remark: The C++ program in Question 07 can be modified to receive the square matrix and the initial approximation of the Eigenvector at the execution time (instead of fixing in the code). For this, the code segment at lines 13 and 14 in the program of Question 07 should be replaced by the following code segment: cout> a[i][j] cout> b[i]

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!