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) = a_0 + a_1 t + a_2 t^2$ such that:
$$ \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 $n$ … what can you do with that?
Answer
Try solving it first! This only has the final answer, not the solution.
$$ \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) = a_0 + a_1 t + a_2 t^2$, which means that we need to find $a_0$, $a_1$, and $a_2$, or 3 unknowns. Conveniently, we have 3 equations, in the form of the integral expression that equals $0$, $1$, or $2$, so let’s start with those.
Let’s first evaluate the equation where $n = 0$:
$$ \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 = 1$:
$$ \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 = 2$:
$$ \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:
$$ \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)$ to express $a_0$ in terms of the other two variables:
$$ a_0 = - \frac{a_1}{2} - \frac{a_2}{3} \qquad (4) $$
and we can substitute result of $(4)$ into equations $(2)$ and $(3)$ to reduce them to only have 2 variables and simplify them.
Let’s start with equation $(2)$:
$$ \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)$:
$$ \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)$ and plug it into $(6)$ to get an equation of a single variable:
$$ \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)$, we have $a_2$, which is one of the unknowns. Now we can work backwards to find the other values. Using equation $(5)$, we can find $a_1$:
$$ \begin{align*} a_1 & = 12 - a_2 \\ a_1 & = 12 - 180 \\ a_1 & = -168 \qquad (8) \\ \end{align*} $$And now that we have both $a_1$ and $a_2$, we can use equation $(4)$ to find $a_0$:
$$ \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:
$$ \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) = 24 - 168 t + 180 t^2 $$
satisfies the conditions given in the problem statement, namely:
$$ \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)$, $(2)$, and $(3)$ which simplify those integral expressions and conveniently are expressed simply in terms of $a_0$, $a_1$, and $a_2$:
$$ \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 $a_0$, $a_1$, and $a_2$:
$$ \begin{align*} a_0 & = 24 \\ a_1 & = -168 \\ a_2 & = 180 \\ \end{align*} $$Let’s verify equation $(1)$:
$$ \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)$:
$$ \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)$:
$$ \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.