Docsity

Interpolating Function: Finding Minimum Energy Configuration, Study notes of Calculus

Toggle sidebar
bg1
Interpolating Using the Variational Method
Adrian Down
March 02, 2006
1 Setup
1.1 Review
We would like to interpolate the values of a function y(x) at the points
(xj, yj), where j∈ { 0, . . . , n }. We require that y0(x) be continuous at each
node xi.y(x) is chosen in minimize the energy of the resulting curve,
E=1
2
xn
x0
(y00)2dx
Write the interpolating polynomial as y=y(x, ). For each ,y(x) inter-
polates (xj, yj) and yx(x, ) is continuous at each xj. Writing the solutions in
this form, the energy becomes a function of ,E(). The condition for min-
imum energy is = 0. We use variational analysis to find the configuration
such that = 0, and we call this configuration Y(x).
1.2 Condition for minimum
We found that the condition for energy minimization is
0 = E0(0) =
n−1
X
j=0
[Y00yx]xj+1 , =0
xj, =0 +
xn
x0
Y0000ydx
Note. •E0refers to dE
d .
•Yrefers to y(x, 0), the solution which we are seeking.
1
pf3
pf4
pf5

Partial preview of the text

Download Interpolating Function: Finding Minimum Energy Configuration and more Study notes Calculus in PDF only on Docsity!

Interpolating Using the Variational Method

Adrian Down

March 02, 2006

1 Setup

1.1 Review

We would like to interpolate the values of a function y(x) at the points

(xj , yj ), where j ∈ { 0 ,... , n }. We require that y

′ (x) be continuous at each

node xi. y(x) is chosen in minimize the energy of the resulting curve,

E =

 (^) x n

x 0

(y

′′ )

2 dx

Write the interpolating polynomial as y = y(x, ). For each , y(x) inter-

polates (xj , yj ) and yx(x, ) is continuous at each xj. Writing the solutions in

this form, the energy becomes a function of , E(). The condition for min-

imum energy is  = 0. We use variational analysis to find the configuration

such that  = 0, and we call this configuration Y (x).

1.2 Condition for minimum

We found that the condition for energy minimization is

0 = E

′ (0) =

n∑− 1

j=

[Y

′′ yx]

xj+1, = xj , =0 +

 (^) x n

x 0

Y

′′′′ ydx

Note. • E

′ refers to

dE d

  • Y refers to y(x, 0), the solution which we are seeking.

• Y

′ refers to

dY dx

  • yx refers to

∂y ∂x

, and likewise for .

2 Recast the summation using continuity

Writing the terms of the summation explicitly,

0 = Y

′′ (x

− 1 )yx(x

− 1 ,^ 0)^ −^ Y^

′′ (x 0 )yx(x 0 , 0)

+ Y

′′ (x

− 2 )yx(x

− 2 ,^ 0)^ −^ Y^

′′ (x

1 )yx(x

1 ,^ 0) +^...

  • Y

′′ (x

− n− 1 )yx(x

− 1 n− 1 )^ −^ Y^

′′ (x

n+2)yx(x

n− 2 ,^ 0)

+ Y

′′ (x

− 1 n )yx

x

− 1 n ,^0

− Y

′′ (x

n− 1 )yx(x

n− 1 ,^ 0)

 (^) x n

x 0

Y

′′′′ yxdx

Since we have assumed continuity of the derivative at each xj ,

yx(xj , ) continuous at xi ⇔ yx(x

− j , ) =^ yx(x

j , )^ ∀^ 

∴ yx

x

− j , 

= yx(x

j , )^ ∀j

Using this fact, we can recast the summation. Most of the terms can be

combined, although there remain terms from the first and last terms of the

original summation,

0 = − Y

′′ (x 0 )yx(x 0 , 0) − [Y

′′ ]

x

1 x

− 1

yx(x 1 , 0) +...

− [Y

′′ ]

x+ n− 1

x

− n− 1

y(x 1 , 0) + Y

′′ (xn)yx(xn, 0) +

xn

x 0

Y

′′′′ ydx

The terms evaluated at boundary points can be encapsulated in a summation,

0 = − Y

′′ (x 0 )yx(x 0 , 0) + Y

′′ (xn)yx(xn, 0)

∑^ n−^1

j=

[Y

′′ ]

x

j x

− j

yx(xj , 0) +

 (^) x n

x 0

Y

′′′′ yxdx

Note. We obtained two other linearly independent polynomials Hˆ and Gˆ by

reflecting across the line y =

a+b 2

Using these basis polynomials, the interpolating polynomial can be writ-

ten,

y(x) = f (a)H(x) + f (b) Hˆ(x) + f

′ (a)G(x) + f

′ (b) Gˆ(x)

Recalling that we are finding an interpolating polynomial in the interval

(xj , xj+1), the interpolating polynomial becomes,

y(x) = Y (xj )H(x) + Y (xj+1) Hˆ(x) + Y

′ (xj )G(x) + Y

′ (xj+1) Gˆ(x)

5 Enforce boundary conditions on Y

5.1 Second derivatives of interpolating polynomials

Y and Y

′ are automatically continuous at each xj with this form of the

interpolating polynomial. We must still impose the following conditions:

• Y

′′ (x 0 ) = 0

• Y

′′ (xn) = 0

• Y

′′ continuous at each xj

Thus we must enforce 1 + 1 + (n − 1) = n + 1 total conditions.

To enforce these conditions, we need the values of the second derivatives

of the basis cubics,

H

H

′′ G

G

′′

x = a −

6 (b−a)^2

6 (b−a)^2

4 b−a

2 b−a

x = b

6 (b−a)^2

6 (b−a)^2

2 b−a

4 b−a

Note. The second derivatives of Hˆ and Gˆ at either endpoint can be obtained

by reflection symmetry from the negatives of the second derivatives of H and

G, respectively, evaluated at the opposite endpoint.

5.2 Y

′′

(x 0 ) = 0

We enforce the boundary conditions y

′′ (x 0 ) = 0 and a = x 0 and b = x 1 ,

y

′′ (x 0 ) = Y (x 0 )

(b − a)^2

  • Y (x 1 )

(b − a)^2

+ Y

′ (x 0 )

b − a)

+ Y

′ (x 1 )

b − a

After some algebra,

x 1 − x 0

2 Y

′ (x 0 ) + Y

′ (x 1 )

(x 1 − x 0 )

2

Y (x 1 ) − Y (x 0 )

5.3 Y

′′

(x

− j

) = Y

′′

(x

j

Because Y

′′ is continuous at x 1 , the left hand limit must equal the right

hand limit at each xj. Considering the left hand limit at x 1 , we take the

interpolating polynomial between x 0 and x 1 ,

Y

′′ (x

− 1 ) =^ Y^ (x^0 )

(x 1 − x 0 )^2

  • Y (x 1 )

(x 1 − x 0 )^2

+ Y

′ (x 0 )

x 1 − x 0

+ Y

′ (x 1 )

x 1 − x 0

We also evaluate the interpolating polynomial in the next interval, (x 1 , x 2 ),

to find the value of the second derivative from the right,

Y

′′ (x

1 ) =^ Y^ (x^1 )

(x 2 − x 1 )

2

  • Y (x 2 )

(x 2 − x 1 )

2

+ Y

′ (x 1 )

x 2 − x 1

+ Y

′ (x 2 )

x 2 − x 1

Setting these equations equal and performing some algebra,

x 1 − x 0

Y

′ (x 0 ) + 2Y

′ (x 1 )

x 2 − x 1

2 Y

′ (x 1 ) + Y

′ (x 2 )

(x 1 − x 0 )

2

Y (x 1 ) − Y (x 0 )

(x 2 − x 1 )

2

Y (x 2 ) − Y (x 1 )

A similar equation holds for each j ∈ { 1 ,... , n − 1 }.