# Create a formula by given solutions

For my upcoming middle school exams I will need to convert a formula.

I have got the following question:

Create a formula which has the following solutions: $$x_{1} = 5,\quad x_{2} = -3.$$

The solutions say that $$(x−5)⋅(x+3)=0$$ is possible. But they don't explain how they did it.

My question is also: How can I create that formula by myself?

First, can you understand that $x_1 = 5$, and $x_2 = -3$ are solutions to

$$(x - 5)(x + 3)= 0\quad ?$$

Just substitute $x = 5$ and see that you get, as desired $0 = 0$.

Similarly, substitute $x = -3$, then $(x - 5)(x + 3) = (-3 - 5)(-3 + 3) = -8 \times 0 = 0\quad \checkmark$

Suppose you are given two values which are said to be solutions to some equation.

Say $\,x_1 = a\,$ and $\,x_2 = b\;$ are the given solutions; then we will always have that $$(x - a)(x - b) = 0$$

So in the case of $\;x_1 = 5,\quad x_2 = -3$, we have $$(x - 5)(x - (-3)) = 0$$ $$\iff (x - 5)(x+3) = 0$$

This is true in general: If your are given that $x_1, \;x_2,\; ... x_n$ are solutions to some equation, then it will always be the case that $$\underbrace{(x - x_1)(x-x_2)\cdots (x - x_n)}_{n\; \text{ factors}} = 0$$

• Note: the solutions $x_1, x_2, \cdots, x_n$ are often called the "zeros" of the equation $(x - x_1)(x-x_2)\cdots (x -x_n) = 0$, because in each case, if we put $x = x_i$, the equation will have a factor equal to zero on the left, and hence, the product as a whole will be equal to zero, since $0\, \times \text{ anything} \; = 0$ Commented Apr 14, 2013 at 19:01
• I understood the first part ((x-x_{1})(x-x_{2}) with that example; I used 1 and 2. But I didn't understand the second part with more that 2 return values because I cannot solve the equation. May you give me an example which a square with 1, 2, 3 as values of x? I don't mean $$(x-x_{1})(x-x_{3})$$ (x-x_{2}) I mean a equation like my example. Commented Apr 14, 2013 at 20:04
• A square function will only have 2 solutions/zeros. If there are 3 solutions, like, say $(x - 3)(x-2)(x-1) = 0$, with solutions 3, 2, and 1, then it would be a cubic: $x^3 - 6x^2 + 11 x - 6 = 0$. So if you're dealing only with quadratics $x^2 \cdots$, then you only have two zeros/solutions. Commented Apr 14, 2013 at 20:12
• Of course you might have repeated roots: like $(x - 2)^2 = 0$ in which case you have $(x - 2)(x-2) = 0$ with $x_1, x_2 = 2$ Commented Apr 14, 2013 at 20:15
• @amWhy: Excellent guidance as usual! + 1 Commented Apr 15, 2013 at 0:34

If your solutions are $x_1,...x_n$

An easy way is $(x-x_1)...(x-x_n)$

Here your $x_1=5,x_2=-3$ using the formula gives $(x-5)(x--3)=(x-5)(x+3)$

Of course, I am, in no way, suggesting this is the only way to create an equation to which has only these two numbers as solutions, but it is the simplest polynomial.