Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <hqujk9$7o2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1272136265 29209 172.30.248.38 (24 Apr 2010 19:11:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 24 Apr 2010 19:11:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:629459

"Ishan Sharma" <sudden20@yahoo.com> wrote in message <hqujk9$7o2$1@fred.mathworks.com>...
> 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:

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

EllipticE(x,k):
"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