# Checking equation entered correctly, no graph

**URL:** <https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903>\
**Category:** Questions\
**Tags:** simplefunction, validation, correctness\
**Created:** [April 28, 2020, 3:40am UTC](https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903 "2020-04-28T03:40:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Holcomb](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_holcomb/32/433_2.png) [@Jeff\_Holcomb](https://cl.desmos.com/u/Jeff_Holcomb)\
**Post date:** [April 28, 2020, 3:40am UTC](https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903/1 "2020-04-28T03:40:18Z")

</div>

I am struggling with slide 13. I’ve got the table figured out, but I can’t figure out how to check to see that student entered something equivalent to D=2πR. I have been messing about with simpleFunction, parseEquation, and differenceFunction but can’t get there yet.

> **[7-3.5 How Far is it Around?! (Alternative) • Activity by Jeff Holcomb](https://classroom.amplify.com/activity/5ea1b767805ce86e3159fe6a)**
>
> This activity is an alternative to OUR lesson 7-3.5 Circumference and Wheels.
> 
> In making this alternative I am attempting to clarify that the circumference of a circle is about 6 times the radius. I think it should be striking to the students that it...

---

<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:** [April 28, 2020, 7:30am UTC](https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903/2 "2020-04-28T07:30:33Z")

</div>

Maybe evaluate a few using the difference function.

`studentFunction = parseEquation(input.latex).differenceFunction("D","R")`  
`check = studentFunction.evaluateAt(2, numericValue("2\\pi*2") = 0 and {another}`

You’ll get NaN if they didn’t use the correct variables, and nonzero if incorrect, so may use isDefined or something in combination.

---

<div class="post-metadata">

**Author:** ![Jeff\_Holcomb](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_holcomb/32/433_2.png) [@Jeff\_Holcomb](https://cl.desmos.com/u/Jeff_Holcomb)\
**Post date:** [April 28, 2020, 2:05pm UTC](https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903/3 "2020-04-28T14:05:28Z")

</div>

Hmm… I’m getting X when I input D=2πR to evaluate. Not sure where I am going wrong. Sorry.

[image|690x172](https://cl.desmos.com/uploads/short-url/bBQr0jo4CTdwn8gBAVtafRJ3GyC.png)

---

<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:** [April 28, 2020, 3:53pm UTC](https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903/4 "2020-04-28T15:53:59Z")

</div>

My bad I flip flopped the evaluateAt

Should be `evaluateAt(numericValue("2\\pi*2),2)`

Also I don’t know why I didn’t simplify to 4pi.

---

<div class="post-metadata">

**Author:** ![Jeff\_Holcomb](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_holcomb/32/433_2.png) [@Jeff\_Holcomb](https://cl.desmos.com/u/Jeff_Holcomb)\
**Post date:** [April 28, 2020, 6:33pm UTC](https://cl.desmos.com/t/checking-equation-entered-correctly-no-graph/903/5 "2020-04-28T18:33:17Z")

</div>

Bingo. I should have seen that too! Sorry. My head gets fuzzy with learning code stuff!
