0% found this document useful (0 votes)
61 views13 pages

Linear Interpolation

- Linear interpolation is a method for estimating values between two known data points by using a straight line between them. - The document provides the formula for linear interpolation to find the x-value that divides the line between two known points (x=a, y=f(a)) and (x=b, y=f(b)) in a given ratio. - An example applies linear interpolation three times to approximate the root of a function between 1 and 2, getting a value of 1.68 which is correct to two decimal places.

Uploaded by

Tonikay Miller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views13 pages

Linear Interpolation

- Linear interpolation is a method for estimating values between two known data points by using a straight line between them. - The document provides the formula for linear interpolation to find the x-value that divides the line between two known points (x=a, y=f(a)) and (x=b, y=f(b)) in a given ratio. - An example applies linear interpolation three times to approximate the root of a function between 1 and 2, getting a value of 1.68 which is correct to two decimal places.

Uploaded by

Tonikay Miller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Linear Interpolation

 
• The line joining the points on the curve

where x=a and x=b cuts the x-axis at c.

• Assuming that the diagram shows that

the interval between a and c is likely to

be smaller than the interval bisection

point of a and b.
 
• The line joining the point on the curve

y=f(x) where x=a and x=b forms a pair

of similar triangles .

• Therefor the point divides the line

between x=a and x=b in the ratio

• Therefore
 If transpose to find

|  𝑓 ( 𝑎 )|( 𝑏 − 𝑐 1 )=¿ 𝑓 ( 𝑏 ) ∨(𝑐 1 − 𝑎)

𝑏
  |𝑓 ( 𝑎 )|− 𝑐 1|𝑓 ( 𝑎 )|= 𝑐1|𝑓 ( 𝑏 )|− 𝑎∨𝑓 ( 𝑏 )∨¿

𝑐
  1|𝑓 ( 𝑎 )|+𝑐 1|𝑓 ( 𝑏 )|= 𝑎|𝑓 ( 𝑏 )|+𝑏∨ 𝑓 ( 𝑎 ) ∨¿

𝑐 1=𝑎|𝑓 ( 𝑏 )+𝑏|𝑓 ( 𝑎 ) ∨ ¿ ¿
|𝑓 ( 𝑎 )|+¿ 𝑓 ( 𝑏 )∨ ¿¿
EXAMPLE

 Let
a. Show that has a root between 1 and 2
  
b. Use linear interpolation three times to get an approximate value for this root.
c. Show that the approximation is correct to two decimal places.
  Let

Showing that f(x) has a root between 1 and 2

𝑓  ( 1 ) =−1.2817 𝑓  ( 2 ) =1.3890

𝑓  ( 1 ) . 𝑓 ( 2 ) <0 Therefore f(x) has a root between1 and 2


  Let

𝑐 1=𝑎|𝑓 ( 𝑏 )+𝑏|𝑓 ( 𝑎 ) ∨ ¿ ¿
|𝑓 ( 𝑎 )|+¿𝑓 ( 𝑏 )∨ ¿¿
𝑎
  =1|𝑓 ( 𝑎 )|=1.2817 𝑏 =2|𝑓 ( 𝑏 )|=1.3890

1 ( 1.3890 )+ 2(1.2817)
𝑐  1= ¿  1.4799
1.2817+1.3890

𝑓  ( 𝑐1 ) =¿ −0.5672
 

𝑓  ( 𝑎 ) . f ( c 1 ) >0∧f ( c1 ) . f ( b )< 0  Therefore is in the interval 1.4799 and 2

𝑐 2=𝑐 1|𝑓 ( 𝑏 ) +𝑏|𝑓 ( 𝑐 1 )∨ ¿ ¿


|𝑓 (𝑐1)|+¿𝑓 ( 𝑏 )∨¿¿
𝑐 2=𝑐 1|𝑓 ( 𝑏 ) +𝑏|𝑓 ( 𝑐 1 )∨ ¿ ¿
𝑓| ( 𝑐 1 )|+¿𝑓 ( 𝑏 )∨¿¿

𝑐
  1=1. 4799|𝑓 ( 𝑐 1 )|=0.5672 𝑏= 2|𝑓 ( 𝑏 )|=1.3890

1.4799 ( 1.3890 )+ 2(0.5672)


𝑐  2= ¿  1.6307
0.5672+1.3890

𝑓  ( 𝑐2 ) =− 0.1539

𝑓  ( 𝑐2 ) . 𝑓 ( 𝑐 1 ) >0 𝑎𝑛𝑑 𝑓 ( 𝑐2 ) . 𝑓 ( 2 ) < 0  Therefore lies in the interval 1.6307 and 2

𝑐 3=𝑐2|𝑓 ( 𝑏 ) +𝑏|𝑓 ( 𝑐 2 )∨ ¿ ¿
|𝑓 (𝑐2 )|+¿ 𝑓 𝑏 ∨¿¿
( )
𝑐 3=𝑐2|𝑓 ( 𝑏 ) +𝑏|𝑓 ( 𝑐 2 )∨ ¿ ¿
|𝑓 (𝑐2 )|+¿ 𝑓 𝑏 ∨¿¿
( )

𝑐
  2=1.6307|𝑓 ( 𝑐 2 )|=0.1539 𝑏 =2|𝑓 ( 𝑏 )|=1.3890

1.6307 ( 1.3890 ) +2(0.1539)


𝑐  3= ¿  1.6675
0.1539+1.3890

  Therefore the approximate value for this root is


To show that the approximation correct to 2 decimal place it is safe to do another linear interpolation

𝑓  ( 𝑐3 ) =− 0.0360

𝑓  ( 𝑐3 ) . 𝑓 ( 𝑐2 ) >0 𝑎𝑛𝑑 𝑓 ( 𝑐 3 ) . 𝑓 ( 2 ) <0  Therefore must be in the interval 1.6675 and 2

𝑐
  3=1.6675|𝑓 ( 𝑐 3 )|=0.0360 𝑏 =2|𝑓 ( 𝑏 )|=1.3890

1.6675 ( 1.3890 ) +2( 0.0360)


𝑐  4 = ¿  1.6759
0.0360+1.3890

Therefore the approximation correct to 2 decimal places is 1.68


Exercise

 Show that the equation has a root between x=3 and x=3.5
  
 Use linear interpolation twice to get an approximate value for this root.
𝑙𝑛𝑥
  − 𝑥+2=0

𝑓  ( 3 ) =0.0986 𝑓  ( 3.5 )=−0.2472

𝑓  ( 3 ) . 𝑓 ( 3.5 )< 0∴ 𝛼 𝑙𝑖𝑒𝑠 𝑖𝑛 𝑡h𝑒 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 ∨3 , 3.5∨¿


𝑙𝑛𝑥
  − 𝑥+2=0
𝑐 1=𝑎|𝑓 ( 𝑏 )∨+𝑏|𝑓 ( 𝑎 )∨ ¿ ¿
|𝑓 ( 𝑎 )|+¿𝑓 ( 𝑏 )∨¿¿

𝑎
  =3|𝑓 ( 3 )|=0.0986 𝑏=3.5|𝑓 ( 𝑏 )|=0.2472

3 ( 0.2472 )+ 3.5(0.0986)
𝑐  1= ¿  3.1426
0.0986+0.2472

𝑓  ( 3.1426 )=0.0025

  therefore lies in the interval |3.1426, 3.5|

𝑐
  1=3.1426|𝑓 ( 𝑐 1 )|=0.0025 𝑏 =3.5|𝑓 ( 𝑏 )|=0.2472

3.1426 ( 0.2472 ) +3.5(0.0025)


𝑐  2= ¿  3.1461
0.0025+0.2472

You might also like