Sie sind auf Seite 1von 2

ESO 208A: Computational Methods in Engineering

Tutorial 10

Numerical Integration
8 𝑙𝑛 𝑥
1. Solve the integral ∫1 𝑑𝑥 numerically using 5 points in the interval by,
𝑥

a) Trapezoidal rule, b) Simpson’s 1/3 rule, c) Gaussian Quadrature, d) compute the %error in
each of the three cases.

2. Estimate the following integral by using


(a) O(h8) Romberg integration and determine true and approximate percentage errors;
(b) two- and three-point Gauss-Legendre formulae and determine true percentage error.
2

 xe
−x
I= dx
−2

3. Estimate the following improper integral


 xe
−x
I= dx
−2
Practice Problems
r0
4. The flow rate through a circular pipe is given by Q =  2 r v dr , where v is the velocity at a distance
0
of r from the centre of pipe and r0 is the radius of the pipe. If the velocity is approximated by
1/ 7
 r
v = 2  1 −  (in m/s), and the pipe radius is 12 cm, compute Q using (a) trapezoidal rule with h = 2
 r0 
cm; (b) Simpson’s one-third rule with h = 3 cm; (c) Simpson’s three-eighth rule with h = 4 cm; and (d) 3-
point Gauss-Legendre quadrature. (e) Perform an error analysis for the results obtained in the above
problem, using the true value of the flow rate as 0.0738902 m3/s.

5. Velocity profile in an open channel flow is shown below.


u
z=0

z = z1

z = z2

z z=d

The depth of the channel is d. The velocity at any depth is given by an arbitrary function u(z), graphically
1 d
d 0
shown above. The mean velocity of the channel u is given by u = u( z )dz .

u ( z1 ) + u ( z 2 )
a) Find two constants c1 and c2 such that z1 = c1d, z2 = c2d, and u = .
2

b) The velocities u0, u1, u2 and u3 have been measured at depths of 0.2d, 0.4d, 0.6d and 0.8d, respectively.
Compute 0, 1, 2 and 3 such that the velocity at 0.5d can be expressed as (0u0 + 1u1 + 2u2 + 3u3).

2
6. Show that the trapezoidal rule, with h = is exact for trigonometric polynomials of period 2,
n +1
n
i.e., for functions of the form c e
k =− n
k
ikt
; k integer, when it is used for integration over a whole period.