# Write Note based on Value of Equation (Discriminant)

**URL:** <https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511>\
**Category:** Questions\
**Created:** [June 13, 2019, 11:28am UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511 "2019-06-13T11:28:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrabourn](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mrabourn](https://cl.desmos.com/u/mrabourn)\
**Post date:** [June 13, 2019, 11:28am UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/1 "2019-06-13T11:28:56Z")

</div>

I have a general quadratic in the form of ax^2 +bx + c with sliders. I also have the discriminant, b^2-4ac in a separate expression. I would like a note to change what it says based on 3 conditions: discriminant \< 0, discriminant = 0, and discriminant \> 0 which is based on the position of the sliders.

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [June 13, 2019, 1:42pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/2 "2019-06-13T13:42:06Z")

</div>

Welcome!

In the note component, you just need to set the content to have some conditionals based on the value of the discriminant. Here’s an example:

> **[Quadratic Function • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5d024e4ad23a56596b23e2e0)**
>
> by Craig Winske

---

<div class="post-metadata">

**Author:** ![mrabourn](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mrabourn](https://cl.desmos.com/u/mrabourn)\
**Post date:** [June 13, 2019, 6:07pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/3 "2019-06-13T18:07:08Z")

</div>

Wow,  
That is great, thank you so much! In addition to the scripting, you have shown me how to make custom sliders…so cool, even though I don’t understand everything, I will be able to follow your example.

Could you explain why the sliders are 1/5 a, b, c and what the `a=${a}`, etc is doing?

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [June 13, 2019, 7:41pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/4 "2019-06-13T19:41:45Z")

</div>

For the points on the sliders, I needed the x-values of the coordinates to correspond to the values of a, b, and c from the quadratic function. Because of where I placed the horizontal lines, the correspondence was a linear relationship that happened to be 1/5a-6. If I moved those sliders to another quadrant (or even change their length), that relationship would change.

As for `a=${a}`, this is to show the label of the a-value in the quadratic function. Since the value changes when the slider moves, putting ${a} in the label will show the number as it changes. You could also use that notation in the note component for dynamic values. I believe I did that for the discriminant value in the note.

---

<div class="post-metadata">

**Author:** ![mrabourn](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mrabourn](https://cl.desmos.com/u/mrabourn)\
**Post date:** [June 13, 2019, 9:28pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/5 "2019-06-13T21:28:51Z")

</div>

Thanks so much for your help. One other idea that I thought would be nice would be to have the equation, ax^2 + bx + c dynamically changing with the slider(s) in either the note or the heading. Is this complicated?

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [June 14, 2019, 4:48pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/6 "2019-06-14T16:48:53Z")

</div>

I updated the activity linked above to include the equation in the note, although it’s not very elegant if the variables are less than 1.

Check out slide 1 of this activity for something that looks a bit nicer.

> **[Creating Parabolas • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5a8f38aef6cd6708ac320d9d)**
>
> I added a first screen. We did this on the prior day but start here again with their noticings.
> 
> I will pace students through the 7 screens as they create parabolas using the vocabulary vertex, axis of symmetry and zeroes.

---

<div class="post-metadata">

**Author:** ![mrabourn](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mrabourn](https://cl.desmos.com/u/mrabourn)\
**Post date:** [June 14, 2019, 6:34pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/7 "2019-06-14T18:34:31Z")

</div>

Several great ideas here, thanks. I only moved the position of the equation to the other side of the graph.

Mike

---

<div class="post-metadata">

**Author:** ![ewa](https://avatars.discourse-cdn.com/v4/letter/e/76d3ee/32.png) [@ewa](https://cl.desmos.com/u/ewa)\
**Post date:** [May 27, 2020, 9:38pm UTC](https://cl.desmos.com/t/write-note-based-on-value-of-equation-discriminant/511/8 "2020-05-27T21:38:50Z")

</div>

It doesn’t work for a=0
