---
title: "Natural cubic spline: y(4.5)"
subject: "Numerical Method"
chapter: 4
key: "semester_4/numerical_method:spline-4-5"
source: https://www.bctengineer.com/q/semester_4/numerical_method/spline-4-5
site: BCT Engineering
---

# Natural cubic spline: y(4.5)

Numerical Method · Chapter 4: Interpolation

- Asked in: 2073 Magh, 8 marks
- Video: [Natural Cubic Spline Interpolation Example | Numerical Methods](https://www.youtube.com/watch?v=yOUst2672qo) — StudySession
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/spline-4-5
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-4

## Question

Estimate y(4.5) from the following data using Natural Cubic Spline Interpolation technique.
| x | 1 | 3 | 5 | 7 | 9 |
|---|---|---|---|---|---|
| y | 10 | 12 | 11 | 13 | 9 |

## Short answer

For the natural cubic spline with h = 2, solve M0 = 0, M1 = -1.6875, M2 = 2.25, M3 = -2.8125, M4 = 0. Evaluating the spline on [3,5] at x = 4.5 gives y(4.5) approximately 11.0215.

## Answer

A natural cubic spline is a piecewise cubic S(x) that passes through all data points, has continuous first and second derivatives at the interior knots, and has zero second derivative at the end points (M₀ = Mₙ = 0).

#### Step 1: Setup

Points: n = 4 intervals, equal spacing h = 2. Let Mᵢ = S″(xᵢ), with M₀ = M4 = 0.

For equal spacing the continuity of S′ at each interior knot gives

```text
M(i−1) + 4Mi + M(i+1) = (6/h²)(y(i+1) − 2yi + y(i−1)),   i = 1 … 3
```

With 6/h² = 1.5:

```text
4M1 + M2 = 1.5 × (11 − 2(12) + 10) = -4.5000
M1 + 4M2 + M3 = 1.5 × (13 − 2(11) + 12) = 4.5000
M2 + 4M3 = 1.5 × (9 − 2(13) + 11) = -9.0000
```

Solving these simultaneous equations (elimination) gives

```text
M₀ = 0, M1 = -1.6875, M2 = 2.2500, M3 = -2.8125, M4 = 0
```

#### Step 2: Spline on the interval [3, 5]

```text
S(x) = Mi(x(i+1) − x)³/(6h) + M(i+1)(x − xi)³/(6h)
       + (yi/h − Mi·h/6)(x(i+1) − x) + (y(i+1)/h − M(i+1)·h/6)(x − xi)
```

Here i = 1, x = 4.5: x2 − x = 0.5000, x − x1 = 1.5000, M1 = -1.6875, M2 = 2.2500.

```text
S(4.5) = (-1.6875)(0.5000)³/12 + (2.2500)(1.5000)³/12
          + (6.5625)(0.5000) + (4.7500)(1.5000)
        = -0.0176 + 0.6328 + 3.2812 + 7.1250
        = 11.0215
```

**Answer: y(4.5) ≈ 11.0215**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which end condition defines a natural cubic spline?
   A. First derivative is zero at both ends
   B. Third derivative is zero
   C. y is zero at both ends
   D. Second derivative is zero at both ends
   Answer: D. M0 = Mn = 0. (Key point: Natural spline conditions)

2. For equal spacing h, interior knots give M(i-1) + 4Mi + M(i+1) equal to what?
   A. (6/h^2)(y(i+1) - 2yi + y(i-1))
   B. (h^2/6)(y(i+1) - y(i-1))
   C. 6h(y(i+1) - yi)
   D. y(i+1) + yi
   Answer: A. Continuity of S' gives this tridiagonal system. (Key point: System for Mi)

3. Which interval's cubic is used to estimate y(4.5)?
   A. [3, 5]
   B. [7, 9]
   C. [1, 3]
   D. [5, 7]
   Answer: A. 4.5 lies between x1 = 3 and x2 = 5. (Key point: Interval choice)

4. What is y(4.5)?
   A. About 13.00
   B. About 11.02
   C. About 12.00
   D. About 10.00
   Answer: B. The two cubic and two linear terms sum to 11.0215. (Key point: Result)

## Close variants set in other exams

- [Natural cubic spline: y(6.5)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-5-7-9-11) — Numerical Method, chapter 4, asked 3×
- [Natural cubic spline: y(0.5)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-y-0-5) — Numerical Method, chapter 4, asked 3×

## Related in Numerical Method

- [Natural cubic spline: y(8)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-find-y-8) — Numerical Method, chapter 4
- [Cubic spline and its advantage](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Acubic-spline-advantage) — Numerical Method, chapter 4

## Related in other subjects

- [K-map Σ(1,2,3,8,9,10,11,13,14)+d, POS](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-pos-form-12389) — Digital Logic, chapter 3
- [Interpolation versus approximation spline](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Ainterpolation-vs-approximation-spline) — Computer Graphics, chapter 5, asked 2×
- [K-map ΠM(0,2,3,8,10,11,12,15)+d, NOR](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-maxterm-nor-0238) — Digital Logic, chapter 3
- [Uniform cubic B-spline segment points](https://www.bctengineer.com/question.md?key=semester_4%2Fcomputer_aided_design%3Auniform-cubic-bspline-numerical) — Computer Aided Design, chapter 3
