Approximation and sum of integrals.

74 Views Asked by At

Consider the sum of integrals: $$ \int_0^2 \left|f(x)-x^4\right|^2 dx+ \int_{-1}^1 \left|f(x)-x^4\right|^2 dx.$$ Find a polynomial of degree at most two, such that the sum above is the smallest.

Ok. I know that $f(x)=ax^2+bx+c$, but count it $$ \int_0^2 \left|ax^2+bx+c-x^4\right|^2 dx + \int_{-1}^1 \left|ax^2+bx+c-x^4\right|^2 dx $$ isn't effective.

2

There are 2 best solutions below

3
On BEST ANSWER

A « maybe » easier solution is to notice that you are asked to minimize $\|f-X^4\|^2$, over the $f \in V$, where $V$ is a subspace of the ambient space $W=\mathbb{R}_4[X]$ and $\|\cdot\|$ is a Euclidean norm over $W$.

So there is an automatic procedure:

  1. Compute an orthonormal basis of $V$.
  2. Compute the inner products of $X^4$ with the elements of said basis.
  3. Take the corresponding element in $V$.
0
On

$F(a,b,c) = \int_0^2 (ax^2+bx + c - x^4)^2\ dx + \int_{-1}^{1} (ax^2 + bx + c - x^4)^2 \ dx$

Differentiating under the integral sign.

$\frac {F(a,b,c)}{\partial a} = \int_0^2 2(ax^2+bx + c - x^4)x^2\ dx + \int_{-1}^{1} 2(ax^2 + bx + c - x^4)x^2 \ dx = 0$

$\frac {a}{5}x^5 + \frac {b}{4} x^4 +\frac {c}{3} x^2 + \frac {1}{7} x^7|_0^2|_{-1}^1 = 0\\ \frac {34}{5}a + \frac {16}{4} b +\frac {10}{3} c = \frac {130}{7}$

Do the same for the other variables, and you will get a system of linear equations.