Graphing Piecewise Functions
Loading the math board and drawing, please wait…
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
Random(-2, 2 + If[reset1, 0, 0]) → bRandomElement(KeepIf[x ≠ 0, Sequence[i, i, -3, 3 + If[reset1, 0, 0]]]) → aRandom(2, 7 + If[reset1, 0, 0]) → mPoint(xAxis) → ARay(A, (x(Corner[2]), 0)) → rAPoint(rA) → BRandomElement(KeepIf[(x ≠ 0) ∧ (x ≥ Max[xmin, ymin]) ∧ (x ≤ Min[xmax, ymax]), Sequence[i, i, (-abs((xmin * ymin))), abs((xmax * ymax)) + If[reset1, 0, 0]]]) → numbersectionexamRandomElement(KeepIf[(x ≠ 0) ∨ (x ≠ 1), Sequence[i, i, -7, 7 + If[reset1, 0, 0]]]) → nRandom(3, Min[abs(xmin), xmax] + If[reset1, 0, 0]) → cRay(B, (x(Corner[2]), 0)) → rBRandom(1, 2 + If[reset1, 0, 0]) → r1Random(xmin + 2, xmax - 3 + If[reset1, 0, 0]) → rn1Random(1, 2 + If[reset1, 0, 0]) → r2Random(1, 2 + If[reset1, 0, 0]) → r3Random(1, 2 + If[reset1, 0, 0]) → r4Random(rn1 + 1, xmax - 1 + If[reset1, 0, 0]) → rn2Random(1, 5 + If[reset1, 0, 0]) → rf1RandomElement(KeepIf[x ≠ rf1, Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf2RandomElement(KeepIf[(x ≠ rf1) ∧ (x ≠ rf2), Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf3Segment(A, B) → mdlRay(A, (x(Corner[1]), 0)) → lARay(B, (x(Corner[1]), 0)) → lBIf(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]]]]) → myf1If(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]]]]) → myf2Random(1, 5 + If[reset1, 0, 0]) → rf4RandomElement(KeepIf[(x ≠ rf1) ∧ (x ≠ rf3), Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf5If(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]]]]) → myf3If(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]]]]) → myf4If(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]]]]) → myf5Random(rn1 + 1, xmax - 1 + If[reset1, 0, 0]) → rn3