Help with Correctness Checker in Graph / Math Input

I’m pretty confident in my abilities to get the graphing calculator to check for correctness in a math input. But for some reason, this one is driving me crazy! It’s just the first expression. When a student enters sqrt(x-5), the graph should return a value of ‘1’ for I_c, but it doesn’t! I have no idea why. Any help that could be offered would be very much appreciated!

Actually, I think I figured it out. It seems to be an issue with the list X=[-5…5], which has undefined elements for sqrt(x-5). So no help needed! Thank you.

Was just going to send this which doesn’t require you to make sure there are no undefined elements:

Wow - thank you for this! Very helpful. :slight_smile:

You’re certainly welcome. Maybe for other future things, I believe it works this way because I’m outputting a value if the absolute value is >=0, which it does no problem. Then, after that output I’m calculating the difference. It’s when you’re trying to calculate with an undefined value that it “breaks” before outputting 1 or 0 in your original code, so it still gets an undefined.

try this format, { x - x = 0 : 1 , 0 } it’s simple and seams to work

That’s definitely a handy method when undefined results from Imaginary numbers.

I wish there was something similar for checking, say, rational functions. I feel like there should be a way but I’m just not sure there is.