Using Reme's Algorithm to Find q2(x) for ex on [-1,1]

  • Thread starter Thread starter squenshl
  • Start date Start date
  • Tags Tags
    Algorithm
squenshl
Messages
468
Reaction score
4

Homework Statement


Find q2(x) for f(x) = ex on [-1,1] using Reme's second algorithm.


Homework Equations





The Attempt at a Solution


For the first iteration:
Step a of the algorithm gives a0 = 0.989141, a1 = 1.130864, a2 = 0.553940 and E = 0.0443369. The question I am asking is how do I get these values from using step a of the algorithm before I can carry on with the algorithm.
 
Physics news on Phys.org
This is not a clearly stated problem, but I know what you are trying to do because it is a common practice problem.
we desire a minimax quadratic approximation to exp(x) on [-1,1]
a0+a1 x+a2 x2
such that the maximal norm
||-ex+a0+a1 x+a2 x2||
is minimized
we begin by chosing n+2 points (with n=2 because it is quadratic) in [-1,1]
often Chebyshev points are chosen so we have {-1,-.5,.5,1}
we solve the linear system
a0+a1 (-1)+a2 (-1)2-E=e-1
a0+a1 (-.5)+a2 (-.5)2+E=e-.5
a0+a1 (.5)+a2 (.5)2-E=e.5
a0+a1 (1)+a2 (1)2+E=e1
for a0,a1,a2,E
and find
a0=.98914107
a1=1.1308643
a2=.55393956
E=.044336860
 
Cheers heaps.
Now for step 2.
z0 = -1.0, z1 = -0.438621, z2 = 0.560939, z3 = 1.0
For these zi: f(z0) - q(z0) = -0.0443369
f(z1) - q(z1) = 0.0452334
f(z2) - q(z2) = -0.0452334
f(z3) - q(z3) = 0.0443369
Thanks again.
 
Last edited:
I think I got it. Firstly I solve f(z) - q2(z) = 0 using Newton-Raphson method to get z1 & z2 where z0 = -1.0 and z3 = 1.0 always stay the same getting the numbers required.
 
Do you mean solve f'(z) - q'2(z) = 0 ?
Newton-Raphson method is often used, but other methods may also be used.
Keep steping until your abscissa and error are as saccurate as desired.
 
How to find zi?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top