# How to check equation input of students

**URL:** <https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641>\
**Category:** Questions\
**Tags:** patterns\
**Created:** [January 6, 2023, 8:04am UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641 "2023-01-06T08:04:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pinar\_Akbay](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Pinar\_Akbay](https://cl.desmos.com/u/Pinar_Akbay)\
**Post date:** [January 6, 2023, 8:04am UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/1 "2023-01-06T08:04:06Z")

</div>

Hello Everyone, I want to learn how to check equation input in desmos activities. The answer of the question will be 3x+4=21 for example. When the student writes this answer, she will get immediate feedback by smile emoji  
Thank you  
Pınar

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [January 7, 2023, 4:37pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/2 "2023-01-07T16:37:44Z")

</div>

Hi Pinar! Here is an example of one way to check equation inputs:

> **[Check equation input • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/63b99a97f10cb2c116b42b31)**
>
> by Ian M

Instead of checking for the exact equation 3x+4=21, it looks for any equation with x=17/3 as a solution. This way, students can enter something slightly different like 21=4+3x without being marked incorrect. I hope that helps!

---

<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:** [January 8, 2023, 2:16pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/3 "2023-01-08T14:16:10Z")

</div>

Your intended purpose is a little important here. Is it for representing a word problem? In which case, using the particular values are important, but you might want to allow for commutative answers. You can add something like:

```auto
...and countNumberUsage(this.latex,3)=1 and countNumberUsage(this.latex,4) 
         and countNumberUsage(this.latex,21)=1 and countNumberUsage(this.latex)=3

```

This will check that those particular numbers (not digits) are being used once each in the answer, and there are only 3 numbers total used. Alternatively, look into some pattern matching, which can get complex.

---

<div class="post-metadata">

**Author:** ![Pinar\_Akbay](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Pinar\_Akbay](https://cl.desmos.com/u/Pinar_Akbay)\
**Post date:** [January 8, 2023, 4:38pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/5 "2023-01-08T16:38:53Z")

</div>

Thank you for your help. I wrote all the possible answers including commutatives. I really meant any equation with x=17/3. Thank you again

---

<div class="post-metadata">

**Author:** ![Pinar\_Akbay](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Pinar\_Akbay](https://cl.desmos.com/u/Pinar_Akbay)\
**Post date:** [January 8, 2023, 4:40pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/6 "2023-01-08T16:40:57Z")

</div>

I wrote all the possible answers including commutatives, I realized that there must be a way other than this because ther can be alternative answers from students that I did not include as a correct answer. Thank you for the help, I appreciate.

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [January 8, 2023, 8:47pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/7 "2023-01-08T20:47:43Z")

</div>

I’m glad that helped!

In the interest of thoroughness, I’ll also add that for some equations, I think you could run into rounding errors introduced by the calculator (someone who knows more about this than I do, chime in!). If that happens, you might need to check that the function rounds to 0, rather than being exactly 0:

```auto
numericValue(`\round( ${parseEquation(input.latex).differenceFunction("x").evaluateAt(numericValue(`17/3`))},3)`)=0

```

---

<div class="post-metadata">

**Author:** ![Pinar\_Akbay](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Pinar\_Akbay](https://cl.desmos.com/u/Pinar_Akbay)\
**Post date:** [January 9, 2023, 5:56am UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/8 "2023-01-09T05:56:54Z")

</div>

Thank you for your help. It didn’t happen but just in case

---

<div class="post-metadata">

**Author:** ![Pamela\_Davis](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/pamela_davis/32/1890_2.png) [@Pamela\_Davis](https://cl.desmos.com/u/Pamela_Davis)\
**Post date:** [January 10, 2023, 2:57pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/9 "2023-01-10T14:57:45Z")

</div>

Looks like you have something that works. This is what I use to check linear equations which will allow them to write the equation in many different ways.

> **[Check equation input • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/63bd7ac6c5539342c6f6ed40)**
>
> by Pamela Davis

---

<div class="post-metadata">

**Author:** ![Pinar\_Akbay](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Pinar\_Akbay](https://cl.desmos.com/u/Pinar_Akbay)\
**Post date:** [January 11, 2023, 7:24am UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/10 "2023-01-11T07:24:21Z")

</div>

Thank you a lot for different solution ways 🙂

---

<div class="post-metadata">

**Author:** ![Luis\_Montes](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/luis_montes/32/3899_2.png) [@Luis\_Montes](https://cl.desmos.com/u/Luis_Montes)\
**Post date:** [January 24, 2024, 3:14pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/11 "2024-01-24T15:14:05Z")

</div>

Thanks for this entire thread and especially to ian for the clarifying point.  
I was setting up this sort of self-checking activity and was baffled that Desmos would mark an input like “x=sqrt{75}” as correct but would mark “x^2=75” as incorrect. I take it that’s a calculator rounding issue. Any suggestions for a resource for more info on this sort of issue and cases I should be aware of?

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [January 24, 2024, 3:30pm UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/12 "2024-01-24T15:30:51Z")

</div>

Good catch! When I used CL to pull the numeric value of sqrt(75) and square it, I ended up with:

 ![Screenshot 2024-01-24 at 10.21.38 AM](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/e/eb6976141a9ee244e3d8aa0542e9a1f2f620a3f4.png)

Other folks on this forum introduced me to rounding as a best practice for checking answers, and unfortunately I haven’t seen other resources outside of forum posts. In general, I would err on the side of using rounding rather than exact equality checks, but you can safely leave a tiny margin of error, like 10^(-10). You can also experiment and type something like `${numericValue("\sqrt{75}^2")}` inside the content for a note and see if a rounding error arises.

---

<div class="post-metadata">

**Author:** ![Pinar\_Akbay](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Pinar\_Akbay](https://cl.desmos.com/u/Pinar_Akbay)\
**Post date:** [February 5, 2024, 9:53am UTC](https://cl.desmos.com/t/how-to-check-equation-input-of-students/4641/13 "2024-02-05T09:53:12Z")

</div>

it also works, thanks a lot for your valuable help
