# What did you find a good way to assess correctness of solving equations

I want to create an assessment on solving quadratic equations. Is there a way to create checking of their answers so I can grade it? I was thinking of saying something like: The solution to (equations) are x=p and x= q, what is the product of p and q? (if the answers are rational) and doing something similar with (p ± q sqrt(r))/t. Are there any better idea?

Thank you!

Use two inputs or a table. For two inputs, something akin to:

#input1
correct: check1 or check2
solution1=\frac{ 4+\sqrt{2} }{3}
solution2=\frac{ 4-\sqrt{2} }{3}
check1= simpleFunction(this.latex).evaluateAt(2)=simpleFunction(solution1).evaluateAt(2)
check2= simpleFunction(this.latex).evaluateAt(2)=simpleFunction(solution2).evaluateAt(2)


Then for the other input

correct: (input1.script.check1 and check2) or (input1.script.check2 and check1)
solution1=\frac{ 4+\sqrt{2} }{3}
solution2=\frac{ 4-\sqrt{2} }{3}
check1= simpleFunction(this.latex).evaluateAt(2)=simpleFunction(solution1).evaluateAt(2)
check2= simpleFunction(this.latex).evaluateAt(2)=simpleFunction(solution2).evaluateAt(2)


simpleFunction is generally more reliable for comparing irrational/non-terminating decimals than numericValue.

What does “simple function” do ?

It’s a function. It defaults in terms of x, but you can define multivariable functions or in terms of different variables. It will take any latex in the form of an equation “y=…”, function form “h(x)=…” (doesn’t need to be h), or an expression, but not implicit equations.

(So, you may actually need to replace “this.latex” with “parseEquation(this.latex).rhs” if it doesn’t work with “x=…”).

I don’t know the ins and outs of it, but simpleFunction( ).evaluateAt( ) and numericValue( ), which needs to be an expression without any unknowns, are not calculated in the same manner. It can lead to some minor variances, but enough to be nonequivalent.

So how would actually set up the activity page ? Students enter their answers in two differents input boxes?

Also, is there a way to check for a quadratic equation that has no real solution?

Here’s how I’d approach it. I didn’t really throw any feedback in the note, but you might want to do so.
(Currently slide 1)

I’ve had some success working with patterns and checking radical expressions that way. Here’s a possible way to check using patterns.

# 1+3sqrt6/2 and 1-3sqrt6/2
p=patterns

sol1= p.sum(p.integer.satisfies("x=1"),