How to write a function that is the sum of all $y$ values at some $x$ value of a relation

161 Views Asked by At

For example, if I had the relation: $x^3 + 3x^2 + y^3 - y^2 - 15y + 20 = 0$, and I wanted to find the sum of all $y$ values at $x=1$.

So if my new function was $f(x)$, then $f(1)$ would be about $3.5 + 1.7 + (-4) = 1.2$.
How would I write such a function on desmos?

enter image description here

Maybe I could simplify and rewrite the relation, but that might not work for other relations.

1

There are 1 best solutions below

2
On

Hint: At $x=1$, the $y$ values are roots of the equation

$$1 +3 +y^3-y^2-15y+20=0.$$

Hence, what are the sum of the roots?

Apply Vieta's formula.

Note:

  • This only works directly because we have 3 real roots.
    Or alternatively, if you wanted to sum all real+complex roots.
  • The explicit roots when $ x = 1$ are $\approx -4.09, 1.75, 3.33$ which have a sum that's much closer to 1 instead of the 1.2 that you calculated from eyeballing it.