MHB How to fit a quadratic function to two points?

AI Thread Summary
To fit a quadratic function through two points, such as (-4, 1) and (12, 1), one can use the general form of a quadratic equation, y = ax^2 + bx + c. Since there are more unknowns than data points, infinitely many quadratics can pass through these points. The function can be expressed as y = a(x + 4)(x - 12) + 1, where varying the value of 'a' generates different quadratic functions that still intersect at the given points. To uniquely define a quadratic function, at least three points are required, as this ensures a single solution for the coefficients a, b, and c.
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.
 
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
6
Views
1K
Replies
2
Views
1K
Replies
6
Views
2K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
5
Views
2K
Replies
2
Views
1K
Back
Top