# Checking students' non-linear equations

Hi there everyone,
I’ve been stumbling through CL by myself, with frequent references to other activities and the documentation. I’ve been trying to figure out how to check student work in the most efficient way. In the activity I’m currently working on, I have two needs:

1. On slide 9, I’d like to have the points in the table compared to the expected rational function to see if the points lie on that graph.

2. On slide 10, I’m trying to figure out how to compare the equation they submitted in the input against the equation in the graph and return a message.

In the activities I’ve looked at this far, they’ve been of a form that it’s easy to compare to m and b (linear) or a, b, and c (quadratic). Because it’s rational, there is no standard form. I’ve poured over the documentation all day, but still haven’t figured this one out. What is the most efficient way to check these two slides using CL?

Thanks,
Kim

To (try to) answer your first question, I usually will take the input value and evaluate the output using the function in the graphing calculator. For some reason, I can’t get it to work correctly on your example. I can get it to mark as correct if the input or output are terminating numbers, but for something that is a repeating decimal, it won’t mark as correct. For example, (-3,-1) will mark as correct, but (10, 1/12) will not.

I tried this several different ways, and the final attempt should be marking (10, 1/12) as correct because when I open the graphing calculator and set my sliders to the correct values, it shows that h=1 (which should be correct). Sorry this isn’t entirely helpful, but I wanted to share in case someone else can help. Here’s what I came up with:

As for your second question, I would think that a similar method could be used to check for correctness of their equation. You can choose a random input value and see if it evaluates to the same value in the function that the student submits.

That’s really helpful, thanks! Line 8 in the graph was the one I couldn’t figure out how to code.

From here, I can figure out why certain points aren’t working. I haven’t yet figured out the pattern to which ones work.

Thanks,
Kim

Okay, it doesn’t work when the answer is a non-terminating decimal. Added a tolerance range and everything works out perfectly!

1 Like