Problems from Lagrange's method

Determine the value of f(π3) if f(x)=sin(x) knowing the following values of the function:

x 0 π6 π2
sin(x) 0 12 1

and give a bound for the error.

See development and solution

Development:

We have n+1=3 points, therefore n=2. The Lagrange polynomial is written as:

P2(x)=f0l0(x)+f1l1(x)+f2l2(x)=0l0(x)+12l1(x)+1l2(x)=12l1(x)+l2(x)

Let's calculate l1(x) and l2(x):

l1(x)=(xx0)(xx2)(x1x0)(x1x2)=(x0)(xπ2)(π60)(π6π2)=x2π2xπ6(π3)=18π2x2+9πxl2(x)=(xx0)(xx1)(x2x0)(x2x1)=(x0)(xπ6)(π20)(π2π6)=x2π6xπ2(π3)=6π2x21πx

Replacing the obtained values:

P2(x)=12l1(x)+l2(x)=12(18π2x2+9πx)+6π2x21πx=9π2x2+92πx+6π2x21πx=3π2x2+72πx

Thus:

sin(π3)=f(π3)P2(π3)=56=0.8333

To give a bound for the error, it is necessary to know f(n+1)(x)=f(3)(x). In our case,

f(3)(x)=cos(x)|f(3)(x)|=|cos(x)|1

Therefore: |f(π3)P2(π3)|16π3π6π6=π648=0.0470.5101

Solution:

sin(π3)=0.8333 and |error|0.05

Hide solution and development
View theory