You are on page 1of 5

Cubic spline interpolation calculator https://atozmath.com/CONM/CubicSpline.aspx?q1=4050%2c4613%2...

Ver esta página en: Español Traducir Desactivar para: Inglés Opciones ▼

NOW
PLAYING

We use cookies to improve your experience on our site and to show you relevant advertising. By browsing this website, you agree to our use of cookies. Learn more Accept

Support us
I want to sell my website www.AtoZmath.com with complete code
Seleccionar idioma
Con la tecnología de Traductor

Try our new - Enter problem or search problem


Home What's new College Algebra Games Feedback About us
Algebra Matrix & Vector Numerical Methods Statistical Methods Operation Research Word Problems Calculus Geometry Pre-Algebra

Home > Numerical methods calculators > Cubic spline interpolation calculator

Method and examples


Cubic spline interpolation

Type your data, for seperator you can use space or tab
for sample click random button
4050 100
4613 500
5455 1000
6260 1500
6989 2000
7720 2500
8440 3000
OR

Rows : 11 Generate

X Y
4050 100
4613 500
5455 1000
6260 1500
6989 2000
7720 2500
8440 3000
9169 3500
9890 4000
10730 4500
11656 5000

y( 1.5 )
y'( 2 )
Find New Random

Mode = Decimal
Decimal Place = 2
Solution Help

Solution will be displayed step by step (In 3 parts)


Solution

Calculate Cubic Splines


X 4050 4613 5455 6260 6989 7720 8440 9169 9890 10730 11656
Y 100 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
y(1.5), y'(2)

Solution:
x 4050 4613 5455 6260 6989 7720 8440 9169 9890 10730 11656

1 of 5 11/11/2021, 09:08
Cubic spline interpolation calculator https://atozmath.com/CONM/CubicSpline.aspx?q1=4050%2c4613%2...

Cubic spline formula is

(x i - x ) 3 (x - x i - 1 ) 3 (x i - x ) (x - xi - 1 )
f(x) =
6h
Mi - 1 +
6h
Mi +
h (
yi - 1 -
h2
6 )
Mi - 1 +
h ( yi -
h2
6 )
M i → (1)

6
We have, M i - 1 + 4M i + M i + 1 =
h2
(yi - 1 - 2yi + yi + 1 ) → (2)
Here h = 563, n = 10

M 0 = 0, M 10 = 0

Substitute i = 1 in equation (2)

6
M 0 + 4M 1 + M 2 =
h2
(y0 - 2y1 + y2 )
6
⇒ 0 + 4M 1 + M 2 = ⋅ (100 - 2 ⋅ 500 + 1000)
316969

⇒ 4M 1 + M 2 = 0
y 100 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Substitute i = 2 in equation (2)

6
M 1 + 4M 2 + M 3 =
h2
(y1 - 2y2 + y3 )
6
⇒ M 1 + 4M 2 + M 3 = ⋅ (500 - 2 ⋅ 1000 + 1500)
316969

⇒ M 1 + 4M 2 + M 3 = 0

Substitute i = 3 in equation (2)

6
M 2 + 4M 3 + M 4 =
h2
(y2 - 2y3 + y4 )
6
⇒ M 2 + 4M 3 + M 4 = ⋅ (1000 - 2 ⋅ 1500 + 2000)
316969

⇒ M 2 + 4M 3 + M 4 = 0

Substitute i = 4 in equation (2)

6
M 3 + 4M 4 + M 5 =
h2
(y3 - 2y4 + y5 )
6
⇒ M 3 + 4M 4 + M 5 = ⋅ (1500 - 2 ⋅ 2000 + 2500)
316969

⇒ M 3 + 4M 4 + M 5 = 0

Substitute i = 5 in equation (2)

6
M 4 + 4M 5 + M 6 =
h2
(y4 - 2y5 + y6 )
6
⇒ M 4 + 4M 5 + M 6 = ⋅ (2000 - 2 ⋅ 2500 + 3000)
316969

⇒ M 4 + 4M 5 + M 6 = 0

Substitute i = 6 in equation (2)

6
M 5 + 4M 6 + M 7 =
h2
(y5 - 2y6 + y7 )
6
⇒ M 5 + 4M 6 + M 7 = ⋅ (2500 - 2 ⋅ 3000 + 3500)
316969

⇒ M 5 + 4M 6 + M 7 = 0

Substitute i = 7 in equation (2)

6
M 6 + 4M 7 + M 8 =
h2
(y6 - 2y7 + y8 )
6
⇒ M 6 + 4M 7 + M 8 = ⋅ (3000 - 2 ⋅ 3500 + 4000)
316969

⇒ M 6 + 4M 7 + M 8 = 0

Substitute i = 8 in equation (2)

6
M + 4M + M ( 2 + )

2 of 5 11/11/2021, 09:08
Cubic spline interpolation calculator https://atozmath.com/CONM/CubicSpline.aspx?q1=4050%2c4613%2...

( )

6
⇒ M 7 + 4M 8 + M 9 = ⋅ (3500 - 2 ⋅ 4000 + 4500)
316969

⇒ M 7 + 4M 8 + M 9 = 0

Substitute i = 9 in equation (2)

6
M 8 + 4M 9 + M 10 =
h2
(y8 - 2y9 + y10 )
6
⇒ M 8 + 4M 9 + 0 = ⋅ (4000 - 2 ⋅ 4500 + 5000)
316969

⇒ M 8 + 4M 9 = 0

+ Solving these 9 equations using elimination method

M 7 + 4M 8 + M 9 = y 7 - 2y 8 + y 9
h2

Substitute i = 1 in equation (1), we get cubic spline in 1 st interval x 0, x 1 = [4050, 4613] [ ]


(x1 - x )3 (x - x0 )3 (x1 - x ) (x - x 0 )
f 1(x) =
6h
M0 +
6h
M1 +
h (
y0 -
h2
6
M0 +
) h ( y1 -
h2
6
M1
)
f 1(x) =
(4613 - x) 3
3378
⋅0+
(x - 4050) 3
3378
⋅0+
(4613 - x)
563 ( 100 -
316969
6
⋅0 +
) (x - 4050)
563 ( 500 -
316969
6
⋅0
)
f 1(x) = 0.71x - 2777.44, for 4050 ≤ x ≤ 4613

Substitute i = 2 in equation (1), we get cubic spline in 2 nd interval x 1, x 2 = [4613, 5455] [ ]


(x2 - x )3 (x - x1 )3 (x2 - x ) (x - x 1 )
f 2(x) =
6h
M1 +
6h
M2 +
h (
y1 -
h2
6
M1 +
) h ( y2 -
h2
6
M2
)
f 2(x) =
(5455 - x) 3
3378
⋅0+
(x - 4613) 3
3378
⋅0+
(5455 - x)
563 ( 500 -
316969
6
⋅0 + ) (x - 4613)
563 ( 1000 -
316969
6
⋅0 )
f 2(x) = 0.89x - 3349.02, for 4613 ≤ x ≤ 5455

Substitute i = 3 in equation (1), we get cubic spline in 3 rd interval x 2, x 3 = [5455, 6260] [ ]


(x3 - x )3 (x - x2 )3 (x3 - x ) (x - x 2 )
f 3(x) =
6h
M2 +
6h
M3 +
h (
y2 -
h2
6
M2 +
) h ( y3 -
h2
6
M3
)
f 3(x) =
(6260 - x) 3
3378
⋅0+
(x - 5455) 3
3378
⋅0+
(6260 - x)
563 ( 1000 -
316969
6
⋅0 +) (x - 5455)
563 (1500 -
316969
6
⋅0 )
f 3(x) = 0.89x - 3414.74, for 5455 ≤ x ≤ 6260

Substitute i = 4 in equation (1), we get cubic spline in 4 th interval x 3, x 4 = [6260, 6989] [ ]


(x4 - x )3 (x - x3 )3 (x4 - x ) (x - x 3 )
f 4(x) =
6h
M3 +
6h
M4 +
h (
y3 -
h2
6
M3 +
) h ( y4 -
h2
6
M4
)
f 4(x) =
(6989 - x) 3
3378
⋅0+
(x - 6260) 3
3378
⋅0+
(6989 - x)
563 ( 1500 -
316969
6
⋅0 +
) (x - 6260)
563 (2000 -
316969
6
⋅0
)
f 4(x) = 0.89x - 3617.23, for 6260 ≤ x ≤ 6989

Substitute i = 5 in equation (1), we get cubic spline in 5 th interval x 4, x 5 = [6989, 7720] [ ]

3 of 5 11/11/2021, 09:08
Cubic spline interpolation calculator https://atozmath.com/CONM/CubicSpline.aspx?q1=4050%2c4613%2...

(x5 - x )3 (x - x4 )3 (x5 - x ) (x - x 4 )
f 5(x) =
6h
M4 +
6h
M5 +
h (y4 -
h2
6
M4 +
) h ( y5 -
h2
6
M5
)
f 5(x) =
(7720 - x) 3
3378
⋅0+
(x - 6989) 3
3378
⋅0+
(7720 - x)
563 ( 2000 -
316969
6
⋅0 +
) (x - 6989)
563 (2500 -
316969
6
⋅0
)
f 5(x) = 0.89x - 3610.12, for 6989 ≤ x ≤ 7720

Substitute i = 6 in equation (1), we get cubic spline in 6 th interval x 5, x 6 = [7720, 8440] [ ]


(x6 - x )3 (x - x5 )3 (x6 - x ) (x - x 5 )
f 6(x) =
6h
M5 +
6h
M6 +
h (y5 -
h2
6
M5 +
) h ( y6 -
h2
6
M6
)
f 6(x) =
(8440 - x) 3
3378
⋅0+
(x - 7720) 3
3378
⋅0+
(8440 - x)
563 ( 2500 -
316969
6
⋅0 + ) (x - 7720)
563 (3000 -
316969
6
⋅0 )
f 6(x) = 0.89x - 3658.97, for 7720 ≤ x ≤ 8440

Substitute i = 7 in equation (1), we get cubic spline in 7 th interval x 6, x 7 = [8440, 9169] [ ]


(x7 - x )3 (x - x6 )3 (x7 - x ) (x - x 6 )
f 7(x) =
6h
M6 +
6h
M7 +
h (y6 -
h2
6
M6 +
) h ( y7 -
h2
6
M7
)
f 7(x) =
(9169 - x) 3
3378
⋅0+
(x - 8440) 3
3378
⋅0+
(9169 - x)
563 ( 3000 -
316969
6
⋅0 + ) (x - 8440)
563 (3500 -
316969
6
⋅0 )
f 7(x) = 0.89x - 3611.01, for 8440 ≤ x ≤ 9169

Substitute i = 8 in equation (1), we get cubic spline in 8 th interval x 7, x 8 = [9169, 9890] [ ]


(x8 - x )3 (x - x7 )3 (x8 - x ) (x - x 7 )
f 8(x) =
6h
M7 +
6h
M8 +
h (y7 -
h2
6
M7 +
) h ( y8 -
h2
6
M8
)
f 8(x) =
(9890 - x) 3
3378
⋅0+
(x - 9169) 3
3378
⋅0+
(9890 - x)
563 ( 3500 -
316969
6
⋅0 +
) (x - 9169)
563 (4000 -
316969
6
⋅0
)
f 8(x) = 0.89x - 3660.75, for 9169 ≤ x ≤ 9890

Substitute i = 9 in equation (1), we get cubic spline in 9 th interval x 8, x 9 = [9890, 10730] [ ]


(x9 - x )3 (x - x8 )3 (x9 - x ) (x - x 8 )
f 9(x) =
6h
M8 +
6h
M9 +
h (y8 -
h2
6
M8 +
) h ( y9 -
h2
6
M9
)
f 9(x) =
(10730 - x) 3
3378
⋅0+
(x - 9890) 3
3378
⋅0+
(10730 - x)
563 ( 4000 -
316969
6
⋅0 + ) (x - 9890)
563 ( 4500 -
316969
6
⋅0 )
f 9(x) = 0.89x - 2815.28, for 9890 ≤ x ≤ 10730

Substitute i = 10 in equation (1), we get cubic spline in 10 th interval x 9, x 10 = [10730, 11656] [ ]


(x10 - x ) 3 (x - x9 )3 (x10 - x ) (x - x9 )
f 10(x) =
6h
M9 +
6h
M 10 +
h ( y9 -
h2
6
M9 +
) h ( y 10 -
h2
6
M 10
)
f 10(x) =
(11656 - x) 3
3378
⋅0+
(x - 10730) 3
3378
⋅0+
(11656 - x)
563 (4500 -
316969
6
⋅0 + ) (x - 10730)
563 (
5000 -
316969
6
⋅0 )
f 10(x) = 0.89x - 2127.89, for 10730 ≤ x ≤ 11656

4 of 5 11/11/2021, 09:08
Cubic spline interpolation calculator https://atozmath.com/CONM/CubicSpline.aspx?q1=4050%2c4613%2...

Solution provided by AtoZmath.com

Any wrong solution, solution improvement, feedback then Submit Here

Share this solution or page with your friends.

Home What's new College Algebra Games Feedback About us

Copyright © 2021. All rights reserved. Terms, Privacy

5 of 5 11/11/2021, 09:08

You might also like