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)=cos⁡x.

∫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(x−xi)

In which case we can approximate f′(x).

f′(xj)=pn′(xj)+f(n+1)(ξ)(n+1)!∏i≠j(xj−xi)


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)(x−x1)(x−x2)(x0−x1)(x0−x2)+f(x1)(x−x0)(x−x2)(x1−x0)(x−x2)+f(x2)(x−x0)(x−x1)(x2−x0)(x2−x1):

p2′(x)=f(x0)(x0−x1)(x0−x2)(x−x2+x−x1)+f(x1)(x1−x0)(x1−x2)(x−x2+x−x0)+f(x2)(x2−x0)(x2−x1)(x−x1+x−x0)

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+4f1−f22h=f‴(ξ)6h⋅2h=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.