MATH 417 Lecture 8

From Notes
Jump to navigation Jump to search

« previous | Thursday, February 6, 2014 | next »


Quiz

Find p4(x) interpolating polynomial of 2cos(πx)+6x+14 for x{0,1,2,3}

The 6x+14 can be omitted for the computation of the and added at the end

Chapter 4: Numerical Integration and Differentiation

Suppose we wanted to find the length of the curve f(x)=cosx.

ab1+sin2xdx is an elliptic integral that is impossible to find.

We could use an interpolating polynomial pn(x) such that

f(x)=pn(x)+f(n+1)(ξ(x))(n+1)!i=0n(xxi)

In which case we can approximate f(x).

f(xj)=pn(xj)+f(n+1)(ξ)(n+1)!ij(xjxi)


We find that the error between two points is approximately linear in regards to the distance between them:

f(x0)f(x0+h)f(x0)h=h2f(ξ)O(h)



Example

Let's differentiate p2(x)=f(x0)(xx1)(xx2)(x0x1)(x0x2)+f(x1)(xx0)(xx2)(x1x0)(xx2)+f(x2)(xx0)(xx1)(x2x0)(x2x1):

p2(x)=f(x0)(x0x1)(x0x2)(xx2+xx1)+f(x1)(x1x0)(x1x2)(xx2+xx0)+f(x2)(x2x0)(x2x1)(xx1+xx0)

If the points are equidistant at distance h,

p2(x)=3f(x0)+4f(x0+h)f(x0+2h)2h


To estimate the error, we use

f(x0)3f0+4f1f22h=f(ξ)6h2h=h23f(ξ)=O(h2)

The moral of the story: For 3 equidistant points on a parabola, the slope of the tangent line at the middle point is equal to the slope of the secant line of the first and last points.