Integral minimization

304 Views Asked by At

For the following integral the parameters a and b should be found, such that the value of the integral is minimal.

$$\int_{-\pi}^{\pi}dx (f(x) - a \cdot cos(3x) - b \cdot sin(4x))^2$$

How can I do that?

Thanks

EDIT: $$f(x)=\pi - |x|$$

1

There are 1 best solutions below

0
On BEST ANSWER

You need to solve the following system:

$$ \begin{cases} \text{D}_\text{a}=\frac{\partial}{\partial\text{a}}\left(\int_{-\pi}^{\pi}\left(\pi-\left|x\right|-\text{a}\cdot\cos\left(3x\right)-\text{b}\cdot\sin\left(4x\right)\right)^2\space\text{d}x\right)=0\\ \text{D}_\text{b}=\frac{\partial}{\partial\text{b}}\left(\int_{-\pi}^{\pi}\left(\pi-\left|x\right|-\text{a}\cdot\cos\left(3x\right)-\text{b}\cdot\sin\left(4x\right)\right)^2\space\text{d}x\right)=0 \end{cases} $$

Use:

  1. $$\text{D}_\text{a}=\frac{18\text{a}\pi-8}{9}=0\Longleftrightarrow\text{a}=\frac{4}{9\pi}$$
  2. $$\text{D}_\text{b}=2\text{b}\pi=0\Longleftrightarrow\text{b}=0$$