You are on page 1of 1

Units 6-8 - Worksheet1

Name: ID:
2
Q1. For 𝑓(𝑥) = 𝑒 𝑥 , evaluate the following:

a) 𝑓 ′ (0.5) using forward divided difference with 𝑂(ℎ2 ) and ℎ = 0.1.


b) 𝑓 ′ (0.5) with 𝑂(ℎ6 ) and ℎ = 0.1 using Richardson’s extrapolation.
1
c) ∫0 𝑓(𝑥)𝑑𝑥 with Simpson’s 1/3 Rule.
1
d) ∫0 𝑓(𝑥)𝑑𝑥 with Simpson’s 3/8 Rule.
1
e) ∫0 𝑓(𝑥)𝑑𝑥 with 𝑂(ℎ6 ) using Romberg algorithm.

Q2. Given the following ODE:


𝑦′ − 𝑦 + 𝑥 = 3 𝑎𝑛𝑑 𝑦(0) = 0
Find 𝑦(0.5) using ℎ = 0.25 and each of the following methods:
a) Euler
b) 2nd order Taylor series
c) Midpoint
d) Heun’s
e) RK4

Q3. Solve the following BVP using:


𝑦 ′′ + 𝑦 − 𝑥 + 2 = 0
𝑦(0) = 0 𝑎𝑛𝑑 𝑦(0.4) = −1

a) Shooting method (implement Euler algorithm with ℎ = 0.2 and start with the guesses
𝑦 ′ (0) = 0 𝑎𝑛𝑑 𝑦 ′ (0) = 1).

b) Finite difference discretization with ℎ = 0.1.

You might also like