Michael C Ramsey Homework 8 NAE

advertisement
Michael C Ramsey
Homework 8
NAE
Problem 8.4.1
Here we must find the Pade approximations for a function. We must also evaluate that
function.
The task is carried out using Maple V and Excel.
series(exp(2*x),x);
> g:=convert(%,ratpoly,3,2);
>
We can then evaluate using Excel.
Actual Function Pade Function
1.491824698
1.491823899
2.225540928
2.225468165
3.320116923
3.318918919
4.953032424
4.943169399
7.389056099
7.333333333
% error
5.35097E-05
0.003269484
0.036083182
0.19913105
0.754125626
Problem 8.4.9
Now we must find the Chebyshev Rational Approximations for a function and evaluate
them. This is carried out using Maple V.
The three approximations are shown below:
They are evaluated at three values, and the most accurate and the corresponding value are
shown:
For 0.25:
For 0.5:
For 1.0:
Problem 8.6.3d
In this problem we use a FFT to generate an Interpolating Polynomial for a function.
The Maple output for Algorithm 8.3 is shown below:
> alg083();
This is the Fast Fourier Transform.
The user must make provisions if the
interval is not [-pi,pi].
Choice of input method:
1. Input entry by entry from keyboard
2. Input data from a text file
3. Generate data using a function F
Choose 1, 2, or 3 please
>3
>
Input the function F(x) in terms of x
for example: cos(x)
> x*cos(x**2)+exp(x)*cos(exp(x))
Input the number m.
>2
>
Choice of output method:
1. Output to screen
2. Output to text file
Please enter 1 or 2.
>1
FAST FOURIER TRANSFORM
Coefficients c(0), ... , c(2m-1)
0 2.046922712
1 -1.169370484-1.093278934*I
2 1.372422868
3 -1.169370484+1.093278934*I
Coefficients a(0), ..., a(m)
2.04692271
-1.16937048
1.37242287
Coefficients b(1), ..., b(m-1)
-1.09327893
Download