4.2 Undetermined Coefficients

According to our interpolating error, the difference between f and an interpolating polynomial is a multiple of f(n+1)(ξx) thus if f has a degree less than n+1 our error (Pf)(x)=0. So if f has degree less than n+1 and Pn is computed for n+1 nodes then we have an exact approximation:

Pn=fx

Our interpolating polynomials have all had the form:

i=0naif(xi)

where x0,x1,,xn are our nodes of our interpolating polynomials. Knowing our approximation must be exact for polynomials of degree n we can create n+1 equations with n+1 unknowns, a0,a1,,an

Derivatives

We want to approximated the kth derivative of f with our values:

f(x0+θ0h),f(θ1+θ1h),,f(xn+θnh)

Such that:

f(k)(x0+θh)i=0naif(x0+θih)

Where we know pj(x)=(xx0)j,j=0,1,,n will be exact by the interpolating error.

pj(k)(x0+θh)=i=0naipj(x0+θih)

Noting that pj(x0θih)=((x0+θih)x0)j=(θih)j

pj(k)(x0+θh)=a0+i=1n(θih)jai

for j=0,1,,n

Example

so for:

Pasted image 20250316175748.webp

We have θ=0,θ0=1,θ1=0, and θ2=1
We want:

f(x0)a0f(x0h)+a1f(x0)+a2f(x0+h)f(x0)=b0f(x0h)+b1f(x0)+b2f(x0+h)

and we want each of the formulas to be exact when f=p0,f=p1,f=p2

p0(x0)=a0p0(x0h)+a1p0(x0)+a2p0(x0+h)p1(x0)=a0p1(x0h)+a1p1(x0)+a2p1(x0+h)p2(x0)=a0p2(x0h)+a1p2(x0)+a2p2(x0+h)p0(x)=(xx0)0p0(x0)=0p1(x)=(xx0)1p1(x0)=1p2(x)=(xx0)2p2(x0)=2(x0x0)=00=a0+a1+a21=ha0+ha20=h2a0+h2a2.

We get:

f(x0)f(x0+h)f(x0h)2h

which we see here

Next we can do:

p0(x0)=b0p0(x0h)+b1p0(x0)+b2p0(x0+h)p1(x0)=b0p1(x0h)+b1p1(x0)+b2p1(x0+h)p2(x0)=b0p2(x0h)+b1p2(x0)+b2p2(x0+h),

Now p0(x0)=0,p1(x0)=0,p2(x0)=2

0=b0+b1+b20=hb0+hb22=h2b0+h2b2.

where the final solution is:

f(x0)f(x0+h)2f(x0)+f(x0h)h2

Integrals

Same procedure as above. We want a linear combination to approximate our integral using the values

f(x0+θ0h),f(x0+θ1h),,f(x0+θnh)abf(x)dxi=0naif(x0+θih)

And in theory this will be exact for all polynomials of degree n or less.

abpj(x)dx=a0+i=1n(θih)jaij=0,1,,n