Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Numerical analysis I, Spring 2024 February 21, 2024

01:640:373 Homework assignment 6

1 Problems 2,4 (4.4) from the textbook[10 points]


Use the Composite Trapezoidal rule and Composite Simpson’s rule with the indicated values n to
approximate the following integrals.
R 0.5
(a) −0.5 (cos(x))2 dx, n = 4,
R 0.5
(b) −0.5
x log(x + 1) dx, n = 6.

2 Problem 12 (4.4) from the textbook[10 points]


Determine the values of n and h required to approximate
Z π
x2 cos(x) dx
0

to within 10−4 . Use Composite Trapezoidal rule and Composite Simpson’s rule.

3 Problem 2 (d) (4.5) from the textbook[10 points]


Use the Romberg integration to compute R3,3 for the integral
Z 2e
1
dx.
e x log(x)

4 Problem 6 (4.5) from the textbook[10 points]


R1
Use Romberg integration to approximate the integral −1 (cos(x))2 dx to within 10−6 . Compute
the Romberg table until either |Rn−1,n−1 − Rn,n | < 10−6 or n = 10. Compare the result with the
actual value of the integral.

5 Problem 10 (4.5) from the textbook[10 points]


Romberg integration is used to approximate
Z 1
x2
dx.
0 x3 + 1

If R1,1 = 0.25 and R2,2 = 0.2315 what is R2,1 ?

1
6 Sample exam question[10 points]
You are given the following table of the values of some unknown function f .

x f (x)
3.2 0.2
3.3 0.4
3.4 ?
3.5 0.9
3.6 ?
3.7 1.7

(a) Use Trapezoidal Rule to approximate the value of


Z 3.3
xf (x) dx.
3.2

(b) One applied Three–Points Midpoint Rule with h = 0.1 to approximate f ′ (3.3). The result was
1.0. Find f (3.4).
R 3.7
(c) One applied Simpson’s Rule to approximate 3.5 f (x) dx. The result was 0.5. Find f (3.6).

7 Programming exercise[15 points]


Write the program which compute the approximate value of the length of the curve given by the
parametric equation
γ(t) = (x(t), y(t)), t ∈ [a, b].
Suppose that the functions x, y, and a, b are given. Apply your program to find the approximate
the length of:
(a) segment γ(t) = (t, t), t ∈ [0, 1],

(b) parabola γ(t) = (t, t2 ), t ∈ [0, 1],


(c) circle γ(t) = (sin(t), cos(t)), t ∈ [0, 2π],
(d) cycloid γ(t) = (1 − sin(t), 1 − cos(t)), t ∈ [0, 2π].

You might also like