Graphing Piecewise Functions

Graphing Piecewise Functions
Loading the math board and drawing, please wait…
2016-08-14 13:26
This example demonstrates how to graph piecewise functions using GeoGebra. It involves core mathematical concepts such as functions, piecewise functions, and coordinate geometry. Key construction elements include commands and objects like Random, RandomElement, Point, Ray, Segment, and If to create random points and rays, and conditional statements to plot functions over different intervals. Suitable for high school mathematics teaching and learning about function graphing.

GeoGebra Commands & Parameters

  1. Random(-2, 2 + If[reset1, 0, 0]) → b
  2. RandomElement(KeepIf[x ≠ 0, Sequence[i, i, -3, 3 + If[reset1, 0, 0]]]) → a
  3. Random(2, 7 + If[reset1, 0, 0]) → m
  4. Point(xAxis) → A
  5. Ray(A, (x(Corner[2]), 0)) → rA
  6. Point(rA) → B
  7. RandomElement(KeepIf[(x ≠ 0) ∧ (x ≥ Max[xmin, ymin]) ∧ (x ≤ Min[xmax, ymax]), Sequence[i, i, (-abs((xmin * ymin))), abs((xmax * ymax)) + If[reset1, 0, 0]]]) → numbersectionexam
  8. RandomElement(KeepIf[(x ≠ 0) ∨ (x ≠ 1), Sequence[i, i, -7, 7 + If[reset1, 0, 0]]]) → n
  9. Random(3, Min[abs(xmin), xmax] + If[reset1, 0, 0]) → c
  10. Ray(B, (x(Corner[2]), 0)) → rB
  11. Random(1, 2 + If[reset1, 0, 0]) → r1
  12. Random(xmin + 2, xmax - 3 + If[reset1, 0, 0]) → rn1
  13. Random(1, 2 + If[reset1, 0, 0]) → r2
  14. Random(1, 2 + If[reset1, 0, 0]) → r3
  15. Random(1, 2 + If[reset1, 0, 0]) → r4
  16. Random(rn1 + 1, xmax - 1 + If[reset1, 0, 0]) → rn2
  17. Random(1, 5 + If[reset1, 0, 0]) → rf1
  18. RandomElement(KeepIf[x ≠ rf1, Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf2
  19. RandomElement(KeepIf[(x ≠ rf1) ∧ (x ≠ rf2), Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf3
  20. Segment(A, B) → mdl
  21. Ray(A, (x(Corner[1]), 0)) → lA
  22. Ray(B, (x(Corner[1]), 0)) → lB
  23. If(rf1 ≟ 1, Element[listf, 1], If[rf1 ≟ 2, Element[listg, 1], If[rf1 ≟ 3, Element[listhp, 1], If[rf1 ≟ 4, Element[listhm, 1], Element[listk, 1]]]]) → myf1
  24. If(rf2 ≟ 1, Element[listf, 2], If[rf2 ≟ 2, Element[listg, 2], If[rf2 ≟ 3, Element[listhp, 2], If[rf2 ≟ 4, Element[listhm, 2], Element[listk, 2]]]]) → myf2
  25. Random(1, 5 + If[reset1, 0, 0]) → rf4
  26. RandomElement(KeepIf[(x ≠ rf1) ∧ (x ≠ rf3), Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf5
  27. If(rf3 ≟ 1, Element[listf, 3], If[rf3 ≟ 2, Element[listg, 3], If[rf3 ≟ 3, Element[listhp, 3], If[rf3 ≟ 4, Element[listhm, 3], Element[listk, 3]]]]) → myf3
  28. If(rf4 ≟ 1, Element[listf, 4], If[rf4 ≟ 2, Element[listg, 4], If[rf4 ≟ 3, Element[listhp, 4], If[rf4 ≟ 4, Element[listhm, 4], Element[listk, 4]]]]) → myf4
  29. If(rf5 ≟ 1, Element[listf, 5], If[rf5 ≟ 2, Element[listg, 5], If[rf5 ≟ 3, Element[listhp, 5], If[rf5 ≟ 4, Element[listhm, 5], Element[listk, 5]]]]) → myf5
  30. Random(rn1 + 1, xmax - 1 + If[reset1, 0, 0]) → rn3