Graphing more than one Equation

How can I graph more than one equation students have input? (Quadratic or otherwise.)

Easier question: Right now, I’m having them enter the equations on separate screens, as exp1 and exp 2, and using “rawExpression: exp1.latex” With that, I can get it to graph , but how do I graph “exp2.latex” as well?

Perhaps above my current paygrade question: It seems like the way to be able to enter two equations on one screen [which would be preferable] is using a table, but I can’t seem to graph it. I tried “rawExpression: table1.cellContent(1,2).latex” but that didn’t work.

It’s in screen 3 of this practice AB, if that’s helpful: Practicing CL: Solving Quadratic Equations by Graphing • Activity Builder by Desmos

1 Like

Thanks for the question, Laura. In these situations, my favorite move is to copy & edit an existing example of what you’re after, which in this case might be Match My Parabola.

That’s where I found this code snippet. Hope it helps.


Thank you for the response! Copy & edit is how I’m figuring out most of this :grinning:

Bizzarely, this doesn’t seem to do anything when I go through it in preview:

But that skill of naming the … sinks? operations?.. allowed me to make my rawExpression approach work! Two screens is clunky, but I’m happy with it for now, for my first night working with it with very little CS experience!
rawExpression(“f_1”): exp1.latex
rawExpression(“f_2”): exp2.latex

Thank you!

1 Like

That code probably defines functions f_1(x) and f_2(x) in the graph, so you’d have to use them somehow (e.g. by graphing y=f_1(x) for them to show up.

1 Like

That makes a lot of sense and I got all excited, (and curious that “function:” would need that but “rawExpression:” doesn’t), but I can’t yet figure out how to graph y=f_1(x) or even y=f(x). I’m trying entering it in the “Edit Graph” window, but Desmos seems to need me to define f as a function or it makes it a slider. It’s as if the Graph makes the decision that f should be a slider before communicating with the underlying CL that is trying to define the function f.

1 Like

CL should override anything put into the graph so it should work regardless.

1 Like

Thank you Jay! That was it! Now I’m all set! And thank you Dan & Eric!