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

An alternative to the point sampling numerical method is to perform series expansions of [Graphics:../Images/maxwellpdf_gr_67.gif] and then invert these series using the InverseSeries function. These series need to be computed at several points to cover the region of interest. Here is an incomplete example: it almost works, but fails in certain cases. We leave it as a research project for the reader to improve upon this method so that it is more reliable.

Here is a series expansion of MaxwellCDF to third order about the point 1.

[Graphics:../Images/maxwellpdf_gr_68.gif]
[Graphics:../Images/maxwellpdf_gr_69.gif]

The InverseSeries function can be used to invert this.

[Graphics:../Images/maxwellpdf_gr_70.gif]
[Graphics:../Images/maxwellpdf_gr_71.gif]

The result of Series (or InverseSeries) is a SeriesData object, the first part of which is the expansion parameter, the second part the expansion point, and the third part is the list of coefficients (Mathematica formats this in the output to look like the standard representation of a series).

This is the expansion parameter for the inverse series

[Graphics:../Images/maxwellpdf_gr_72.gif]
[Graphics:../Images/maxwellpdf_gr_73.gif]

This is the expansion point.

[Graphics:../Images/maxwellpdf_gr_74.gif]
[Graphics:../Images/maxwellpdf_gr_75.gif]

And here is the list of coefficients in the series expansion of the inverse function.

[Graphics:../Images/maxwellpdf_gr_76.gif]
[Graphics:../Images/maxwellpdf_gr_77.gif]

Using this information we can write a function that generates the inverse series for the MaxwellCDF. With forethought we define it to return a list that has as its first element the expansion point and the series in the second element. Normal is used on the series to change it into a polynomial.

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

Here is an example.

[Graphics:../Images/maxwellpdf_gr_79.gif]
[Graphics:../Images/maxwellpdf_gr_80.gif]

This creates a table of these inverse series starting with a uniformly spaced set of points for the MaxwellCDFSeries. However, the resulting inverse series expansions' points are not uniformly spaced. This is no surprise: to get a uniformly spaced set of points we would need to have solved the inverse problem first.

[Graphics:../Images/maxwellpdf_gr_81.gif]
[Graphics:../Images/maxwellpdf_gr_82.gif]
[Graphics:../Images/maxwellpdf_gr_83.gif]

Here is a timing comparison between the InverseSeries method and the InterpolatingFunction method. The InverseSeries approach is considerably slower.

[Graphics:../Images/maxwellpdf_gr_84.gif]
[Graphics:../Images/maxwellpdf_gr_85.gif]
[Graphics:../Images/maxwellpdf_gr_86.gif]
[Graphics:../Images/maxwellpdf_gr_87.gif]

Some of the speed loss can be recovered by compiling the function.

[Graphics:../Images/maxwellpdf_gr_88.gif]
[Graphics:../Images/maxwellpdf_gr_89.gif]
[Graphics:../Images/maxwellpdf_gr_90.gif]

Let's take a look at the functions

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

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

There appear to be some numerical problems near zero.

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

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

The exercise for the interested reader is to track down the source of the numerical instability here. Presumably it is related to the radii of convergence of the inverse series that we have used.

 

<<Previous Next >>


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

s