Linear Interpolation

Linear Interpolation
Loading the math board and drawing, please wait…
2019-08-25 12:05
This example demonstrates the process of linear interpolation, a method of estimating values between known data points. Using commands from the construction summary, such as If, Sequence, and Textfield, we can see how these GeoGebra objects are utilized. Suitable for high school mathematics education and learning.

GeoGebra Commands & Parameters

  1. If(sgn(f(C2)) ≟ sgn(f(A2)), C2, A2) → A3
  2. If(sgn(f(C2)) ≟ sgn(f(B2)), C2, B2) → B3
  3. If(sgn(f(C3)) ≟ sgn(f(A3)), C3, A3) → A4
  4. If(sgn(f(C3)) ≟ sgn(f(B3)), C3, B3) → B4
  5. If(sgn(f(C4)) ≟ sgn(f(A4)), C4, A4) → A5
  6. If(sgn(f(C4)) ≟ sgn(f(B4)), C4, B4) → B5
  7. If(sgn(f(C5)) ≟ sgn(f(A5)), C5, A5) → A6
  8. If(sgn(f(C5)) ≟ sgn(f(B5)), C5, B5) → B6
  9. If(sgn(f(C6)) ≟ sgn(f(A6)), C6, A6) → A7
  10. If(sgn(f(C6)) ≟ sgn(f(B6)), C6, B6) → B7
  11. If(sgn(f(C7)) ≟ sgn(f(A7)), C7, A7) → A8
  12. If(sgn(f(C7)) ≟ sgn(f(B7)), C7, B7) → B8
  13. If(sgn(f(C8)) ≟ sgn(f(A8)), C8, A8) → A9
  14. If(sgn(f(C8)) ≟ sgn(f(B8)), C8, B8) → B9
  15. If(sgn(f(C9)) ≟ sgn(f(A9)), C9, A9) → A10
  16. If(sgn(f(C9)) ≟ sgn(f(B9)), C9, B9) → B10
  17. If(sgn(f(C10)) ≟ sgn(f(A10)), C10, A10) → A11
  18. If(sgn(f(C10)) ≟ sgn(f(B10)), C10, B10) → B11
  19. If(sgn(f(C11)) ≟ sgn(f(A11)), C11, A11) → A12
  20. If(sgn(f(C11)) ≟ sgn(f(B11)), C11, B11) → B12
  21. If(sgn(f(C12)) ≟ sgn(f(A12)), C12, A12) → A13
  22. If(sgn(f(C12)) ≟ sgn(f(B12)), C12, B12) → B13
  23. If(sgn(f(C13)) ≟ sgn(f(A13)), C13, A13) → A14
  24. If(sgn(f(C13)) ≟ sgn(f(B13)), C13, B13) → B14
  25. If(sgn(f(C14)) ≟ sgn(f(A14)), C14, A14) → A15
  26. If(sgn(f(C14)) ≟ sgn(f(B14)), C14, B14) → B15
  27. If(sgn(f(C15)) ≟ sgn(f(A15)), C15, A15) → A16
  28. If(sgn(f(C15)) ≟ sgn(f(B15)), C15, B15) → B16
  29. Sequence((Element[lA, i], f(Element[lA, i])), i, 1, Drag + 0.75) → ListA
  30. Sequence((Element[lB, i], f(Element[lB, i])), i, 1, Drag + 0.5) → ListB
  31. Sequence((Element[lC, i], 0), i, 1, Drag + 0.25) → ListC
  32. Sequence(Segment[Element[ListC, i], (x(Element[ListC, i]), f(x(Element[ListC, i])))], i, 1, Drag) → ListVertical
  33. Sequence(Segment[Element[ListA, i], Element[ListB, i]], i, 1, Drag + 0.5) → ListLine
  34. TableText({{D1, E1, F1, G1, H1, I1, J1}, {D2, E2, F2, G2, H2, I2, J2}, {D3, E3, F3, G3, H3, I3, J3}, {D4, E4, F4, G4, H4, I4, J4}, {D5, E5, F5, G5, H5, I5, J5}, {D6, E6, F6, G6, H6, I6, J6}, {D7, E7, F7, G7, H7, I7, J7}, {D8, E8, F8, G8, H8, I8, J8}, {D9, E9, F9, G9, H9, I9, J9}, {D10, E10, F10, G10, H10, I10, J10}, {D11, E11, F11, G11, H11, I11, J11}, {D12, E12, F12, G12, H12, I12, J12}, {D13, E13, F13, G13, H13, I13, J13}, {D14, E14, F14, G14, H14, I14, J14}, {D15, E15, F15, G15, H15, I15, J15}, {D16, E16, F16, G16, H16, I16, J16}}, "|_lcccccc") → text1
  35. Textfield(f) → InputBox1
  36. Textfield(a) → InputBox2
  37. Textfield(b) → InputBox3
  38. Textfield(dp) → InputBox4