Abstract

I t n er t n i n l f o n eri g se r a c me t n ( I : l m u e-03 I, ss e u -0, 5 M a 0 1 A smalla ba art s ct T t s a

Description
I nternational Journal of Engineering Research And Management (IJERM) ISSN : , Volume-03, Issue-0 5, May 2016 On Evaluations Some Sepcial Functions wi th Pade A pproximant in Mupad Interface and
Categories
Published
of 10
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
I nternational Journal of Engineering Research And Management (IJERM) ISSN : , Volume-03, Issue-0 5, May 2016 On Evaluations Some Sepcial Functions wi th Pade A pproximant in Mupad Interface and Mathematica D.A.Gismalla A bstract The stability convergence for each method depends on the particular method chosen for that p articular function to be approximated. However, it is well known that methods for approximations are classified in ascending order according to their efficiency and stability to do more better in approximation. These techniques in that order are PADE, CONTINUED F RACTION, CHEYBESHV and POWER SERIES. Despite the fact that Taylor's series are not so worst in general, many methods are developed for series acceleration as Euler's or Levin's Transformations. This means that an experienced numerical analysts can easily s elect which method is going to choose directly without runs into many complicated difficulty. So this the idea behind this paper is to compared some methods against the other in such away that the reader can be acquainted t o know which method is better than other. H ence, this paper first give few commands in MUPAD INTERFACE and MATHEMATICA to get directly to approximate functions in a continued fraction or PADE form. second, a brief description for PADE is given with o ne of its important application in finding the root of equations. The Method is called Halley's algorithm that compared against Newton's method for finding the roots. Third, methods that we will consider are Gaussian quadrure, Pade Approximant, Continued Fraction and L evin's Transform to be compared and tested with examples showing which method is applicable and preferable than the other when they applied to a p articular problem contfrac(exp( - 3 *x^2), x = 0) E xample 2 Series Approximation ?series W e compute a Laurent expansion around the point x= 1 s := series(1/(x^2-1), x = 1 ) series(x^(1/3)/(1- x ),x) E xample 3 P ade approximation ?pade S yntax p ade(f, x, [m, n] ) p ade(f, x = x0, [m, n] ) D escription p ade(f,...) computes a Pade approxima nt of the expression f. The Pade approximant of order [ m, n ] around x = x 0 is a r ational expression I. C OMMANDS I N M UPAD I NTERFACE In the Matlab Prompt command window the MUPAD i nterface will be invoked by just typing m upad followed with e nter as mupad t o get the prompt mupad as [. Now, type i n the mupad promp [? followed with the command c ontfrac for seeking the syntax and the description command as a help i nformation for Continued Fraction and then p ress enter as [?contfrac We will get all the information about the command c ontfrac f or continued fractions. E xample 1 Continued Fraction A pproximation In the command command to express the Taylor's e xpansion for exp(x) around x=0 in a continued fraction form contfrac(exp(x), x = 0) approximating f. The parameters p and a 0 are given by the l eading order term f = a 0 (x - x 0 ) p + O (( x - x 0 ) p + 1 ) of the serie s expansion of f around x = x 0. The parameters a 1,, b n are chosen such that the series expansion of the Pade approximant coincides with the series expansion of f to the maximal p ossible order. T he expansion points i nfinity, -i nfinity, and c omplexinfinity a re not allowed. If no series expansion of f can be computed, then F AIL is returned. Note that s eries must be able to produce a Taylor series or a Laurent series of f, i.e., an expansion in terms of integer powers of x - x 0 m ust exist. The Pade approximant is a rational approximation of a series e xpansion: f := cos(x)/(1 + x): P := pa de(f, x, [2, 2] ) Manuscript received March 09, 2016 D.A.Gismalla, Faculty of Mathematics and Computing,Gezira U niversity, P.O. Box 20, Wad Medani, SUDAN 254 rm.com On Evaluations Some Sepcial Functions wi th Pade Approximant in Mupad Int erface and Mathematica For most expressions of leading order 0, the series expansion of the Pade approximant coincides with the series expansion of the expression through order m + n: S := series(f, x, 6) I I. COMMANDS IN MATHEMATICA E xample 1 ( p ower s eries approximation in Mathematica) n T his gives a power series approximation to (1+x) for x close to 0, up to terms of order x 3. I n[1]:=series[(1+x)^n,{x,0,3}] Out[1]=1+n x+1/2( -1+n)nx + 1/6( - 2+n( -1+n) n x +O[x] M athematica k nows the power series expansion s for many mathematical functions. In[2]:=Series[Exp[ - a t] (1+Sin[2 t]),{t,0,4} ] 2 Out[2]=1+(2- a)t+ (-2 a+ a /2)t 2 + (-4/3+ a 2 -a 3 3 /6) t + 1/2(32 a-8a 3 + a 4 ) t 4 5 +O[t] E xample 3 (Pade Approximant in Mathematica) PadeApproximant[ e xpr, { x,x 0,{ m, n }}] g ives the Padé approx imant to e xpr a bout the point x=x 0, with numerator order m a nd denominator order n. PadeApproximant[ e xpr, { x,x 0,n}] g ives the Padé approximant to e xpr a bout the point x=x 0, of order n. O rder [2/3] Padé approximant for Exp[ x]: In[1]:= P adeapp roximant[exp[x],{x,0,{2,3}} ] O ut[1]= P adeapproximant c an handle functions with poles: I n[2] :=PadeApproximant[Exp[x]/x,{x,0,{2,3}}] O ut[2]= I II PADE TABLE FOR PADE APPROXIMANT A function f(z ) is represented by a formal power series: wherec 0 0, by convention. The ( m, n) th entry R m, n in the Padé table for f(z) is then given by wherep m (z) and Q n (z) are polynomials of degrees not more than m and n, respectively. The coefficients { a i } and { b i } can always be found by considering the expressi on and equating coefficients of like powers of z up through m + n. For the coefficients of powers m + 1 to m + n, the right hand side is 0 and the resulting s ystem of linear e quations contains a homogeneous system of n equations in the n + 1 unknowns b i, and so admits of infinitely many solutions each of which determines a possible Q n. P m is then easily found by equating the first m c oefficients of the equation above. However, it can be shown that, due to cancellation, the generated rational functions R m, n are all the same, so that the ( m, n ) th entry in the Padé table is unique. Alternatively, we may require that b 0 = 1, thus putting the table i n a standard form. A lthough the entries in the Padé table can always be generated by solving this system of equations, that approach is computationally expensive. More efficient methods have been devised, including the e psilon algorithm If the difference of Q n (z)f(z) P m (z) having the first term with degree n+m+r+1, for r 0, then the rational function R m, n occupies ( r + 1) 2 cells in the Padé table, from position ( m, n ) through position ( m+r, n+r ), inclusive. The Pade Table is called normal for the function exp(x) that can be constructed using the MUPAD COMMAND as in the following Table I and it is not 255 w ww.ijerm.com I nternational Journal of Engineering Research And Management (IJERM) ISSN : , Volume-03, Issue-0 5, May 2016 n ormal for sin(x) - 1 as in Table II The Pade approximant has many application in Physics and Mathematics for there much c onnection between it and the Continued Fraction Technique. It has a wide application specially in approximations and solving a system of non-l inear equation as H alley's algorithm emerged from it to find the roots of a polynomial. T able I pade(exp(x),x,[n,m]) n,m=0(1)3 Table II pade(sin(x) -1,x,[n,m]) n,m=0(1) 4 I V. S OLVING KEPLER'S EQUATION USING PADE'S APPROGOXIMANTS In order to demonstrate the application of the Pade' approximants to a problem revelant to Astronomy, consider Kepler's e quations E-e sin(e)=m, M, e w hich yields a nd I t has been shown in [ 1 ], pp. 24, the correction d erived from the pade approximant of order (1,1) is Eqn.( 1 ) is called Halley's algorithm for finding a root from a non- l inear equation. N ow, Halley's algorithm is similar to Newton's iteration technique given by w he re Both the techniques can be used to solve a system of non-l inear equations provided t hat the initial starting guess solution i s given. Now to find the root for Kepler' s E qn.(3 ),We write for Halley's algorithm w hile we write for Newton's Raphson Method Eqn.( 4 ) ( 3 ) 256 rm.com On Evaluations Some Sepcial Functions wi th Pade Approximant in Mupad Int erface and Mathematica I t i s well known that Newton's Method fails whenever the initial starting solution is far from the real exact solution and since Halley's algorithm has the order of convergence as Newton it may diverge similarly. Now with M=0.6, e=0.9 and x0 =0.08, the r esult solution for both method is x= V. E VALUATION ON SOME SPECIAL F UNCTIONS D ebye function A. The idea for stability and efficient approximating result is achieved when a suitable method is applied to a particular f unction. Here, for example, We apply Gaussian rule, Pade approximant and then integrate with Gaussian rule, on Debye f unction given in [ 2 ],page (998) which is defined as w here n! means factorial n while i s the Zeta function defined by w here I n [2], the han d book of mathematical functions edited by Milton and Stegun a table e valuating the Debye function from x=0 to 10 and n=1 to 4 to evaluate the integral w ith no hint describing the methods they used but certainly with a computer of high accuracy for decimal places. We,evaluate it for x=0.1 and x=10 while n=1 first and second n=4. The procedure that We adopted is Gaussian Quadratue with five nodes a s in Fig.(1) for its Matlab program. The next approach that We applied when We get advantage of the Pade command in M UPAD interface to approximate the integrand function in Eqn. ( 7 ) by a rational pade(n,m) and then Gaussian Rule again with f ive nodes is applied. The result are collected from command window figures as in Fiq.( 2 ) but some values are obtained when apply the command Pade first and then We apply Gaussian Rule (( without given the command window here but cited the result o nly )) and then all are inserted in Debye function Table III and Table IV. 257 w ww.ijerm.com I nternational Journal of Engineering Research And Management (IJERM) ISSN : , Volume-03, Issue-0 5, May 2016 fu nction % Example Integration using Guassian Quatrature rules % In Matlab command window % syms x; % f=inline('x^4 /(exp(x)- 1 )'); % a=0; b=0.5 ; % n=5 ; % Guassian-T able is given and n runs from 2 to 5 % [Ie]=quassi antable(f,a,b,n) c =[ ]; x =[ ]; s um=0; f or j =1: n t=((b-a)*x(j, n- 1 )+a+b)/2; sum=sum+c(j,n- 1)*feval(f, t)*( b- a )/2; e nd I e=4*sum /b^4 ; F ig.(1) qaussiantable.m file for qadrature sym x ; a =0; b=10 ; n =5 ; f =inline( ' x/(exp(x) - 1 )'); Ie = b =0.5; I e = syms x; f =inline( ' x^4 /(exp(x)- 1 )'); a =0; b=0.5 ; n =5 ; I e = b =10; I e = F ig.(2) Gaussian for Debye function when n=1&4, x=0.1 and x=10 T able III x Evaluation of Debye function when n=1, x=10 and x=1 A pply Gaussian Apply Pade and o nly G aussian rm.com On Evaluations Some Sepcial Functions wi th Pade Approximant in Mupad Int erface and Mathematica Table IV Evaluation of Debye function when n=4, x=0.1 and x=10 A pply Gaussian A pply Pade & Gaussian x o nly T he reader should observed that the values for integral in the second column in Table III and Table IV are obtained when n =1 with command Pade approximant as pade(x/(exp(x) - 1 ), x,[4,8] ) w hile for n=4 with command Pade approximant pade(x^4/(exp(x) - 1 ), x,[4,5]) (8) as N ow,we apply Gauusian Rule with 5 points to get Ie= which is the worst result of the four results given in Table III and T able IV. This certainly due to the accumulation of rounding errors and the precision of our evaluation is not high and Gaussian R ule can't attained higher accuracy more than 9 digits of places. Also, We observe the order in the command in Eqn.(8) is Pade[4,5] but the Pade Approximant is of order 8 only. All these will effect the approximation results. Even, here there is a nother plenty one must adjust the file quassiantable.m given in Fig.(1 ) for the denominator and numerator are two long to be s ubmitted as parameters easily. Lastly, both these techniques are very important and each one is suitable for certain p roblems, e,g. Pade can be designed for problems having poles or singularity inside the domain or at its end points. B. The Zeta and Eta Functions N ext, as a typical example of conditional convergent series, the eta function W hich is connected to Riemann's zeta f unction given by w here Riemann's zeta o r, alternatively by A series which converge for B y use of more advanced methods the following relation can be hold t h rough this relation Eqn.(11 ), the function can be computed when. Alternatively useful representation is given by T he formula in Eqn.( ) can be transformed to w here C is the real axis from t o, the cir cle, and again the real axis from t o c an be written as. Eqn.(13) implies that when s=0 259 w ww.ijerm.com I nternational Journal of Engineering Research And Management (IJERM) ISSN : , Volume-03, Issue-0 5, May 2016 A lternatively, instead of using contour integration,the divergent series f or the Eta function H ence, using suita ble manipulating We find that A very nice discussion can be found in [ 3] from which the zeros and the calculated values for as, We cited some from page 113 to be w here, m=1,2,3, and - 2,- 4,- 6 are t rivi al zeros of zeta function. F rom [3], We cited some numerical values for the zeta functions as in Table V exactly as they are and then We evaluate these v alues again to be compared with our results. We apply Levin's Transform in [ 6] with its program MATLAB as in Fiq.( 4.7 ),pp27. In fact We evaluate the Eta function given by Eqn.( 9 ) and simultaneously from the result of the program the Zeta f unction is evaluated by Eqn.(10). Table VI shows the values of Eta and Zeta where the number of terms is and the number of decimal places for accuracy is at least 10. Observes that when s= -1 Lenin's Transform converge 0.25 which is the value for Eta function when s= - 1 which gives the value for Zeta function - 1/ and. - 1 / 2 T able V Zeta values We cited from [3] S 5 / / / / / / T able VI Values We Computed using Levin for Eta &Zeta n s 5 / / / / / / / rm.com On Evaluations Some Sepcial Functions wi th Pade Approximant in Mupad Int erface and Mathematica f unction LevinTranfSumx(f,n,a0, x ) % Levin Transform for Series Summation with each term having variable x % This Technique is a series Technique for which the integral is expressed % as a series FIRST and then LEVIN is applied. The general term for the % series can be express ed as an inline function or a handle object with % the initial term submitted to the program in advanced to generate the % other terms with the number of terms n to be taken for the sum. % The function f in LevinTranfSum(f,n,a0,x) is a ratio to ge nerate other terms. % In Matlab command window % syms s; % f=inline(' (-1)^s*(2* s- 1 )/(2*s*(2*s+1))'); % a0=x ; % n=5; % LevinTranfSumx(f,n,a0,x) g lobal UT ; f or k=1:n [ S, UT]=LevinTransformx(f,k,a0,x); F (k)=ut; e nd d isp(' The Sum of the Series having 2*n+2 terms') d isp([ S']); d isp(' The Sum of the Series using LEVIN TRANSFORM using 2* n+2 terms') d isp([ F']); f unction [ S, UT]=LevinTransformx(f, k,a0,x) a (1)=a0 ; S (1)= a(1) ; C (1)= 1; T otalsumden(1)=1; T otalsumnum(1)=1; f or j=1:2*k+1 a (j+1)=feval(f,j)*x^2*a(j); S (j+1)=s(j)+a(j+1); C(j+1)=(2*k+2- j )*C(j)/(j); TotalSumDen(j+1)=TotalSumDen(j) + (-1)^j*C(j+1)*(j+1)^(2* k-1 )* S( j+1)/a(j+1) ; TotalSumNum(j+1)=TotalSumNum(j) + (-1)^j*C(j+1)*(j+1)^(2* k- 1 )/a(j+1); e nd U T= TotalSumDen(2*k+2)/TotalSumNum(2*k+2); F ig.(3) File LevinTranfSum.m for series with terms having variable x V I. TRANSFORM INTEGRALS TO CONTIUED FRACTION I f, w e consider the integral a nd after integrating with x=1, the value s will be I t can be shown from theorem( 2.1 ) in [ 5 ] the Continued Fraction is F urther, if We again consider the integral in Eqn.(17) when m=1 and n=2,its value actually when x=1 and the integral for g eneral x is of the form in Eqn.(20) 261 w ww.ijerm.com I nternational Journal of Engineering Research And Management (IJERM) ISSN : , Volume-03, Issue-0 5, May 2016 a nd it can be represented as C.F in Eqn.(21) such as N ow if We put x=1,we get as in [ 5 ], the C.F. for t o be H ence, the computed valu e of the integral in Eqn.(17) for m=n=1 is in Table VII having the exact value I(1,1)=log(2) while t he computed value of the integral i n Eqn.(17) for m= 1 and n=2 is in Table VII having the exact value I(2,1) = T he value of the integral in Eqn.(17) is computed with Levin's Transform, Gaussian Rule and the continued fraction Technique i n [ 5] in Fig.( 4 ).The file We called for C.F. is forward recursion algorithm is f orwrec3.m in [5] which uses 1000 terms and h aving very low accuracy compared to the file q uassiantable. m for Gaussian Rule or LevinTranfSum.m for Levin's Transform a ccelerating the series. All these Commands Window are in one figure F ig.(4) in appendix. The reader should observed compute the series in Eqn.(20) fo r I(2,1) is given by F or such a serie s with terms having a variable x t hat require to submit an inline function f h aving the ratio of terms and the variable x alone or t erms and x. Here We prefer the earlier choose. S ee Fig.(3) for its Matlab program., We apply L evintranfsumx. m a s submit a function handle with two variables the running indexing j for the Table VII Shows values for the t hree methods considered to compute I(1,1) in Eqn.( 19) and Eqn.( 21) M ethods C.F. G aussian L evin v alues E rror e e e-1 v alue 4 v alues e e-14 Error -v alue 0 V II. COMPUTIONAL REMARK The Error given in Table VII shows clearly that the continued fraction C.F. technique having the worst value for the a pproximation,even We have used about 1000 terms, due to g rowth of the nominator largely specially when We compute. This one of the disadvantage of C.F. whenever the nominator accumulates to large number or the denominator approaches a v ery small number the precision will be lost and accumulated. So if one uses C.F. he must see the growth for both the nominator a nd the denominator first. However, it is known it is useful for the evaluations of Bessel's functions of first kind and the second k ind. Gaussian rule,it is well known of its great advantages and easy to apply and whenever the number of points increased the number of decimals in accuracy increased. The algorithm Lenin's Transform and other accelerating series like Euler's T ransform are efficient and can compute to a very high accuracy, e.g.see the Error= in Table V II. H owever,despite that i t sometimes fails, I do astonish for this technique t o c ompute 262 rm.com On Evaluations Some Sepcial Functions wi th Pade Approximant in Mupad Int erface and Mathematica T he partial sum of this series is = = 1 and E qn.(24)shows it can't be L evin's gives s ummed just as b ut levin's does it f or w hich gives an i nfluence for suggestion to be more i nvestigated and analyzed instantly within the commutation from the beginning (( f or from the first run it g ive the result.)) A PPENDIX a 0=1; n =1000; f =inline( '(- 1 )*1/(1+1/s)'); f or k =1: n n =5; g (k)=1; L evintranfsum(f,n,a0) f(k)=(1+k- 1 )^2; format l ong e nd L evintranfsum(f,n,a0) [ y, k] = forwrec3(f, g,n, 1e- 10) T he Sum of the Series having 2*n+2 terms y = k = log(2) -1/ ans = e syms x; f =inline( ' 1 /(1+x)'); n =5; The Sum of the Series using LEVIN TRANSFORM a =0; b=1; u sing 2* n+2 t erms Ie = log(2) log(2) ans = e-08 ans = e-14 F ig.(4). Command Wind ows files LevinTranfSum.m, forwrec3.m and e valuate the integral in Eqn.(15) quassiantable.m to A CNOWLEDGEMENT I would like t o thank Taif University,Saudi Arabia to be appointed Professor in the Department of Mathematics, Riana College, during for which some accompli shed research papers are published R EFERNCES [ 1] Josef Kallrath Basf OSEF KALLRATH On Rational F unction Techniques and Pade Approximants, An O verview,ag ZX/ZC C13, D Ludwigshafen, GERMANY e- mail: g.de September 16, 2002 [ 2] Abramowitz,M,and Stegun,I.A. 1964, Handbook of Mathemat
Search
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x