Erratic quadratic
Problem
Find a quadratic graph which is at most 1 unit of distance away from each of the six points
$$
(x, y) = (\pm 1, 0), (\pm 2, 4), (\pm 3, 16)
$$
Can you find the smallest distance from each of these points to your quadratic, either exactly or to two decimal places?
Can you find another quadratic graph for which the largest of these smallest distances from the points to the curve is smaller?
As an open extension, explore what you can say about configurations of points at least one of which must necessarily lie more than one unit of distance away from a quadratic.
Student Solutions
Steve says: When I made this problem I wondered how people might approach its solution. In my notes, I recorded that "This quadratic does the trick $y= 2(x-1)(x+1) -1$" and was delighted to see Herschel's and Ben's wonderful analyses by the least squares method improving upon this. I include both of these in full.
Both Ben, from Kenny, and Herschel, from the European School of Varese, realised that minimising the squared distance from the points reduced to an (involved!) exercise in calculus (Ben provides the details in his write-up). Both of the solvers discovered the 'ideal' solution
$$
f(x)= \frac{100}{49}x^2-\frac{20}{7}
$$
The least squares analysis needed to find this points towards the sort of thing that goes on at university, so very well done for thinking about this!
Read Ben's full, and very detailed solution, which I include as full pdf.
Herschel gave a lovely account of the thought process:
At first, when considering this problem, the only simple approach seems to be trial and error - experimenting with different values for $a$, $b$ and $c$ in $y=ax^2+bx+c$.
Since the points are symmetric about the vertical $y$-axis, we can reduce this to $y=ax^2+c$, so that our parabola is also symmetrical about the $y$-axis. One could try various combinations of $a$ and $c$ and search for a good combination, but there is no guarantee of a simple solution. Also, we need a way to measure the distance from a parabola to a point, which isn't easy if you don't know what the parabola is in the first place!
Mathematicians trying to fit a parabola to a set of data often use the "Least squares" method. Instead of trying to find the perpendicular (and usually diagonal) distance between the point and the curve, we will measure only the vertical distance. The distance between a point and the parabola could be positive or negative depending on whether the point is above or below the parabola. We want to find the sum of all these distances (errors) so we first make them all positive by squaring them (hence the name "Least squares" - we try to minimise the sum of the square of the distances). We can actually form a set of equations that use the Least Squares principle. Using some differentiation and calculus (which I won't delve into now), they can be reduced to a set of linear equations:
$$ 3c+14a=20\quad\quad 7c+49a=80 \quad\quad 28b=0$$
The third of these equations tells us straight away that $b=0$, although we already knew that! Solving the other two equations give us: $a=\frac{100}{49}, c=-\frac{20}{7}$ Thus, our "ideal" quadratic according to this method would be
$$
y = \frac{100}{49}x^2 -\frac{20}{7}
$$
Of course, we could round this to $a=2$ and $c=-\left(2+\frac{2}{3}\right)$, or even further to $c=-3$, so that we get a nice and simple final result of $y=2x^2-3$. Some might say that we could've just found this by trial and error, and indeed, they would be right - we would have skipped all the calculus and algebra and got to the answer much sooner! But where's the fun in that, eh? :)
For the second part of the question Ben looked at finding the smallest distances between the points and curve, and realised that the perpendicular distances are what are needed.
The smallest distance will lie along the normal of the line at a point where the normal also crosses the point given. In other words, a point on the line where the normal to that part of the line crosses the given point is the closest part of the line. So that means that first we must work out the derivative of $f(x)$; We can then include this in the formula for a straight line to work out the normal at each point and denote this as $g(x)$:
$$
g(x) = \frac{100}{49}x^2_0 -\frac{49}{200 x_0}x -\frac{3657}{1400}
$$
Ben then found the normals which pass through the points and solved numerically to show that:
... it may not be close for each predicted y-coordinate, but it does get very close for the iterated points and never exceeds being $0.2$ units away from any of the points given.
Ben rather cunningly also found another interesting solution by considering functions which pass exactly through the points and noting that splicing together two quadratics yields a solution.
As well as noticing that $f(x) = f(-x)$ I noticed another interesting property of this function (assuming the function goes through all the points). Imagine that it was a standard $x^2$ graph when $x> 0$, then the x values needed to pass through these points would be $0, 2, 4$. If you match these up with the ones we are given and call the standard ones $u$ and the given ones $x$ then you'll notice a basic pattern emerge if we map $x\rightarrow u$: $1\rightarrow 0, 2\rightarrow 2, 3\rightarrow 4, \dots, x\rightarrow 2x-2$. Therefore
$$
u=2(x-1) \mbox{ if } x> 0
$$
If you do this with $x< 0$ then the pattern becomes
$$
u=2(x+1) \mbox{ if } x< 0
$$
This means that u can be written as a function of $x$ (ie $u=g(x)$):
$$
g(x) = 2(x-1) \quad(\mbox{ if } x> 0)\quad;\quad 2(x+1) \quad(\mbox{ if } x< 0)
$$
This function returns the value of u, which we can then square to get the actual value of the function. Or mathematically
$$
f(x)=g(x)^2
$$
We can also simplify the function $g$ using the sgn function which returns the sign of the variable. In other words $sgn(+5)=+1$, $sgn(-123)=-1$, $sgn(0)=0$. Also note that $sgn(x)^2 = 1$, unless $x=0$. This simplifies $g(x)$ to
$$
f(x)=2(x-sgn(x))
$$
This can then be substituted into f(x) and simplified to give
$$
f(x)=4(x-sgn(x))^2 = 4x^2-8|x|+4
$$
This can be expressed as
$$
f(x)=4x^2-8\sqrt{x^2}+4
$$
This formula works, but breaks down when asked what $f(0)$ is, and its not really a proper quadratic, but other than that it can get all the right results and is 0 units away from every point.
Teachers' Resources
Why do this problem?
This problem is in two parts. The first part requires students to apply their knowledge of coordinate geometry and quadratic equations. The second part draws on problem solving, calculus and numerical methods.
Many NRICH tasks have been designed with group work in mind. Here we have gathered together a collection of short articles that outline the merits of collaborative work, together with examples of teachers' classroom practice.
Possible approach
Introduce the four group roles to the class. It may be appropriate, if this is the first time the class have worked in this way, to allocate particular roles to particular students. If the class work in roles over a series of lessons, it is desirable to make sure everyone experiences each role over time.
For suggestions of team-building maths tasks for use with classes unfamiliar with group work, take a look at this article and the accompanying resources.
Explain the tasks to the groups, and make it clear that everyone needs to be ready to share what they did with the rest of the class at the end of the sessions.
You may want to make calculators, spreadsheets, graphing software, squared or graph paper, poster paper, and coloured pens available for the Resource Manager in each group to collect.
While groups are working, label each table with a number or letter on a post-it note, and divide the board up with the groups as headings. Listen in on what groups are saying, and use the board to jot down comments and feedback to the students about the way they are working together. This is a good way of highlighting the mathematical behaviours you want to promote.
You may choose to focus on the way the students are co-operating:
Group A - Good to see you sharing different ways of thinking about the problem.
Group B - I like the way you are keeping a record of people's ideas and results.
Group C - Resource manager - is there anything your team needs?
Alternatively, your focus for feedback might be mathematical:
Group A - I like the way you chose to represent the situation with a graph. Could you use algebra to prove the result?
Group B - You've got an equation. What might be a good starting point for finding a numerical solution?
Group C - Good to see that someone's checking that each point is close enough to the quadratic.
Make sure that while groups are working they are reminded of the need to be ready to present their findings at the end, and that all are aware of how long they have left.
We assume that each group will record their diagrams, reasoning and generalisations for reporting back. There are many ways that groups can report back. Here are just a few suggestions:
- Every group is given a couple of minutes to report back to the whole class. Students can seek clarification and ask questions. After each presentation, students are invited to offer positive feedback. Finally, students can suggest how the group could have improved their work on the task.
- Everyone's posters are put on display at the front of the room, but only a couple of groups are selected to report back to the whole class. Feedback and suggestions can be given in the same way as above. Additionally, students from the groups which don't present can be invited to share at the end anything they did differently.
- Two people from each group move to join an adjacent group. The two "hosts" explain their findings to the two "visitors". The "visitors" act as critical friends, requiring clear mathematical explanations and justifications. The "visitors" then comment on anything they did differently in their own group.
Key questions
If your focus is mathematical, these prompts might be useful:
Can you draw a configuration of four points which can NEVER lie within one unit of distance of a parabola?
Is everyone in your group convinced that it is NEVER possible?
Possible extension
Providing well reasoned arguments for when it is and isn't possible to draw a quadratic near to four points is challenging. You might also ask when can you exactly fit a quadratic through different numbers of points.
Possible support