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?
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top