---
# System prepended metadata

title: Bài tập 1

---

# Bài tập 1

## Đề bài

Cho hàm $f(x)$ thỏa

$$
    \int_{0}^{1} f(x) dx = b_1
$$ $$
    \int_{0}^{1} x f(x) dx = b_2
$$ $$
    \int_{0}^{1} x^3 f(x) dx = b_3
$$

Tìm hàm $f$ bằng cách giải hệ phương trình.

## Bài làm

Giả sử $f(x) = a_0 + a_1x + a_2x^2$.

$$
    b_1 = \int_{0}^{1} f(x) dx = a_0x + \frac{a_1}{2} x^2 + \frac{a_2}{3} x^3 \Big\vert_{0}^{1} = a_0 + \frac{1}{2} a_1 + \frac{1}{3} a_2;
$$ $$
    b_2 = \int_{0}^{1} x f(x) dx = \frac{a_0}{2} x^2 + \frac{a_1}{3} x^3 + \frac{a_2}{4} x^4 \Big\vert_{0}^{1} = \frac{1}{2} a_0 + \frac{1}{3} a_1 + \frac{1}{4} a_2;
$$ $$
    b_3 = \int_{0}^{1} x^3 f(x) dx = \frac{a_0}{4} x^4 + \frac{a_1}{5} x^5 + \frac{a_2}{6} x^6 \Big\vert_{0}^{1} = \frac{1}{4} a_0 + \frac{1}{5} a_1 + \frac{1}{6} a_2.
$$

Ma trận tương ứng:

$$
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & \dfrac{1}{2} & \dfrac{1}{3} & b_1 \\
            \dfrac{1}{2} & \dfrac{1}{3} & \dfrac{1}{4} & b_2 \\
            \dfrac{1}{4} & \dfrac{1}{5} & \dfrac{1}{6} & b_3 \\
        \end{array}
    \right)
    \leftrightarrow
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & \dfrac{1}{2} & \dfrac{1}{3} & b_1 \\
            0 & \dfrac{1}{12} & \dfrac{1}{12} & -\dfrac{1}{2}b_1 + b_2 \\
            0 & \dfrac{3}{40} & \dfrac{1}{12} & -\dfrac{1}{4}b_1 + b_3 \\
        \end{array}
    \right)
$$ $$
    \leftrightarrow
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & \dfrac{1}{2} & \dfrac{1}{3} & b_1 \\
            0 & 1 & 1 & -6b_1 + 12b_2 \\
            0 & \dfrac{3}{40} & \dfrac{1}{12} & -\dfrac{1}{4}b_1 + b_3 \\
        \end{array}
    \right)
    \leftrightarrow
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & \dfrac{1}{2} & \dfrac{1}{3} & b_1 \\
            0 & 1 & 1 & -6b_1 + 12b_2 \\
            0 & 0 & \dfrac{1}{120} & \dfrac{1}{5}b_1 - \dfrac{9}{10}b_2 + b_3 \\
        \end{array}
    \right)
$$ $$
    \leftrightarrow
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & \dfrac{1}{2} & \dfrac{1}{3} & b_1 \\
            0 & 1 & 1 & -6b_1 + 12b_2 \\
            0 & 0 & 1 & 24b_1 - 108b_2 + 120b_3 \\
        \end{array}
    \right)
    \leftrightarrow
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & \dfrac{1}{2} & \dfrac{1}{3} & b_1 \\
            0 & 1 & 0 & -30b_1 + 120b_2 - 120b_3 \\
            0 & 0 & 1 & 24b_1 - 108b_2 + 120b_3 \\
        \end{array}
    \right)
$$ $$
    \leftrightarrow
    \left(
        \begin{array}{@{}ccc|c@{}}
            1 & 0 & 0 & 8b_1 - 24b_2 + 20b_3 \\
            0 & 1 & 0 & -30b_1 + 120b_2 - 120b_3 \\
            0 & 0 & 1 & 24b_1 - 108b_2 + 120b_3 \\
        \end{array}
    \right).
$$

Như vậy, ta có 1 hàm có thể là $f(x) = a_0 + a_1x + a_2x^2$ với
$$
    \begin{array}{lcl}
        a_0 &=& 8b_1 - 24b_2 + 20b_3 \\
        a_1 &=& -30b_1 + 120b_2 - 120b_3 \\
        a_2 &=& 24b_1 - 108b_2 + 120b_3 \\
    \end{array}
$$ ứng với $b_1, b_2, b_3$ bất kì.