Inequality Linearity Check

I’d like to check that a studnet input is a linear inequality of any type. That’s it, nothing else.

Seems fairly simple, but I’m growing to believe this may be a shortcoming of Desmos’ methods.

This works for equations but not for inequalities:


Fair enough I suppose. However parsing Inequalities by left and right doesn’t seem to allow for stictching it back together in such a way as to determine properties such as angle, etc. that would allow for linearity checking, even though it can very happily be graphed.

Any thoughts on this? Thanks!

What about something like this?

ineq = parseInequality(this.latex)
left = ineq.lhs
right = ineq.rhs

line = xyLine(`${left}=${right}`)

ok = isDefined(line) and isDefined(ineq)

suffix: when ok "linear" otherwise "not linear"
1 Like

I could have sworn I tried exactly that and it didn’t work. Guess not.


1 Like