Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the python code below as an example to solve the following Integral: I/IO =1/8*[2C(u) + 1]^2 + [2S(u) + 1]^2 where u = x*sqrt(2/z),

Use the python code below as an example to solve the following Integral: I/IO =1/8*[2C(u) + 1]^2 + [2S(u) + 1]^2

where u = x*sqrt(2/z), C(u) = cos(t^2/2), S(u) = sin(t^2/2) and x in range(0,5)

-----------------------------------------------------------

from gaussxw import gaussxw def f(x): return x**4 - 2*x + 1 N = 3 a = 0.0 b = 2.0 # Calculate the sample points and weights, then map them # to the required integration domain x,w = gaussxw(N) xp = 0.5*(b-a)*x + 0.5*(b+a) wp = 0.5*(b-a)*w # Perform the integration s = 0.0 for k in range(N): s += wp[k]*f(xp[k]) print(s)

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions