From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: MATLAB computes Incomplete Elliptic Integrals incorrectly?
Date: Sat, 24 Apr 2010 19:11:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 35
Message-ID: <hqvfo9$sgp$>
References: <hqujk9$7o2$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1272136265 29209 (24 Apr 2010 19:11:05 GMT)
NNTP-Posting-Date: Sat, 24 Apr 2010 19:11:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:629459

"Ishan Sharma" <> wrote in message <hqujk9$7o2$>...
> I compute the Incomplete Elliptic Function of the second kind in both MATLAB and Maple. For some values, I obtain an exact match, but not so for others. Please see below:
> CASE 1: Perfect match
> MATLAB output
> > mfun('EllipticE',sqrt(1-.4^2),sqrt((1-.6^2)/(1-.4^2)))
> > ans =  0.9863
> MAPLE13 output: 0.9863238216
> CASE 2: No match.
> MATLAB output
> > mfun('EllipticE',sqrt(1-.4^2),sqrt((1-.5^2)/(1-.4^2)))
> > ans =  1.4182
> MAPLE13 output: 0.9495803244
> Can someone throw light on this?
> Thanks!
> ishan
  I don't know the parameters MAPLE13 uses for elliptic integrals but you should check on it.  Even within Mathworks there are two conflicting definitions used.  Here are two excerpts from Mathworks manuals:

"Some definitions of K and E use the elliptical modulus k instead of the 
parameter m. They are related as k^2 = m."

"This definition uses modulus k. The numerical ellipke function and the MuPAD functions for computing elliptic integrals use the parameter m = k^2."

  Also I would advise you to display your matlab results to a higher accuracy by using 'format long', so the comparisons will be more valid.  You might find that your "perfect match" was not so perfect.

Roger Stafford