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

**URL:** <https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760>\
**Category:** Questions\
**Tags:** patterns, validation, correctness\
**Created:** [October 20, 2021, 7:57am UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760 "2021-10-20T07:57:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![GamaEuler](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/gamaeuler/32/3251_2.png) [@GamaEuler](https://cl.desmos.com/u/GamaEuler)\
**Post date:** [October 20, 2021, 7:57am UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/1 "2021-10-20T07:57:52Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [October 20, 2021, 3:43pm UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/2 "2021-10-20T15:43:50Z")

</div>

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

```auto
#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

```auto
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.

---

<div class="post-metadata">

**Author:** ![GamaEuler](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/gamaeuler/32/3251_2.png) [@GamaEuler](https://cl.desmos.com/u/GamaEuler)\
**Post date:** [October 20, 2021, 10:34pm UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/3 "2021-10-20T22:34:11Z")

</div>

What does “simple function” do ?

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [October 21, 2021, 12:11am UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/4 "2021-10-21T00:11:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GamaEuler](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/gamaeuler/32/3251_2.png) [@GamaEuler](https://cl.desmos.com/u/GamaEuler)\
**Post date:** [October 21, 2021, 1:39am UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/5 "2021-10-21T01:39:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GamaEuler](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/gamaeuler/32/3251_2.png) [@GamaEuler](https://cl.desmos.com/u/GamaEuler)\
**Post date:** [October 21, 2021, 1:53am UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/6 "2021-10-21T01:53:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [October 21, 2021, 3:30pm UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/7 "2021-10-21T15:30:38Z")

</div>

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)

> **[My Sandbox (Testing Grounds) • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f623cb66c99cf2a56962b9f)**
>
> by Daniel Grubbs

---

<div class="post-metadata">

**Author:** ![Elayna](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/elayna/32/2253_2.png) [@Elayna](https://cl.desmos.com/u/Elayna)\
**Post date:** [October 22, 2021, 9:28pm UTC](https://cl.desmos.com/t/what-did-you-find-a-good-way-to-assess-correctness-of-solving-equations/3760/10 "2021-10-22T21:28:33Z")

</div>

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

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

sol1= p.sum(p.integer.satisfies("x=1"),
            p.fraction(p.product(p.integer.satisfies("x=3"),p.radical(p.integer.satisfies("x=6"))),
                        p.integer.satisfies("x=2") )
            )
sol2= p.difference(p.integer.satisfies("x=1"),
                  p.fraction(p.product(p.integer.satisfies("x=3"),p.radical(p.integer.satisfies("x=6"))),
                        p.integer.satisfies("x=2") )
                   )
                   
check1= sol1.matches(this.cellContent(1,1) ) and sol2.matches(this.cellContent(1,2))
check2= sol1.matches(this.cellContent(1,2) ) and sol2.matches(this.cellContent(1,1))

correct: check1 or check2

```
