How to fit a quadratic function to two points?

Click For Summary

Discussion Overview

The discussion revolves around fitting a quadratic function to two specific points on a Cartesian plane, namely (-4,1) and (12,1). Participants explore the concept of interpolation, the conditions required to define a quadratic function, and the implications of having fewer points than unknowns in the quadratic equation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant proposes a quadratic function based on the two points and expresses uncertainty about the method used to derive it.
  • Another participant explains that fitting a quadratic function to two points results in infinitely many solutions due to having more unknowns than data points.
  • Some participants discuss the necessity of three points to uniquely define a quadratic function, suggesting that at least three points are needed for exact interpolation.
  • Questions arise regarding the role of the constant term in quadratic functions and whether functions without a constant can still pass through the given points.
  • Several participants experiment with different values for the coefficient 'a' in the quadratic function, generating multiple quadratic equations that pass through the same two points.
  • One participant connects the concept of zero product property to the interpolation of functions, demonstrating how to derive quadratic functions that pass through points on the x-axis.
  • There is a discussion about the relationship between the number of points needed for interpolation and the degree of the polynomial, with a suggestion that d+1 points are needed for a polynomial of degree d.

Areas of Agreement / Disagreement

Participants generally agree that at least three points are needed to uniquely define a quadratic function, but there is no consensus on the implications of having only two points, as some explore the infinite solutions available in that case.

Contextual Notes

Participants express uncertainty regarding the derivation of quadratic functions from given points, particularly in terms of the constant term and the conditions under which certain forms of the quadratic function can be used. The discussion also highlights the limitations of interpolation when fewer points are available than required to determine all coefficients.

Who May Find This Useful

This discussion may be useful for students and enthusiasts of mathematics, particularly those interested in polynomial functions, interpolation methods, and the properties of quadratic equations.

samir
Messages
27
Reaction score
0
Hi!

I am trying to build a better understanding of quadratic functions. So I had this idea of trying to fit a quadratic function to two arbitrary points, but I am not sure how this really works.

Given the points (-4,1) and (12,1) on a Cartesian plane, how can a quadratic function be defined whose graph passes through these points?

This is what I managed so far.

$$f(x) = (x + 4)(x - 12)+1$$

$$f(x) = x^2-8x-47$$

I am not sure why I did that. But that's definitely a function whose graph passes though the points. I seem to recall some kind of formula to find the function rule based on two zero points. To that, I added the constant 1, because my graph needs to intersect $$g(x)=1$$ instead of the "zero" point along the x-axis as in $$h(x)=0$$.

Can someone explain this to me? Why is this working? What is the formula for this, if there is any?

This is only one of several possible quadratic functions whose graph passes through these two points. How can I define additional functions that pass through the same two points?
 
Mathematics news on Phys.org
What you're doing is called "interpolation". In your case, you're doing exact interpolation, where your model function (in your case, a quadratic) actually goes through all your data points. The general quadratic is $ax^2+bx+c$, with three unknowns, $a,b,c$. You can think of your data points as "information" that can help you to determine the unknowns. But in your case, you have fewer data points than you have unknowns. This means, as you've indicated, that you can have infinitely many quadratics fit through only two data points. However, throw in another data point, and you'll almost certainly nail down the last unknown (so there would only be one quadratic, in general, through three data points). How could you find them? By taking the general equation $y=ax^2+bx+c$, and plugging in your data points to get a simultaneous system of equations. With your two data points, you would have the system
\begin{align*}
1&=a(-4)^2+b(-4)+c \\
1&=a(12)^2+b(12)+c.
\end{align*}
You can solve this, but you'll find a parametric solution - that is, infinitely many solutions.

Alternatively, you can notice that, for your base solution to the problem, if you multiply the first term by an arbitrary constant, you can generate infinitely many solutions:
$$y=a(x+4)(x-12)+1.$$
At the two data points, the first term still vanishes, leaving you with $y=1$. But now you can generate (it turns out, all) other solutions by choosing a particular value of $a$.

Does this answer your question?
 
Must we know 3 points in order to exactly define a quadratic function? Not just any quadratic function, but the quadratic function whose graph passes through exactly the 3 given points? So each quadratic function is graphically defined by the graph that passes through exactly 3 points? Or maybe I should say 3 or more points? At least 3 points? At least 3 points are needed to exactly interpolate a quadratic function?

What about functions that have no constant?

In my example, the points (-4,1) and (12,1) are 1 unit above origin, 1 unit above the x axis.

So the function that passes though these points will need to have a constant C.

$y=ax^2+ax+c$

How about functions that don't have the constant term?

$y=ax^2+ax$

Such function would not be able to pass through points (-4,1) and (12,1)? Correct?

But do such functions have the constant term C? Are they simply omitted because the constant evaluates to zero?

$y=ax^2+ax=ax^2+ax+0$

If a, b and c in $ax^2+bx+c$ are the "unknowns", then what is the x? I thought a, b and c were called coefficients.

In the statement $y=ax^2+ax$ the a is equivalent to factor 1 in $f(x) = 1 \cdot (x + 4)(x - 12)+1$?

I tried plugging in some different values for a.

$y=a(x+4)(x-12)+1$

$a=2$

$y=2(x+4)(x-12)+1$

$y=2x^2-16x-95$

$a=3$

$y=3(x+4)(x-12)+1$

$y=3x^2-24x-143$

$a=-1$

$y=-1(x+4)(x-12)+1$

$y=-x^2+8x+49$

$a=-2$

$y=-2(x+4)(x-12)+1$

$y=-2x^2+16x+97$

But for a=0 I got a constant function.

$a=0$

$y=0(x+4)(x-12)+1$

$y=0+1$

$y=1$

Is this the idea? Is this why we factorize the function? Using inverses of x coordinates, i.e. inverse of -4 and 12? I'm trying to understand where the (x+4) and (x-12) comes from, why I did that. I'm sorry if this is too many questions for one thread. If so, let me know and I will post a new thread. I'll try to figure this out on my own from here. I appreciate your help!
 
I think I get it now! This really relates functions to equations. I modified the original problem such that my points will sit on the x axis, in other words so that any given quadratic function has the function value 0 at the given points. I even went a step further by plotting two different points.

Given the points (-4,0) and (4,0).

The function value at these points must be 0, which is stated already by the points (ordered pairs (x,y)).

This allows me to make the following statement.

$0=(x+4)(x-4)$

$0=x^2-4^2$

$0=x^2-16$

$f(x)=x^2-16$

I believe this is called zero product property?

By adding the inverse of -4 to -4 I can get the product 0. By adding the inverse of 4 to 4 I can get the product 0. If anyone factor is 0, then the product is also 0.

This even works for three points along the same horizontal line.

Given the points (-4,0); (2,0) and (4,0).

$0=(x+4)(x-2)(x-4)$

$0=x^3-2x^2-16x+32$

$x^3-2x^2-16x+32$

$g(x)=x^3-2x^2-16x+32$

This is a cubic function, and it's only one of many that can pass through the three points. Correct? To get the exact interpolation of a cubic function one would need at least 4 points? Correct? Can we claim that the number of points needed for exact interpolation of polynomial functions is d+1 where d is the degree of the polynomial?

What I need to figure out is what happens when the function value is 1.

Given the points (-4,1) and (12,1) define a quadratic function whose graph passes through these points.

And this is done by solving the system of following two equations.

$\begin{align*}
1&=a(-4)^2+b(-4)+c \\
1&=a(12)^2+b(12)+c.
\end{align*}$

However, because this needs to be a quadratic function, which is of second degree, we need at least 3 points to interpolate exactly one function. But because we are missing the third point, the solution to this system will be a parametric solution, i.e. infinitely many quadratic functions?

Did I get that right now?

I haven't studied parametric solutions yet, so that's really out of my league right now. But I appreciate that you mention it so I can at least become familiar with the terminology. Besides, I was not really looking to exactly interpolate one single quadratic function. (Again, thanks for using the right terminology.) I was only looking for ways to define arbitrary quadratic functions that pass through my points of interest.
 
Last edited:
I understand now why a, b, and c in $ax^2+bx+c$ are the "unknowns".

\begin{align*}
1&=a(-4)^2+b(-4)+c \\
1&=a(12)^2+b(12)+c.
\end{align*}

The x and y from each point need to be plugged into the general formula for the quadratic function. What is left then are the unknown coefficients.

I also understand that I can use the zero product property, not only for 0 function values, but also for 1 function values by adding a 1 to both sides of the equality.

Given the points (-4,0) and (12,0), the way to define a function that passes through these points is...

$0=(x+4)(x-12)$

Because $(x+4)$ with $x=-4$ gives $(-4+4)=0$ and because $(-4+4)=0$, then $(x+4)(x-12)=0$.

Expanding the expression we get:

$0=x^2-8x-48$

Given the points (-4,1) and (12,1), the way to define a function that passes through these points is...

The same as $0=(x+4)(x-12)$ but we add a 1 to both sides.

$0+1=(x+4)(x-12)+1$

$1=(x+4)(x-12)+1$

Expanding the expression we get:

$1=x^2-8x-47$

I believe this only works when both points are on the same horizontal line, that is when they have the same function or y value, which in these examples was either 0 or 1.

The general formula for this can be described as:

For the points

$(x_{1},y_{1})$

$(x_{2},y_{1})$

we have

$y_{1}=(-(x_{1})--(x_{1}))(-(x_{2})--(x_{2}))+y_{1}$

I have put in the negative sign just to get the inverse of each x coordinate, so that the difference of the two inverses will evaluate to zero. This should also work for more than two points.

$(x_{1},y_{1})$

$(x_{2},y_{1})$

$...$

$(x_{n},y_{1})$

But it will not work if the points have different function or y value.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K