SMA3116 Tutorial 2 2024
SMA3116 Tutorial 2 2024
x 0 1 2 4
f(x) 1 3 4 5
x 0 1 2 -1 3
f(x) -1 -1 -1 -7 5
(c) Determine the Lagrange form of the cubic interpolating function for the given
discrete function with
using Simpson’s rule with h = 1/4. Give the bound on the error.
(f) Use the Bisection method to find the solution x∗ of
x = 2−x
correct to an accuracy of 10−2 , where x∗ ∈ [0, 1]. How many iterations are
needed to achieve an accuracy of 10−9
(g) Apply the Secant method to approximate the positive solution(s) of
3x2 = ex
to within 10−4 .
1
(h) Solve the following system of equations by the LU decomposition method:
3x + 5y + z = 9
9x + 17y + 3z = 29
12x + 24y + 13z = 49
(i) Obtain the Euler approximation to the solution of the initial value problem
′
y = 2y, y(0) = 1
on the interval [0,0.15], using h = 0.05. Compare your results with the analytic
solution.
(j) Solve the following initial value problem
′
y (x) = 1 + xy 2 , y(0) = 1
′′′ 1
f (x) ≈ [f (x + 2h) − 2f (x + h) + 2f (x − h) − f (x − 2h)]
2h3
and determine the error term.
4. Apply Gaussian Elimination method with scaled partial pivoting to solve the system
2x + y + z + 3w = 7
x + 4y + 3z + w = 9
2x − y − 5z + w = −3
3x − 4y + 2z + 8w = 9
2
5. Apply four iterations of the Gauss-Seidel iteration method, using x0 = y0 = z0 = 1
as initialization, to solve the following system:
10x − y − z = 13
x + 10y + 3z = 36
−x − y + 10z = 35
6. Assume an elastic string with fixed ends is plucked like a guitar string. The gov-
erning equation for u(x, t), the position of the string from its equilibrium position,
is the wave equation
∂2 1 ∂2
u(x, t) = u(x, t) 0 < x < π, 0<t
∂t2 9 ∂x2
with boundary conditions u(0, t) = 0, u(π, t) = 0, t > 0 and initial conditions
∂
u(x, 0) = sin(2x), 0 < x < π and ∂t u(x, 0) = 0, 0 < x < π. Determine u(x, t).
”Essentially all models are wrong, but some are useful”– George Box