- Linear Interpolation

From the diagram we have two similar triangles such that

\[{f(a)\over f(b)} ={a-α\over α-b}\]
Therefore,
\[f(a)(α-b)=f(b)(a-α)\]
\[αf(a)-bf(a)=af(b)-αf(b)\]
\[αf(a)+αf(b)=af(b)+bf(a)\]
\[α={af(b)+bf(a)\over f(b)+f(a)}\]
NB: Since we are dealing with the lengths of a triangle we ONLY use ABSOLUTE values for \(f(a)\) and \(f(b)\). Additionally, for consistency we will let \(a\) be the smaller value from the interval and \(b\) the larger.

LESSON 1
Use Linear Interpolation to determine the root, correct to two decimal places, of the equation \(x^3-3x^2=1-x\) in the interval [2,3].
SOLUTION
  • Rewrite the equation in the form \(f(x)=0\)
\[x^3-3x^2=1-x\]
\[x^3-3x^2+x-1=0\]
Let \(f(x)=x^3-3x^2+x-1\)
  • Determine the values for \(f(a)\) and \(f(b)\)
\[f(2)=2^3-3(2)^2+2-1=-3\]
\[f(3)=3^3-3(3)^2+3-1=2\]
  • Apply the linear interpolation formula using the absolute values for \(f(a)\) and \(f(b)\).
\[α={af(b)+bf(a) \over f(b)+f(a)}\]
\[α_1={2f(3)+3f(2)\over f(3)+f(2)}={2(2)+3(3)\over 2+3}=2.60\]
  • This is the first approximation. We will repeat the process at least once until we get consecutive approximations which round to the same value according to the desired specificity (two decimal places in this case).
\[f(2.60)=(2.60)^3-3(2.60)^2+(2.60)-1=-1.10\]
  • Due to sign change we know that the root is between 2.60 and 3. We will therefore need to repeat the interpolation process as follows.
\[α={af(b)+bf(a)\over f(b)+f(a)}\]
\[α_2={2.60(2)+3(1.10)\over 2+1.10}=2.742\]
  • These two approximations, \(α_1\) and \(α_2\), rounded to 2 decimal places, are not equal so we carry out another iteration.
\[f(2.742)=-0.198\]
  • Due to sign changes, root is between 2.742 and 3.
\[α={af(b)+bf(a)\over f(b)+f(a)}\]
\[α_3={2.742(2)+3(0.198)\over 2+0.198}=2.765\]
  • These two approximations, \(α_2\) and \(α_3\), rounded to 2 decimal places, are not equal so we carry out another iteration.
\[f(2.765)=-0.032\]
  • Due to sign changes, root is between 2.765 and 3.
\[α={af(b)+bf(a)\over f(b)+f(a)}\]
\[α_4={2.765(2)+3(0.032)\over 2+0.032}=2.769\]
Since \(α_3\) and \(α_4\), are both equal to 2.77 correct to 2 decimal places, we can conclude that the root is approximately 2.77.

VIDEO SOLUTION