Back to problem set

Disclaimer: these are my personal solutions; they have not been reviewed, so be careful relying on them as there might be errors. Some competitions may have official solutions from the contest publishers which you may wish to refer to instead if you’re looking for verified solutions.

Problem 4

Find the quadratic polynomial p(t)=a0+a1t+a2t2p(t) = a_0 + a_1 t + a_2 t^2 such that:

01tnp(t)dt=nfor n=0,1,2. \int_0^1 t^n p(t) dt = n \quad \textrm{for} \ n = 0, 1, 2.

Hints

Hint #1

There are 3 unknowns and 3 values of nn … what can you do with that?

Answer

Try solving it first! This only has the final answer, not the solution.

p(t)=24168t+180t2 \boxed{ p(t) = 24 - 168 t + 180 t^2 }

Solution

Try solving it first before peeking at the solution!

The goal is to find p(t)=a0+a1t+a2t2p(t) = a_0 + a_1 t + a_2 t^2, which means that we need to find a0a_0, a1a_1, and a2a_2, or 3 unknowns. Conveniently, we have 3 equations, in the form of the integral expression that equals 00, 11, or 22, so let’s start with those.

Let’s first evaluate the equation where n=0n = 0:

01t0(a0+a1t+a2t2)dt=001(a0+a1t+a2t2)dt=0(a0t+a12t2+a23t3+C)01=0(a0t+a12t2+a23t3+C)1(a0t+a12t2+a23t3+C)0=0a0+a12+a23=0(1) \begin{align*} \int_0^1 t^0 (a_0 + a_1 t + a_2 t^2) dt & = 0 \\ \int_0^1 (a_0 + a_1 t + a_2 t^2) dt & = 0 \\ \left( a_0 t + \frac{a_1}{2} t^2 + \frac{a_2}{3} t^3 + C \right) \Big|_0^1 & = 0 \\ \left( a_0 t + \frac{a_1}{2} t^2 + \frac{a_2}{3} t^3 + C \right) \Big|^1 - \left( a_0 t + \frac{a_1}{2} t^2 + \frac{a_2}{3} t^3 + C \right) \Big|_0 & = 0 \\ a_0 + \frac{a_1}{2} + \frac{a_2}{3} & = 0 \qquad (1) \\ \end{align*}

Let’s do the same for the equation where n=1n = 1:

01t1(a0+a1t+a2t2)dt=101(a0t+a1t2+a2t3)dt=1(a02t2+a13t3+a24t4+C)01=1(a02t2+a13t3+a24t4+C)1(a02t2+a13t3+a24t4+C)0=1a02+a13+a24=1(2) \begin{align*} \int_0^1 t^1 (a_0 + a_1 t + a_2 t^2) dt & = 1 \\ \int_0^1 (a_0 t + a_1 t^2 + a_2 t^3) dt & = 1 \\ \left( \frac{a_0}{2} t^2 + \frac{a_1}{3} t^3 + \frac{a_2}{4} t^4 + C \right) \Big|_0^1 & = 1 \\ \left( \frac{a_0}{2} t^2 + \frac{a_1}{3} t^3 + \frac{a_2}{4} t^4 + C \right) \Big|^1 - \left( \frac{a_0}{2} t^2 + \frac{a_1}{3} t^3 + \frac{a_2}{4} t^4 + C \right) \Big|_0 & = 1 \\ \frac{a_0}{2} + \frac{a_1}{3} + \frac{a_2}{4} & = 1 \qquad (2) \\ \end{align*}

And finally, the third equation where n=2n = 2:

01t2(a0+a1t+a2t2)dt=201(a0t2+a1t3+a2t4)dt=2(a03t3+a14t4+a25t5+C)01=2(a03t3+a14t4+a25t5+C)1(a03t3+a14t4+a25t5+C)0=2a03+a14+a25=2(3) \begin{align*} \int_0^1 t^2 (a_0 + a_1 t + a_2 t^2) dt & = 2 \\ \int_0^1 (a_0 t^2 + a_1 t^3 + a_2 t^4) dt & = 2 \\ \left( \frac{a_0}{3} t^3 + \frac{a_1}{4} t^4 + \frac{a_2}{5} t^5 + C \right) \Big|_0^1 & = 2 \\ \left( \frac{a_0}{3} t^3 + \frac{a_1}{4} t^4 + \frac{a_2}{5} t^5 + C \right) \Big|^1 - \left( \frac{a_0}{3} t^3 + \frac{a_1}{4} t^4 + \frac{a_2}{5} t^5 + C \right) \Big|_0 & = 2 \\ \frac{a_0}{3} + \frac{a_1}{4} + \frac{a_2}{5} & = 2 \qquad (3) \\ \end{align*}

So now we have a system of 3 equations:

a0+a12+a23=0(1)a02+a13+a24=1(2)a03+a14+a25=2(3) \begin{align*} a_0 + \frac{a_1}{2} + \frac{a_2}{3} & = 0 \qquad (1) \\ \frac{a_0}{2} + \frac{a_1}{3} + \frac{a_2}{4} & = 1 \qquad (2) \\ \frac{a_0}{3} + \frac{a_1}{4} + \frac{a_2}{5} & = 2 \qquad (3) \\ \end{align*}

We can start by reorganizing equation (1)(1) to express a0a_0 in terms of the other two variables:

a0=a12a23(4) a_0 = - \frac{a_1}{2} - \frac{a_2}{3} \qquad (4)

and we can substitute result of (4)(4) into equations (2)(2) and (3)(3) to reduce them to only have 2 variables and simplify them.

Let’s start with equation (2)(2):

12(a12a23)+a13+a24=1a14a26+a13+a24=1a1(1314)+a2(1416)=1a112+a212=1a1+a2=12a1=12a2(5) \begin{align*} \frac{1}{2} \left( - \frac{a_1}{2} - \frac{a_2}{3} \right) + \frac{a_1}{3} + \frac{a_2}{4} & = 1 \\ - \frac{a_1}{4} - \frac{a_2}{6} + \frac{a_1}{3} + \frac{a_2}{4} & = 1 \\ a_1 \left( \frac{1}{3} - \frac{1}{4} \right) + a_2 \left( \frac{1}{4} - \frac{1}{6} \right) & = 1 \\ \frac{a_1}{12} + \frac{a_2}{12} & = 1 \\ a_1 + a_2 & = 12 \\ a_1 & = 12 - a_2 \qquad (5) \\ \end{align*}

Substitute and simplify equation (3)(3):

13(a12a23)+a14+a25=2a16a29+a14+a25=2a1(1416)+a2(1519)=2a112+445a2=2(6) \begin{align*} \frac{1}{3} \left( - \frac{a_1}{2} - \frac{a_2}{3} \right) + \frac{a_1}{4} + \frac{a_2}{5} & = 2 \\ - \frac{a_1}{6} - \frac{a_2}{9} + \frac{a_1}{4} + \frac{a_2}{5} & = 2 \\ a_1 \left( \frac{1}{4} - \frac{1}{6} \right) + a_2 \left( \frac{1}{5} - \frac{1}{9} \right) & = 2 \\ \frac{a_1}{12} + \frac{4}{45} a_2 & = 2 \qquad (6) \\ \end{align*}

Now we can take the result of (5)(5) and plug it into (6)(6) to get an equation of a single variable:

12a212+445a2=21a212+445a2=2a2(445112)=1a2(445441121515)=1a21615180=1a2180=1a2=180(7) \begin{align*} \frac{12 - a_2}{12} + \frac{4}{45} a_2 & = 2 \\ 1 - \frac{a_2}{12} + \frac{4}{45} a_2 & = 2 \\ a_2 \left( \frac{4}{45} - \frac{1}{12} \right) & = 1 \\ a_2 \left( \frac{4}{45} \cdot \frac{4}{4} - \frac{1}{12} \cdot \frac{15}{15} \right) & = 1 \\ a_2 \cdot \frac{16 - 15}{180} & = 1 \\ \frac{a_2}{180} & = 1 \\ a_2 & = 180 \qquad (7) \\ \end{align*}

With the result of (7)(7), we have a2a_2, which is one of the unknowns. Now we can work backwards to find the other values. Using equation (5)(5), we can find a1a_1:

a1=12a2a1=12180a1=168(8) \begin{align*} a_1 & = 12 - a_2 \\ a_1 & = 12 - 180 \\ a_1 & = -168 \qquad (8) \\ \end{align*}

And now that we have both a1a_1 and a2a_2, we can use equation (4)(4) to find a0a_0:

a0=a12a23a0=16821803a0=8460a0=24(9) \begin{align*} a_0 & = - \frac{a_1}{2} - \frac{a_2}{3} \\ a_0 & = - \frac{-168}{2} - \frac{180}{3} \\ a_0 & = 84 - 60 \\ a_0 & = 24 \qquad (9) \\ \end{align*}

Now that we have all the coefficients, we can provide the solution:

p(t)=24168t+180t2 \boxed{ p(t) = 24 - 168 t + 180 t^2 } \qquad \blacksquare

Verification

Warning: this includes the solution! Try solving it first!

Our goal is to verify that the polynomial we found above:

p(t)=24168t+180t2 p(t) = 24 - 168 t + 180 t^2

satisfies the conditions given in the problem statement, namely:

01tnp(t)dt=nfor n=0,1,2. \int_0^1 t^n p(t) dt = n \quad \textrm{for} \ n = 0, 1, 2.

As part of solving the problem, we found the equations (1)(1), (2)(2), and (3)(3) which simplify those integral expressions and conveniently are expressed simply in terms of a0a_0, a1a_1, and a2a_2:

a0+a12+a23=0(1)a02+a13+a24=1(2)a03+a14+a25=2(3) \begin{align*} a_0 + \frac{a_1}{2} + \frac{a_2}{3} & = 0 \qquad (1) \\ \frac{a_0}{2} + \frac{a_1}{3} + \frac{a_2}{4} & = 1 \qquad (2) \\ \frac{a_0}{3} + \frac{a_1}{4} + \frac{a_2}{5} & = 2 \qquad (3) \\ \end{align*}

so what we need to show is that those equations are satisfied with our computed values of a0a_0, a1a_1, and a2a_2:

a0=24a1=168a2=180 \begin{align*} a_0 & = 24 \\ a_1 & = -168 \\ a_2 & = 180 \\ \end{align*}

Let’s verify equation (1)(1):

a0+a12+a23=024+1682+1803=02484+60=08484=00=0 \begin{align*} a_0 + \frac{a_1}{2} + \frac{a_2}{3} & = 0 \\ 24 + \frac{-168}{2} + \frac{180}{3} & = 0 \\ 24 - 84 + 60 & = 0 \\ 84 - 84 & = 0 \\ 0 & = 0 \quad \textrm{✓} \\ \end{align*}

And let’s do the same for equation (2)(2):

a02+a13+a24=1242+1683+1804=11256+45=15756=11=1 \begin{align*} \frac{a_0}{2} + \frac{a_1}{3} + \frac{a_2}{4} & = 1 \\ \frac{24}{2} + \frac{-168}{3} + \frac{180}{4} & = 1 \\ 12 - 56 + 45 & = 1 \\ 57 - 56 & = 1 \\ 1 & = 1 \quad \textrm{✓} \\ \end{align*}

And finally, let’s validate equation (3)(3):

a03+a14+a25=2243+1684+1805=2842+36=24424=22=2 \begin{align*} \frac{a_0}{3} + \frac{a_1}{4} + \frac{a_2}{5} & = 2 \\ \frac{24}{3} + \frac{-168}{4} + \frac{180}{5} & = 2 \\ 8 - 42 + 36 & = 2 \\ 44 - 24 & = 2 \\ 2 & = 2 \quad \textrm{✓} \\ \end{align*}

This completes the verification of the solution above.