i have an assignement in which the whole point was to approximate $\cos$ function using 2 methods :
- Using series expansion
- using a more algebric method with a linear system
The teacher also defined 2 way of estimating errors in the approximation : be $f$ a function defined on [a,b] and $P(x)$ the polynom approaching $f$
the maximal error rate is : $e_{max} = \max |f(x) - P(x)|$
we also have $e_{avg}$ which uses integrals but she's not relevant in this part of the problem. The system is defined as follows $$\begin{eqnarray} ax_{1}^{2}+bx_{1}^{2} + c &=& \cos x_{1} \\ ax_{2}^{2}+bx_{2}^{2} + c &=& \cos x_{2} \\ ax_{3}^{2}+bx_{3}^{2} + c &=& \cos x_{3} \end{eqnarray}$$ with $ I = [0,\frac{\pi}{2}]$ and $x_1,x_2,x_3 \in I $
All the questions were asked to be solved with $x_1 = 0, x_2 = \frac{\pi}{3}$ and $x_3 = \frac{\pi}{2}$ so the values of $\cos x$ are simple.
I managed to get to the last 2 questions which asks me the method to choose the $x_1,x_2,x_3$ so that the function approximation is more precise and to give him a polynomial approximation with $e_{max} < 0.002$
the teacher recommends us to use maxima and gnu plot to find them. the most "evident" way seems to loop through the values in $I$ with a 0.001 incrementation and test them but maybe i can use a dichotomic search-like approach ?
if anyone could confirm my instincts or give me search leads i'd be really grateful
thank you by advance and i'm sorry if my post is a little messy
So far I understand, you know how to solve for $a, b, c$ and how to get the values of $e_{\rm max}$. My suggestion is to keep $x_1 = 0$, $x_3 = \pi/2$ and let $x_2$ change. For each $x_2$ calculate $e_{\rm max}$ and make a plot of the results, this is what you should get