# Verifying Simple Expression Equivalence in a Spreadsheet

For simple expressions with easily derived canonical forms (eg polynomials and simple rational expressions), is there a way to leverage existing tools to verify that two expressions are equal when those expressions are expressed in programming form (ie, 2x^2+3x+1 and (4x^2+6x+2)/2) in two separate cells of a spreadsheet?

I'm drawn toward Google Sheets and Gapps script because I could leverage java libraries, but this might not be a programming question if there is a simpler approach.

To make the connection to math education more clear, the purpose of this question is to allow a teacher to get math responses in a free response quiz (eg, via google forms), then grade the quiz automatically so much as is possible, largely cutting down on the time required to grade.

This is possible via multiple choice responses, but this format is less accurate for assessing student understanding. This question is in the educator's forum because it's possible that someone has accomplished this task already or by using a different approach. Otherwise, this is a programming question (which is asked in the appropriate forum as well).

• Does everything need to fit into two separate cells, or could one, two, or three columns be used? Sep 27, 2018 at 0:10
• Any number of cells could be used. @TommiBrander correct, this is about answer validation. Sep 27, 2018 at 13:50
• This appears to be a duplicate of your prior question, both of which are off topic on this site. Sep 27, 2018 at 23:24
• This is off-topic because there isn't a pedagogical answer, or because using computerized grading tools for math education isn't something math educators concern themselves with? I'm not looking for programming answers here, I'm looking for pedagogical answers, such as the great answer by Daniel Collins. Sep 29, 2018 at 8:34

• I agree with your conclusion, but without some really pedantic instructions (which don't work well in less advanced situations) telling students to "simplify" will still create problems. For instance, (x+3)(x-2)^2=(x-2)(x-2)(x+3)=(x-2)^2(x+3). I could introduce ordering, make a database full of possibly correct solutions, etc, but this isn't ideal. Do you have any suggestions for ambiguous ordering cases? Sep 29, 2018 at 8:22
{"ft_lang_label":"__label__en","ft_lang_prob":0.93910974,"math_prob":0.7566204,"size":1128,"snap":"2022-05-2022-21","text_gpt3_token_len":227,"char_repetition_ratio":0.104982205,"word_repetition_ratio":0.0,"special_character_ratio":0.19946809,"punctuation_ratio":0.073529415,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96922,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-27T12:43:58Z\",\"WARC-Record-ID\":\"<urn:uuid:91e05e3c-3dca-410a-a460-2d6b724fb201>\",\"Content-Length\":\"234173\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:620a9986-6d1e-400f-918c-7ead2fd3112e>\",\"WARC-Concurrent-To\":\"<urn:uuid:a7405da7-ae26-476a-9304-ffdc6694135d>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://matheducators.stackexchange.com/questions/14606/verifying-simple-expression-equivalence-in-a-spreadsheet\",\"WARC-Payload-Digest\":\"sha1:76SG567XUIWDAFUEUTSFCL6ZQGNVAXMH\",\"WARC-Block-Digest\":\"sha1:OJKCCJYEHRK6HJS5RO7SRVWMUVOJEETJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662647086.91_warc_CC-MAIN-20220527112418-20220527142418-00278.warc.gz\"}"}