Home

Staff
     
Consulting
               
Mathematica Tools

Customer Quotes
        
Contact

Older Mathematica Items

 

 

 

 

 

Scientific Arts

Maxwellian Probability Distribution Function

Page 1 | Page 2 | Page 3 | Page 4


Inverse Series Method with Padé Approximants

We can attempt to fix the problem encountered above by extending the reach of the inverse series solutions. Often, when a truncated power series does not perform well beyond a particular point (perhaps because the function that the series approximates has a singularity that limits the radius of convergence) the technique of Padé approximants can make use of the data contained in the series coefficients in a more robust fashion. Padé approximants are rational function approximations to a given function. Mathematica contains a function that creates Padé approximants in the standard add-on package Calculus`Pade`. First load the package.

[Graphics:../Images/maxwellpdf_gr_95.gif]

Here is the usage message for Pade:

[Graphics:../Images/maxwellpdf_gr_96.gif]
[Graphics:../Images/maxwellpdf_gr_97.gif]

So we define a function similar to InverseSeriesMaxwellCDF which makes use of Padé approximants. Here we make one of many possible choices by setting the degree of the numerator polynomial equal to that of the denominator.

[Graphics:../Images/maxwellpdf_gr_98.gif]

There is one subtle point that involves the fact that [Graphics:../Images/maxwellpdf_gr_99.gif] gives [Graphics:../Images/maxwellpdf_gr_100.gif] times a series in [Graphics:../Images/maxwellpdf_gr_101.gif].

[Graphics:../Images/maxwellpdf_gr_102.gif]
[Graphics:../Images/maxwellpdf_gr_103.gif]

The Padé algorithm needs a series in integer powers of the variable.  While we could factor out the [Graphics:../Images/maxwellpdf_gr_104.gif] and make a variable substitution prior to creating the Padé approximant, it is easier to just use the series expression for this special point.

Let's build the function. First make the Padé approximants to the inverse series.

[Graphics:../Images/maxwellpdf_gr_105.gif]

Now append the expression for the series around 0.

[Graphics:../Images/maxwellpdf_gr_106.gif]

Here is the function.

[Graphics:../Images/maxwellpdf_gr_107.gif]

Let's see how it compares with the InterpolationFunction approach.

[Graphics:../Images/maxwellpdf_gr_108.gif]

[Graphics:../Images/maxwellpdf_gr_109.gif]

The numerical problems near zero seem to have been resolved.

Here is a plot of the difference between the Padé method and the InterpolatingFunction method.

[Graphics:../Images/maxwellpdf_gr_110.gif]

[Graphics:../Images/maxwellpdf_gr_111.gif]

Here is a timing test. The result is comparable to that for InverseSeriesMaxwellCDF above.

[Graphics:../Images/maxwellpdf_gr_112.gif]
[Graphics:../Images/maxwellpdf_gr_113.gif]

 

<<Previous


For further information on our services send email to info@scientificarts.com .
Contents of this web site Copyright © 1999-2011, Scientific Arts, LLC.

s