# Correct in Math Input in one form by not another

**URL:** <https://cl.desmos.com/t/correct-in-math-input-in-one-form-by-not-another/1576>\
**Category:** Questions\
**Created:** [September 26, 2020, 3:09am UTC](https://cl.desmos.com/t/correct-in-math-input-in-one-form-by-not-another/1576 "2020-09-26T03:09:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Peters](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kevin_peters/32/1045_2.png) [@Kevin\_Peters](https://cl.desmos.com/u/Kevin_Peters)\
**Post date:** [September 26, 2020, 3:09am UTC](https://cl.desmos.com/t/correct-in-math-input-in-one-form-by-not-another/1576/1 "2020-09-26T03:09:26Z")

</div>

I want the math input to be correct for certain algebraic forms but not others.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/a/a7bf268605470dd226bb24b04736b20f7cc7fec2.png)

I want it to be correct when the latex is `2x^2+5x+3-\frac{16}{4x-9}` or `2x^2+5x+3+\frac{-16}{4x-9}` but not correct when the latex is `\frac{8x^3+2x^2-33x-43}{4x-9}` or something similar even though the algebraic expressions are equivalent. I tried the code above, but it doesn’t quite work, and marks it correct regardless of the form.

The question I am asking is:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/c/cf57585e8484a80b2cf327a3b2271dc27d234610.png)  
so the form is important, to a degree…

---

<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:** [September 26, 2020, 5:06pm UTC](https://cl.desmos.com/t/correct-in-math-input-in-one-form-by-not-another/1576/2 "2020-09-26T17:06:38Z")

</div>

You could add the use of `countNumberUsage` instead of the `not(submit14.latex...)`. (Also, FYI you’re not making use of defining `input=submit14.latex` in `correct` and `submitDisabled` to simplify your code.)

`...and countNumberUsage(input,5)=1 and countNumberUsage(input,16)=1 ...`

It checks how many times a value is used. It doesn’t take negatives, so the count for 16 will be 1 whether they use 16 or -16. I only used 5 and 16 because they were the only unique values in the correct answer. You can also eliminate the use of values if you felt it was necessary:  
`...and countNumberUsage(input,8)=0...`

---

<div class="post-metadata">

**Author:** ![Kevin\_Peters](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kevin_peters/32/1045_2.png) [@Kevin\_Peters](https://cl.desmos.com/u/Kevin_Peters)\
**Post date:** [September 26, 2020, 7:25pm UTC](https://cl.desmos.com/t/correct-in-math-input-in-one-form-by-not-another/1576/3 "2020-09-26T19:25:31Z")

</div>

Thanks so much! I am wondering how I could define an input to simplify the code so I don’t have to list what need to be correct multiple times. Thanks again!

---

<div class="post-metadata">

**Author:** ![HumanizedMath](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/humanizedmath/32/2947_2.png) [@HumanizedMath](https://cl.desmos.com/u/HumanizedMath)\
**Post date:** [September 28, 2020, 5:55am UTC](https://cl.desmos.com/t/correct-in-math-input-in-one-form-by-not-another/1576/4 "2020-09-28T05:55:48Z")

</div>

This may be useful to you.

> [@Correct Answer Feedback (factoring examples)](https://cl.desmos.com/t/correct-answer-feedback-factoring-examples/311/4):
>
> CL cannot check for correctness by comparing two functions. So the way around it that is shown in the examples is to evaluate each function with two lists, use total to count up the list, and subtract the two functions. However, this does not give deference to the form the student writes it in. The best way I have found to account for form is to use cellNumberusage to look for the particular values that should be in the factored form, vertex form etc. I think picking up programming languages is…
