Recovering a quadratic polynomial from three values using calculus

2.6k Views Asked by At

I'm asked to solve this using calculus:

Let $$ f(x) = ax^2 + bx +c .$$ If $ f(1) = 3 $, $f(2) = 7$, $f(3) = 13$, then find $a$, $b$, and $f(0)$.

I know I can solve this using solving three equations simultaneously. And I can also solve this using Gauss Jordan or Gaussian elimination method by writing the augmented matrix. But I'm wondering is there any other method to solve this.

Solving by any method it turns out that $a = b = c = 1$.

11

There are 11 best solutions below

2
On
  1. Divide f(x) by a so leading co-efficient, let's call it A, is 1.

  2. Any quadratic with A = 1 has a parabolic graph, similar to the graph of y = x² apart from a translation ( slide)

To convince yourself, practice with graph and tracing paper, or use Ecxel/Mathematica to draw various graphs of quadratic polynomials with A=+1.

The last step is to determine what the translation , call it (p,q) is.

Use differentiation to find the minimum point of the displaced parabola f(x), and the translation to take it back to (0,0) which is always the minimum point of y=x²

I hope this helps you.

2
On

Rather than solving a system of 3 equations (which is long and tedious) we will use the method of Lagrange Interpolation. The idea here is $n$ points on a polynomial uniquely identify a polynomial of degree $(n-1)$.

Using your three points:

$$g(x) = \frac{(x-2)(x-3)}{(1-2)(1-3)}f(1) +\frac{(x-1)(x-3)}{(2-1)(2-3)}f(2)+\frac{(x-1)(x-2)}{(3-1)(3-2)}f(3)$$

We see that this function agrees with $f$ at $x = 1,2,3$ so we must have that $g = f$ (otherwise we have found two different polynomials that pass through the same 3 data points which we know cannot be true)

Multiply this out to reveal the values you desire!

2
On

If you don't know Lagrange interpolation, then observe that $f(x)-4x+1$ has roots at $x=1$ and $x=2$. Then we get $$ f(x)=a(x-1)(x-2)+4x-1 $$ and can find $a$ by substituting $x=3$.

2
On

Hint

We can use the following convenient geometric fact about the graphs of polynomials of degree $\leq 2$:

Lemma The slope $m$ of the secant line between points $(x_1, y_1)$ and $(x_2, y_2)$ on the graph of a polynomial function $f(x) := a x^2 + b x + c$ of degree $\leq 2$ is the slope of the tangent line to the graph of $f$ at the midpoint of the interval $[x_1, x_2]$, that is, $m = f'\left(\frac{x_1 + x_2}{2}\right)$.

Proof By definition, $$m := \frac{f(x_2) - f(x_1)}{x_2 - x_1} = \frac{(a x_2^2 + b x_2 + c) - (a x_1^2 + b x_1 + c)}{x_2 - x_1} = a (x_1 + x_2) + b,$$ but we can write this as $$2a\left(\frac{x_1 + x_2}{2}\right) + b = f'\left(\frac{x_1 + x_2}{2}\right) .$$ QED.

This lemma immediately gives $$f'\left(\tfrac{3}{2}\right) = f(2) - f(1), \qquad f'(2) = \frac{f(3) - f(1)}{2}, \qquad f'\left(\tfrac{5}{2}\right) = f(3) - f(2) .$$ Now, $f'$ is itself linear, so it satisfies the same property, and hence we can recover the second derivative of $f$ at a convenient point.

Computing gives $$f''(2) = f'\left(\tfrac{5}{2}\right) - f'\left(\tfrac{3}{2}\right) = [f(3) - f(2)] - [f(2) - f(1)] = f(3) - 2 f(2) + f(1) .$$ We now have $f(2), f'(2), f''(2)$, which lets us recover $f(x)$ from its Taylor polynomial at $x = 2$: $$f(2) + f'(2) (x - 2) + \tfrac{1}{2} f''(2) (x - 2)^2 .$$ Substituting and simplifying gives $f(x) = x^2 + x + 1$.

2
On

This problem has nothing to do with calculus. Knowing about the symmetries of the quadratic function one can proceed as follows:

Make $(2,7)$ your origin. This amounts to introducing the function $$g(y):=f(2+y)-7\ .$$ Then $$g(y)=a'y^2+b'y+c', \qquad g(-1)=-4,\quad g(0)=0,\quad g(1)=6\ ,$$ and therefore $$c'=0,\qquad 2a'=g(1)+g(-1)=2,\qquad 2b'=g(1)-g(-1)=10\ .$$ It follows that $g(y)=y^2+5y$, so that $$f(x)=g(x-2)+7=(x-2)^2+5(x-2)+7=x^2+x+1\ .$$

1
On

A solution that deliberately doesn't use any calculus...

Given: \begin{align} f(1) \colon\quad \phantom{4}a+\phantom{2}b+c &= 3 \tag{1}\\ f(2) \colon\quad 4a+2b+c&=7 \tag{2}\\ f(3) \colon\quad 9a+3b+c&=13 \tag{3} \end{align} Subtract $(1)$ from $(2)$ and $(3)$, respectively: \begin{align} 3a+\phantom{2}b &= 4 \tag{A}\\ 8a+2b &= 10 \tag{B} \end{align} Subtract $2(A)$ from $(B)$: $2a=2$, or $a=1$.

Plug $a$ into $(A)$: $b=4-3a=4-3=1$.

Plug $a$ and $b$ into $(1)$: $c=3-a-b=3-1-1= 1$.

Hence, $f(x)=x^2+x+1$ and $f(0)=1$.

1
On

A quadratic polynomial interpolation works quite well for a parabola. From Newton divided difference formula, you can write the following, with terms that cancel iteratively. Do no be afraid by the fractions, the technique is quite mechanical, and very practical for mental arithmetic extrapolation. Being of degree $2$, your function could be rewritten as:

$$f(x) = d_1 + d_2(x-x_1)+d_3(x-x_1)(x-x_2)$$ Now, find the $d_i$:

  • set $x=x_1=1$, you get $$d_1=f(1)=3$$
  • set $x=x_2=2$, you get $$d_2=\frac{f(x_2)-f(x_1)}{x_2-x_1} = \frac{7-3}{1} = 4$$
  • set $x=x_3=3$, you get $$d_3=\frac{\frac{f(x_3)-f(x_2)}{x_3-x_2} -\frac{f(x_2)-f(x_1)}{x_2-x_1}}{x_3-x_1} = \frac{6-4}{2} = 1$$

Hence: $$f(x) = 3+4(x-1)+1(x-1)(x-2)$$ thus $f(0)=1$.

0
On

One way is to consider the forward differences of the function. This is probably the fastest way if you are given consecutive values of a polynomial. In particular, define the forwards difference as follows: $$\Delta f(x) = f(x+1)-f(x).$$ Note that if we know $f(x)=ax^2+bx+c$ then one can find: $$\Delta f(x) = (2x+1)a + b$$ and we know from givens that $\Delta f(1)=4$ and $\Delta f(2)= 6$. Then, consider the second forwards difference: $$\Delta^2 f(x) = \Delta f(x+1) - \Delta f(x)$$ which, given $f(x)=ax^2+bx+c$ can be found as $$\Delta^2 f(x) = 2a$$ and we get $\Delta^2 f(1)=2$ from the givens. Thus $2a = 2$ so $a=1$.

Then we just work backwards: $$b = \Delta f(1) - 3a = 4 - 3 = 1.$$ Lastly, $$c=f(1) - b - a = 3 - 1 - 1 = 1.$$ Basically, the general idea is that, if we have a polynomial of degree $n$ with leading coefficient $a$, then $\Delta^n f(x) = n!\cdot a$ - that is, you take $n$ forwards differences, and get a constant function. Supposing you know the value of $\Delta^n f$ anywhere, this tells you the leading coefficient. Then, you subtract $ax^n$ from the polynomial, which leaves you with a polynomial of degree $n-1$ or less - so you just repeat the process on that, and read off the leading term.

This isn't quite calculus, but the basic idea is the same; we've just replaced the derivative with the forwards difference. We can build a system known as "discrete calculus" where everything regards this operator, and this gives a lot of the same results as usual calculus. One can also find calculus based proofs of the identities that come out of the process here - for instance, we can find that the $n^{th}$ forwards difference of a polynomial of degree $n$ has to be $n!\cdot a$ since it can be expressed as a weighted average of the values of the $n^{th}$ derivative near a point, but that's just a constant $n!\cdot a$.

1
On

Use calculus to solve this... Well, I can wedge some calculus in here...

The derivative of $f(x) = a x^2 + b x + c$ with respect to $x$ is $2ax+b$. By the Fundamental Theorem of Calculus, we have that \begin{align*} f(x) &= f(0) + \int_0^x 2 a t + b \,\mathrm{d}t \\ &= f(0) + (a t^2 + bt)_{t=x} - (a t^2 + bt)_{t=0} \\ &= f(0) + a x^2 + bx \text{.} \end{align*} (This is not a shocking revelation: $c = f(0)$.) Consequently, \begin{align*} f(1) = 3 &= f(0) + \int_0^1 2 a t + b \,\mathrm{d}t = f(0) + a + b \text{,} \\ f(2) = 7 &= f(0) + \int_0^2 2 a t + b \,\mathrm{d}t = f(0) + 4a + 2b \text{, and} \\ f(3) = 13 &= f(0) + \int_0^3 2 a t + b \,\mathrm{d}t = f(0) + 9a + 3b \text{.} \end{align*} This has the convenient property that it exactly contains the expressions, $a$, $b$, and $f(0)$, that are sought in the Question. Now we look at how the function changes between the given points. \begin{align*} f(2) - f(1) = 4 &= \int_1^2 2 a t + b \,\mathrm{d}t = 3a+b \text{ and} \\ f(3) - f(2) = 6 &= \int_2^3 2 a t + b \,\mathrm{d}t = 5a + b\text{.} \end{align*} These tell us $2a=2$, or $a=1$. Then the first tells us that $b=1$. From $3 = f(1) = f(0) + a + b$, we find $f(0) = 1$.

0
On

You can also consider the 3 dimensional vector space $V$ of functions that map the set $S = \{1,2,3\}$ to the real numbers. The functions $f_1(x) = 1$, $f_2(x) = x$ and $f_3(x) = x^2$ restricted to $S$ are 3 linear independent elements of $V$. Let's define an inner product on $V$:

$$a\cdot b = \sum_{k=1}^{3}a(k) b(k)$$

Then we can construct an orthonormal basis using the functions $f_j(x)$ using the Gram-Schmidt method. We start by normalizing $f_1$ to obtain our first basis vector:

$$e_1(x) = \frac{f_1(x)}{|f_1|} = \frac{1}{\sqrt{3}}$$

We then subtract from $f_2$ the component in the direction of $e_1$:

$$g_2(x) = f_2(x) - (f_2\cdot e_1)e_1(x) = x - 2$$

Normalizing $g_2$ gives us our next basis vector:

$$e_2(x) = \frac{1}{\sqrt{2}}(x-2)$$

Subtracting the components of $f_3$ in the subspace spanned by $e_1$ and $e_2$ yields:

$$g_3(x) = f_3(x) - (f_3\cdot e_1)e_1(x) - (f_3\cdot e_2)e_2(x) = x^2 - 4 x +\frac{10}{3} $$

Normalizing $g_3$ yields the final basis vector:

$$e_3(x) = \sqrt{\frac{3}{2}}\left(x^2 - 4 x +\frac{10}{3}\right)$$

We can now expand the function $f(x)$ in this orthonormal basis:

$$f(x) = \sum_{r=1}^3 (f\cdot e_r) e_r(x) = x^2 + x + 1$$

0
On

This caught my eye: $$ \begin{eqnarray} f(1)=&3&=2\cdot1+1 \\ f(2)=&7&=3\cdot2+1 \\ f(3)=&13&=4\cdot3+1 \\ \end{eqnarray} $$

So, $g(x)=f(x)-((x+1)x+1)$ is a quadratic polynomial that has $3$ zeros and so must be the zero polynomial.

Therefore, $f(x)=(x+1)x+1=x^2+x+1$.