# Help with Parsing Standard Form Quadratic (Negative Coefficients and Special Cases)

**URL:** <https://cl.desmos.com/t/help-with-parsing-standard-form-quadratic-negative-coefficients-and-special-cases/7894>\
**Category:** Questions\
**Created:** [April 17, 2025, 6:48pm UTC](https://cl.desmos.com/t/help-with-parsing-standard-form-quadratic-negative-coefficients-and-special-cases/7894 "2025-04-17T18:48:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![French](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/french/32/4354_2.png) [@French](https://cl.desmos.com/u/French)\
**Post date:** [April 17, 2025, 6:48pm UTC](https://cl.desmos.com/t/help-with-parsing-standard-form-quadratic-negative-coefficients-and-special-cases/7894/1 "2025-04-17T18:48:06Z")

</div>

Hi All!

I’m working on building my parsing skills and made huge progress today. But I came across how literal everything needs to be. I want students to enter in standard form quadratics and have the terms parsed out for an animation I’m working on. Below is what I have so far. Any help would be appreciated!

> **[Parse Standard Quadratic • Activity Builder by Desmos Classroom](https://teacher.desmos.com/activitybuilder/custom/68014c000e36e61299c85c36?utm_campaign=share&utm_content=activity)**
>
> by TJ French

---

<div class="post-metadata">

**Author:** ![Daniel\_Wekselgreene](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_wekselgreene/32/1819_2.png) [@Daniel\_Wekselgreene](https://cl.desmos.com/u/Daniel_Wekselgreene)\
**Post date:** [April 18, 2025, 5:30am UTC](https://cl.desmos.com/t/help-with-parsing-standard-form-quadratic-negative-coefficients-and-special-cases/7894/2 "2025-04-18T05:30:16Z")

</div>

Parsing can be tricky, but there are some tools to help, like p.optional and p.anyOf. And also when you have a sum pattern, you can add in .allowNegativeTerms at the end. Here is an example for your use case: [[Copy of] Parse Standard Quadratic • Activity Builder by Desmos Classroom](https://teacher.desmos.com/activitybuilder/custom/6801e02a3b33e2394aff3727)

---

<div class="post-metadata">

**Author:** ![rbrigida](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rbrigida/32/1449_2.png) [@rbrigida](https://cl.desmos.com/u/rbrigida)\
**Post date:** [April 28, 2025, 11:15am UTC](https://cl.desmos.com/t/help-with-parsing-standard-form-quadratic-negative-coefficients-and-special-cases/7894/3 "2025-04-28T11:15:04Z")

</div>

I made a slide that will allow terms 1 and 2 to have no coefficients (invisible 1’s)  
(Slide 2)  
Not sure if this is helpful to aid you in your understanding.

p.sum(  
p.anyOf(p.product(number,p.exponent(x,two)),p.exponent(x,two)),  
p.anyOf(p.product(number,x),x),  
p.number)

> **[\[Copy of\] Parse Standard Quadratic • Activity Builder by Desmos Classroom](https://teacher.desmos.com/activitybuilder/custom/680fae447998f8722095069c?utm_campaign=share&utm_content=activity)**
>
> by Robert Brigida

(I also did not look at the other response..I guess that was done there as well…sorry)
