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

CEB282 - Assignment 2

Issued: 4th September 2018


Due: 18th September 2018
The Assignment is based on Week5 to Week8 topics.

Question 1

(a) Construct a cubic spline interpolation for the curve passing through (2, ½), (4,1/4), (6,1/6)
with cubic spline that satisfies the natural boundary conditions 𝑠’’(𝑎) = 0 and 𝑠’’(𝑏) = 0 for
𝑎 = 2 and 𝑏 = 6.
(b) Change the natural boundary condition to the clamped boundary conditions, that is 𝑠’(𝑎) =
𝑓’(𝑎) and 𝑠’(𝑏) = 𝑓’(𝑏) and find the corresponding cubic spline. ( Hint: 𝑓(𝑥) = 1/𝑥)
(c) Evaluate the value at 𝑥 = 3, using your answers in (a) and (b) separately.

Question 2

Given 𝑦’ = 𝑦 − 𝑥 2 + 1, and 𝑦(0) = 0.5. Find 𝑦(0.4) using RK4 method. Take ℎ = 0.1.

You might also like