You are on page 1of 8

Ans.

To the question number-1

Df(x)
x f(x)

0 0

227.04 −0
=22.704
10 −0
10 227.04

362.78− 227.04
=27.148
15 −10
15 362.78

517.35− 362.78
=30.914
20− 15
20 517.35

602.97 −517.35
=34.248
22.5− 20
22.5 602.97

901.67 −602.97
=39.827
30 −22.5
30 901.67

For the 1st order polynomial:


f 1 ( x )=f ( x0 ) + ¿) Df(x)

As,here t=16 second, x 0=15,Df(x)=30.914


∴ f 1 ( 16 )=¿362.78+(16-15)(30.914)

=362.78+30.914
=393.694 m/s
∴The velocity at 16th second is 393.694 m/s
Ans. To the question number-2(1)

There are 3 points given and in question n=3.So we have to use third-degree
Lagrange interpolating polynomial.We can write third-degree Lagrange
interpolating polynomial as
P3 ( x ) =L0 ( x ) f ( x 0 ) + L1 ( x ) f ( x 1 )+ L2 ( x ) f ( x 2) + L3 ( x ) f ( x3 )

Given,
x 0=1

x 1=1.1

x 2=1.3

x 3=1.4

We know,
(x − x1 )( x − x2 )( x − x3 )
L0 =
(x 0 − x 1)(x 0 − x 2)( x 0 − x 3)

(x − 1.1)(x −1.3)(x − 1.4)


= (1 −1.1)(1− 1.3)( 1−1.4 )
250 3 950 2 2395 1001
=− 3
x +
3
x −
6
x+
6
(x − x 0 )( x − x 2 )( x − x 3 )
L1 =
( x 1 − x 0)(x 1 − x2 )( x 1 − x 3 )

( x − 1)( x −1.3)( x −1.4 )


= (1.1 −1)(1.1− 1.3)(1.1 −1.4)
500 3 1850 2 2260 910
= 3
x −
3
x +
3
x−
3

( x − x 0 )( x − x 1 )( x − x 3 )
L2 =
( x 2 − x 0)( x 2 − x 1)( x 2 − x3 )

( x −1)( x −1.1)(x − 1.4)


= (1.3 −1)(1.3 −1.1)( 1.3− 1.4)
500 3 1750 2 2020 770
=− 3
x +
3
x −
3
x+
3

(x − x 0 )( x − x1 )(x − x 2 )
L3 =
(x 3 − x 0)(x 3 − x 1)(x 3 − x 2)

(x −1)( x − 1.1)( x −1.3)


= (1.4 − 1)(1.4 − 1.1)(1.4 − 1.3)
250 3 850 2 1915 715
= 3
x −
3
x+
6
x−
6

Here, f(x)=ln(x)
f ( x 0 ) =ln ( x 0 )=ln1=0

f ( x 1 ) =ln ( x 1) =ln 1.1=0.0953

f ( x 2 ) =ln ( x 2 )=ln1.3=0.2624

f ( x 3 ) =ln ( x 3 )=ln1.4=0.3365

Now,
P3 ( x ) =L0 ( x ) f ( x 0 ) + L1 ( x ) f ( x 1 )+ L2 ( x ) f ( x 2) + L3 ( x ) f ( x3 )

250 3 950 2 2395 1001 500 3 1850 2 2260 910


=(( −
3
x +
3
x −
6
x+
)+ (
6
×0
) 3
x −
3
x +
3
x−
3 )
500 1750 2020 770
(0.0953)+( 3 3 )(0.2624)+(
3 2
− x + x − x+
3 3
250 850 1915 715
6 )(0.3365)
3 2
x − x+ x−
3 3 6

=0.192 x -1.043 x +2.509x-1.658


3 2

Absolute error:
We know absolute error
n
f (n+1) ( ε)
| f (x) − Pn (x )|≤max| (n+1)! |.max |∏ (x − ¿ x )¿|
k=0
k
Hence, the absolute error in bound [ x 0 , x 3 ¿
3
f (3+1) (ε)
| f (x) − P3 ( x )|≤max| (3+1)! |.max |∏ (x − ¿ x )¿|
k=0
k

f 4 (( ε ))
= 4 ! (x-1)(x-1.1)(x-1.3)(x-1.4)
The 4th derivative of f(x) is shown below

f(x)=lnx
1
f 1(x)=
x
1
f 2(x)= - x2
2
f 3(x)=
x3
6
f 4(x)= - x4
6
For ε (x) in [1,1.4] the maximum value of - ε (x )4 on the interval is -
6
=−6
14

We need to determine the maximum value on [1,1.4] of the absolute value of the
polynomial
g(x)=(x-1)(x-1.1)(x-1.3)(x-1.4)
= x 4 − 4.8 x 3 +8.59 x 2 − 6.792 x +2.002
Differentiating the polynomial we get,
g' (x)=4 x 3 −14.4 x 2+17.18x-6.792

The critical points occur at,


x 1=1.042

x 2=1.358
x 3=1.2

When x 1=1.042
g(1.042)=(1.042 -1)(1.042 -1.1)(1.042 -1.3)(1.042 -1.4)
=-0.0002
When x 2=1.358
g(1.358)=(1.358-1)(1.358-1.1)(1.358-1.3)(1.358-1.4)
=-0.0002
when x 3=1.2

g(1.2)=(1.2-1)(1.2-1.1)(1.2-1.3)(1.2-1.4)
=0.0004
The maximum absolute value is g(1.2)=0.004

Absolute error on the interval [ x 0 , x 3],


3
f (3+1) (ε) f 4 ((ε))
| f (x) − P3 ( x )|≤max| (3+1)! |.max | ∏ (x − ¿ x k )¿|
k=0
=¿ 4! ||(x-1)(x-1.1)(x-
1.3)(x-1.4)|
6
= 24 × 0.0004=0.0001 ****

Ans. To the question number-2(2)


The above three points are given and n=3. So, we need third-degree Lagrange
interpolating polynomial. And that is,
P3 ( x ) =L0 ( x ) f ( x 0 ) + L1 ( x ) f ( x 1 )+ L2 ( x ) f ( x 2) + L3 (x )f ( x 3)

Here,
x 0=0
x 1=0.25

x 2=0.5

x 3=1

We know,
( x − x 1 ) ( x − x 2 ) ( x − x 3) ( x −0.25 )( x − 0.5 ) ( x −1 )
L0 = ¿ ¿ −8 x 3 +14 x 2 − 7 x+1
( x 0 − x 1) ( x 0 − x 2 )( x 0 − x 3 ) ( 0 − 0.25 )( 0 − 0.5 ) ( 0− 1 )
( x − x 0 )( x − x 2 ) ( x − x 3 ) ( x − 0 ) ( x −0.5 )( x − 1 ) 64 3 32
L1 = ¿ ¿ x −32 x2 + x
( x 1 − x 0 ) ( x 1 − x2 ) ( x 1 − x3 ) ( 0.25− 0 ) ( 0.25 −0.5 ) ( 0.25 −1 ) 3 3

( x − x 0 )( x − x 1 ) ( x − x 3 ) ( x − 0 ) ( x −0.25 )( x − 1 )
L2 = ¿ ¿ −16 x 3 +20 x2 − 4 x
( x 2 − x 0 ) ( x 2 − x1 ) ( x 2 − x 3 ) ( 0.5− 0 ) ( 0.5 −0.25 ) ( 0.5 −1 )
( x − x 0 ) ( x − x 1 ) ( x − x 2) ( x −0 )( x − 0.25 ) ( x − 0.5 ) 8 3 1
L3 = ¿ ¿ x − 2 x2+ x
( x 3 − x0 ) ( x 3 − x 1 )( x 3 − x 2 ) ( 1− 0 ) (1 − 0.25 )( 1 −0.5 ) 3 3

Here , f(x)=cos x + sin x


f ( x 0 ) =cos x 0 +sin x 0=1f ( x 1 ) =cos x 1+ sin x 1=1.2163f ( x 2 ) =cos x 2+ sin x 2=1.357

f ( x 3 ) =cos x 3+ sin x3 =1.3817

Now,

P3 ( x ) =L0 ( x ) f ( x 0 ) + L1 ( x ) f ( x 1 )+ L2 ( x ) f ( x 2) + L3 ( x ) f ( x3 )
64 3 32 8 1
¿(− 8 x 3+14 x2 −7 x +1)×1+
3 ( ) ( )
x −32 x 2 + x ( 1.2163 ) + ( −16 x 3 +20 x2 − 4 x ) ( 1.357 )+ x 3 −2 x2 + x ( 1.3817
3 3 3
3 2
¿ −0.0795 x − 0.5444 x + 1.0065 x +1

Absolute error:
We know absolute error
n
f (n+1) ( ε)
| f (x) − Pn (x )|≤max| (n+1)! |.max |∏ (x − ¿ x )¿|
k=0
k

Hence, the absolute error in bound [ x 0 , x 3 ¿


3
f (3+1) (ε)
| f (x) − P3 ( x )|≤max| (3+1)! |.max |∏ (x − ¿ xk )¿|
k=0

the absolute error on the interval [ x 0 , x 3],


3

| | |
f (3+ 1) ( ε )
|f ( x ) − P3 ( x )|≤ max ( 3+1 ) ! . max | f 4 (( ε ))
∏ ( x − x k ) ¿ 4 ! ( x − 0)( x −0.25)( x − 0.5)( x − 1)
k=0

The 4th derivative of f(x) is shown below


f ( x )=cosx+sinx

f 1 ( x )=− sinx+ cosxf 2 ( x )=− cosx − sinx f 3 ( x )=sinx − cosxf 4 ( x )=cosx+ sinx

For ε ( x ) ∈ ( 0,1 ) the maximum value of cos ⁡(ε ( x ) )+ sin ⁡(ε ( x ) ) on the interval is
π π
cos +sin =√ 2
4 4

We need to determine the maximum value on [0,1] of the absolute value of the
polynomial
g ( x )=( x − 0 ) ( x −0.25 )( x − 0.5 ) ( x −1 ) ¿ x 4 −1.75 x 3+ 0.875 x 2 − 0.125 x

After differentiating the polynomial we get,


g' ( x )=4 x 3 − 5.25 x 2 +1.75 x − 0.125

The critical points occur at,


x 1=0.8316x 2=0.3827 x 3=0.0982

wℎen x 1=0.8316 g ( 0.8316 )= ( 0.8316− 0 ) ( 0.8316 −0.25 ) ( 0.8316 −0.5 )( 0.8316 −1 )¿ −0.027

wℎen x 2=0.3827 g ( 0.3827 )= ( 0.3827 −0 ) ( 0.3827 −0.25 )( 0.3827 − 0.5 )( 0.3827 − 1 )¿ 0.0036

wℎen x 3=0.0982 g ( 0.0982 )=( 0.0982 −0 )( 0.0982 −0.25 ) ( 0.0982 −0.5 ) ( 0.0982− 1 )¿ −0.0054

The maximum absolute value is g ( 0.8316 )=0.027

Absolute error on the interval [ x 0 , x 3],


3

| | |
f (3+ 1) ( ε )
|f ( x ) − P3 ( x )|≤ max ( 3+1 ) ! . max || |
∏ ( x − xk ) ¿
k=0
f 4 (( ε ))
4!
√2
¿¿ × 0.027¿ 0.00159
24

****

You might also like