Solving a Line–Parabola System: Substitution and Graphical Intersection

Solving a Line–Parabola System: Substitution and Graphical Intersection
Loading the math board and drawing, please wait…
2024-06-07 00:51
This GeoGebra example demonstrates how to solve a nonlinear system of equations formed by a line and a parabola by combining substitution-based algebra with the geometric interpretation of intersection points. It focuses on systems of equations, especially nonlinear relationships: using substitution to solve equations, understanding quadratic functions, and interpreting solutions as graph intersections (including handling and counting multiple solutions). Construction-wise, the implementation uses RandomUniform together with Take/Sequence/Zip and indexing (e.g., numRandoms, allRandomSeeds, randIndex, currentRandomSeeds, xV, yV, coeffsA/coeffA) to generate varied coefficients; If/KeepIf with RemoveUndefined filters valid candidate solutions; Polynomial constructs the needed quadratic expressions, while Element/SelectedIndex/Flatten/First extract candidate solution sets (PossibleSols, Sol1/Sol2, sols, NumOfSols). The scene is supported by GeoGebra objects and UI elements such as Textfield and geometric primitives (PointToPixels, Segment, Polygon, Translate, Rotate, Text), alongside validate/showanswer/showsolution to support interactivity and feedback. Suitable for Grades 9–12 and for practice comparing algebraic and graphical solution methods.

GeoGebra Commands & Parameters

  1. RandomUniform(0, 0.99, 200) → allRandomSeeds, {0.6701658270213409, 0.26586626210600356, 0.05917019997643334, 0.9601659010286265, 0.11134672411691694, 0.44938535357288345, 0.6643107148197415, 0.5697936382377722, 0.9384279962176154, 0.15639830809693528, 0.6118313920974426, 0.8629091699053281, 0.9369220771260823, 0.6247145355531575, 0.493015877500242, 0.26791413018187177, 0.06336539197889643, 0.14573184750267304, 0.6864928674634091, 0.8729262871127011, 0.2949918070009268, 0.5199415311435209, 0.7498070955135643, 0.8477715388699658, 0.9788090636217327, 0.40109762072680083, 0.1412808663083401, 0.7609174345768697, 0.18000568736008205, 0.23629998994314863, 0.19195262906974758, 0.10122943060566275, 0.16331729867688285, 0.8628635829477145, 0.712798370177681, 0.34852336651125065, 0.82561976797176, 0.7949069398785591, 0.393799143732213, 0.4644160336453265, 0.11359322369604657, 0.683091181291771, 0.7087133768433823, 0.37594335618982533, 0.2668137266606927, 0.4298757506302135, 0.1626444735887833, 0.08881971743190872, 0.5440815334786331, 0.230031097398069, 0.8886643944896404, 0.44505316969596953, 0.31918317499394877, 0.30195812144392076, 0.15486148087481472, 0.0009118920259038455, 0.49161044346460747, 0.6196128361338707, 0.31422535356054926, 0.44595251102450506, 0.7880236413020455, 0.8575200881442866, 0.5567645853173366, 0.22197653054463995, 0.1914470142762941, 0.9324831054894077, 0.7961721678532353, 0.24237182916715466, 0.5973236663829976, 0.0051564282652066026, 0.682211882602747, 0.5373264947510236, 0.748632452104337, 0.45264758231724966, 0.20479313587163542, 0.5588680126958845, 0.026284170634134803, 0.5697485107471641, 0.6764344178608833, 0.07158608050911917, 0.8659646709199458, 0.6412708540474027, 0.6964853771441153, 0.3402386190638503, 0.46848126979670723, 0.08126979946661253, 0.8130852016446519, 0.9642195133071212, 0.03749565697012641, 0.8166888876328546, 0.7373793691268199, 0.9510846288311419, 0.35628952840839484, 0.5531442266969229, 0.058999969486449706, 0.8969851572406117, 0.043910250315219466, 0.5691892215408436, 0.4422340080542693, 0.1109510401116762, 0.0006833666021983164, 0.9124616826465505, 0.7786619848436417, 0.06249496850264445, 0.7936539650022674, 0.4066130918991476, 0.4943440602050729, 0.2879751680551623, 0.624033144654114, 0.3318555642591351, 0.957862820129656, 0.8905591411754183, 0.6611769273262437, 0.29433457797154877, 0.8997026113461456, 0.09147239984890251, 0.9310135007726522, 0.3703470351052991, 0.12355182132707426, 0.876495350976807, 0.8311609858149096, 0.9506710592085933, 0.1361602849343261, 0.8113888643692374, 0.7502412705247523, 0.01796059287534685, 0.8343657556908664, 0.8830823751067901, 0.5350974190648453, 0.136280091176026, 0.4558236081804623, 0.11005112839506588, 0.7367596266296549, 0.7564156921915993, 0.7338314439271182, 0.05533800279621306, 0.014082125414700393, 0.18359699998309234, 0.5964347907518752, 0.5591420318377307, 0.2429862027036972, 0.3856991298906892, 0.1057331640223194, 0.21480050575375864, 0.5691959049850784, 0.689868162367669, 0.9649749042863027, 0.5723327960279265, 0.6632421716109594, 0.15382282985343027, 0.618637296185194, 0.2774937232589799, 0.2183364156520402, 0.04483448496658359, 0.07423294139940315, 0.8715009822066323, 0.024479164249826473, 0.4745717271565096, 0.8940661067172636, 0.09725524500344662, 0.5558696568941021, 0.011619983543411464, 0.8605824694441528, 0.47196383679866705, 0.48332187718329217, 0.3655465435211878, 0.7203131033937495, 0.7136074440087867, 0.06896776223373542, 0.8968797027873415, 0.2187086748754329, 0.9696569767956852, 0.1470428787632579, 0.1463059104227893, 0.2413920445728762, 0.110851130390594, 0.8920002534861412, 0.8337623864045626, 0.6765274323413187, 0.5406877969296384, 0.28358723349833354, 0.25391277198158524, 0.49811180595686255, 0.672561202117168, 0.7878462382634062, 0.07874173243164662, 0.22103896569604647, 0.8911935445874486, 0.8232639337602533, 0.1706896198878263, 0.06576926835948588, 0.21316454297691803, 0.802494519544949, 0.5808717688856518, 0.683358007970939, 0.15293362854978632, 0.8622215004157983, 0.7164872638232093, 0.6004524377795805, 0.09577919722788401}
  2. Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1) → currentRandomSeeds
  3. If(-4 + floor((currentRandomSeeds(2) * 8)) ≠ 0, -4 + floor((currentRandomSeeds(2) * 8)), 1) → yV
  4. KeepIf(abs(x) ≥ abs(yV) / (5 - abs(xV))^(2), Sequence[-5, 5] \ {0}) → coeffsA
  5. Element(coeffsA, Mod[floor((currentRandomSeeds(3) * 10)), Length[coeffsA]] + 1) → coeffA
  6. Sequence(xA + (0.5 * ii), ii, 1, Min[10 - (2 * xA), 6]) → xBPos, {1.5, 2, 2.5, 3, 3.5, 4}
  7. Element(xBPos, xBind) → xB
  8. Zip((("$\textsf{" * tt) * " }$"), tt, options) → menu
  9. SelectedIndex(menu) → selectedOption
  10. Flatten(Sequence[Sequence[(ii, jj), ii, -5, 5], jj, If[coeffA ≤ 0, -5 - coeffA, -4], If[coeffA ≥ 0, 5 - coeffA, 4]]) → PossibleVertices
  11. Element(PossibleVertices, floor((currentRandomSeeds(2) * Length[PossibleVertices])) + 1) → Vert
  12. Polynomial(g0) → g
  13. If(currentRandomSeeds(1) ≤ 0.2, 0, If[currentRandomSeeds(1) ≤ 0.6, 1, 2]) → NumOfSols
  14. KeepIf(y(PP) ≟ g(x(PP)), PP, Flatten[Sequence[Sequence[(ii, jj), ii, -5, 5], jj, -5, 5]]) → PossibleSols
  15. Element(PossibleSols, 1 + floor((Length[PossibleSols] * currentRandomSeeds(4)))) → Sol1
  16. Element(PossibleSols \ {Sol1}, 1 + floor(((Length[PossibleSols] - 1) * currentRandomSeeds(4)))) → Sol2
  17. First({Sol1, Sol2}, NumOfSols) → sols
  18. If(Length[sols] ≥ 2, (Input2 ≟ sols(1) ∨ Input2 ≟ sols(2)) ∧ Input2 ≠ Input1, ¬Defined[Input2]) → correct3
  19. If(Length[sols] ≥ 1, Input1 ≟ sols(1) ∨ Input1 ≟ sols(2), ¬Defined[Input1]) → correct2
  20. Take({{selectedOption}, {x(Input1), y(Input1)}, {x(Input2), y(Input2)}}, 1, selectedOption - 1) → inputCurrent
  21. Textfield(Input1) → InputBox1
  22. Textfield(Input2) → InputBox2
  23. Corner(5) → layoutAppSize
  24. sectorPixels(A, B, C, haloPixels + 40, Corner[1], Corner[3], Corner[5]) → pulsingObject
  25. sectorPixels(A, B, C, 40, Corner[1], Corner[3], Corner[5]) → displayAngle
  26. PointToPixels(Corner[onboardingDisplayText, 2], Corner[1], Corner[3], Corner[5]) → layoutOnboarding
  27. onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5]) → OnboardingTextOffset
  28. Polygon({(-5.5, -5.5), (5.5, -5.5), (5.5, 5.5), (-5.5, 5.5)}) → q1
  29. Flatten(Sequence[Sequence[y = (mm * x) + bb, mm, -5, 5], bb, -5, 5]) → Lines
  30. Zip(RemoveUndefined[{Intersect[g, ll]}], ll, Lines) → l2
  31. RemoveUndefined(Zip[If[Length[ll] ≟ 0, LL, NaN], ll, l2, LL, Lines]) → l3
  32. Element(l3, 1 + floor((currentRandomSeeds(1) * Length[l3]))) → j
  33. Polynomial(Element[{h0, h1, h2}, NumOfSols + 1]) → h
  34. Segment((0, -5.42), (0, 5.42)) → i
  35. Text("\math{x}", (5.75, 0.075), true, true, 0, 0) → labelx
  36. Text("\math{y}", (0, 5.9), true, true, 0, 0) → labely
  37. Translate(p, Vector[(Vector[Corner[1], Corner[4]] / 500 * 16)]) → p'
  38. Element({348, 282, 284, 300}, selectedOption) → xFB1
  39. Sequence(Segment[(ii, -0.05), (ii, 0.05)], ii, -5, 5, 0.5) → l1
  40. Rotate(i, 90°) → i'
  41. Text(Sol1, Sol1, true, true, 0, If[y(Sol1) ≥ y(Sol2), 1, -1]) → text1
  42. Text(Sol2, Sol2, true, true, 0, If[y(Sol1) ≥ y(Sol2), -1, 1]) → text3

AI Drawing Prompt Reference

Draw the intersection points of a line and a parabola with randomly generated coefficients, display possible solutions, and mark the actual intersection points. Start by drawing the coordinate axes and grid, then plot the line and parabola, and finally highlight the intersection points with different colors and labels, noting the coordinates of possible and actual solutions.
The prompt above was compiled from the original drawing commands and is for reference only.