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|$$
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|$$
Copyright © 2021 JogjaFile Inc.
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: