### Quadratics

Package of problems

# GeoGebra constructions... quadratic edition Add to your resource collection Remove from your resource collection Add notes to this resource View your notes for this resource

## Solution

### Two points on the axis

Using GeoGebra, plot two points $A$ and $B$ on the $x$-axis of a graph. Can you instruct GeoGebra to draw a quadratic which passes through both of them?

Here is a solution:

We want the quadratic to pass through $A$ and $B$ on the $x$-axis. If we write the coordinates of these points as $A=(a,0)$ and $B=(b,0)$, we see that the roots of the quadratic must be $a$ and $b$.

A quadratic which has these roots is $y=(x-a)(x-b)$, so this is what we need.

To draw this in GeoGebra, we need to work out $a$ and $b$. We can do this by typing:

a = x(A)
b = x(B)
y = (x-a)(x-b)

or all in one go as:

y = (x-x(A))(x-x(B))

#### Taking it further

Developing this idea further, add a point $C$ to the $y$-axis. Can you make your quadratic pass through $A$, $B$ and $C$, like this?

Here is a solution:

In the first part of this problem, we found that one quadratic which passes through $A$ and $B$ has equation $y=(x-a)(x-b)$.

We could expand this to get $y=x^2-(a+b)x+ab$, and we see that the coefficient of $x^2$ is $1$.

There was no need for us to make this choice, though: we could choose any (non-zero) coefficient for $x^2$. So we could equally well have used $y=k(x-a)(x-b)$ as our equation, as this also passes through $A$ and $B$ on the $x$-axis.

This new quadratic crosses the $y$-axis where $x=0$; substituting in $x=0$ shows that the intercept is at $(0,kab)$. As we want it to cross the $y$-axis at $C(0,c)$, we choose $k$ so that $kab=c.$ This can easily be rearranged to get $k=\dfrac{c}{ab}$.

We can therefore specify the whole quadratic to GeoGebra as

y = y(C)/(x(A)*x(B)) * (x-x(A))(x-x(B))

We are assuming here that $ab\ne0$. If $ab=0$, this means that either $A$ or $B$ lies at the origin, and it is not going to be possible for the quadratic to then pass through both $A$ and $B$ along with $C$.

The one exception is if $C$ also lies at the origin. In this case, we have $k=0/0$, which is not defined. And geometrically, in this situation, we are only specifying where the quadratic crosses the $x$-axis, so there are many possibilities for the quadratic.

### One point as the vertex

On a new graph, plot a point $A$. Can you instruct GeoGebra to draw a quadratic which has its vertex at $A$?

Here is a solution:

Since we are thinking about the vertex of the quadratic, it makes most sense to work with the completed square form of the quadratic: $y=(x-a)^2+c.$ This has its vertex at $(a,c)$.

So if we write the coordinates of point $A$ as $(a_1, a_2)$, our quadratic could be $y=(x-a_1)^2+a_2.$

In GeoGebra terms, we can type this in as either:

a1 = x(A)
a2 = y(A)
y=(x-a1)^2+a2

or all in one go as

y=(x-x(A))^2+y(A)

#### Taking it further

Developing this idea further, add a point $B$ to the $y$-axis. Can you make your quadratic have its vertex at $A$ and pass through $B$, like this?

Here is a solution:

In the first part of this problem, we found that one quadratic which passes through $A$ has equation $y=(x-a_1)^2+a_2$.

As we noted in the “taking it further” part of question 1 above, there was no need for us to make the coefficient of $x^2$ equal to $1$. We could equally well have used $y=k(x-a_1)^2+a_2$ for any choice of $k$, for this also has its vertex at $A(a_1,a_2)$.

This new quadratic crosses the $y$-axis where $x=0$, so at $(0,ka_1^2+a_2)$. As we want it to cross the $y$-axis at $B(0,b_2)$ (where $B$ has coordinates $(0,b_2)$, we will choose $k$ so that $ka_1^2+a_2=b_2.$ This can easily be rearranged to get $k=\dfrac{b_2-a_2}{a_1^2}$.

We can specify this to GeoGebra all in one go as

y = (y(B)-y(A))/(x(A)^2) * (x-x(A))^2 + y(A)

As in question 1, we are assuming that $a_1\ne0$. What would happen if $a_1=0$?

### Any three points

The final (very hard) challenge: plot three points $A$, $B$ and $C$ anywhere on the graph, and draw a quadratic passing through these three points, like this:

Here is a solution:

We write $A(a_1,a_2)$, $B(b_1,b_2)$ and $C(c_1,c_2)$ as in the suggestion.

Is there more than one quadratic you could draw?