Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An exact simplification challenge - 17

0 views
Skip to first unread message

Vladimir Bondarenko

unread,
Jun 2, 2007, 9:39:28 AM6/2/07
to
Hello oh you computer algebra adorers,

Is there a CAS lady or a CAS gentleman who
can show in steps how to turn this nightmare

sqrt(2)*(
(-1-I)*EllipticPi(sqrt(2), (1-I)/2, 1/sqrt(2))
+( 1-I)*EllipticPi(sqrt(2), (1+I)/2, 1/sqrt(2))
+(-1+I)*EllipticPi((1+I)/2, 1/sqrt(2))
+( 1+I)*EllipticPi((1-I)/2, 1/sqrt(2))
)

into a Beauty of bright mathematician's eyes?

Best wishes,

Vladimir Bondarenko

VM and GEMM architect
Co-founder, CEO, Mathematical Director

http://www.cybertester.com/ Cyber Tester, LLC
http://maple.bug-list.org/ Maple Bugs Encyclopaedia
http://www.CAS-testing.org/ CAS Testing

David W. Cantrell

unread,
Jun 2, 2007, 10:20:43 AM6/2/07
to
Vladimir Bondarenko <v...@cybertester.com> wrote:
> Hello oh you computer algebra adorers,
>
> Is there a CAS lady or a CAS gentleman who
> can show in steps how to turn this nightmare
>
> sqrt(2)*(
> (-1-I)*EllipticPi(sqrt(2), (1-I)/2, 1/sqrt(2))
> +( 1-I)*EllipticPi(sqrt(2), (1+I)/2, 1/sqrt(2))
> +(-1+I)*EllipticPi((1+I)/2, 1/sqrt(2))
> +( 1+I)*EllipticPi((1-I)/2, 1/sqrt(2))
> )
>
> into a Beauty of bright mathematician's eyes?

Anyone asking such questions should know enough to realize that they are
ambiguous unless a notational convention is _specified_! (This comment also
applies to your previous simplification challenge.) Even for complete
elliptic integrals of the first and second kinds, there are two commonly
used conventions, one of which happens to be used by Mathematica and the
other by Maple. (Example: If the argument of EllipticE is 1/2, the
numerical value which Mathematica gets is 1.350... while Maple would, IIRC,
get 1.237...) And the ambiguity is worse for complete elliptic integrals of
the third kind. And the ambiguity is worse still if the integrals are
incomplete! Clearly, you need to specify the convention you have in mind;
otherwise, your challenge is unclear.

David

dimitris

unread,
Jun 2, 2007, 11:33:26 AM6/2/07
to Vladimir Bondarenko
Similarly with my previous response (and continuing cheating!)
the result is Pi?

Re(evalf(sqrt(2)*(


(-1-I)*EllipticPi(sqrt(2), (1-I)/2, 1/sqrt(2))
+( 1-I)*EllipticPi(sqrt(2), (1+I)/2, 1/sqrt(2))
+(-1+I)*EllipticPi((1+I)/2, 1/sqrt(2))

+( 1+I)*EllipticPi((1-I)/2, 1/sqrt(2)) ),30));
3.14159265358979323846264338329

http://bootes.math.uqam.ca/cgi-bin/ipcgi/lookup.pl?Submit=GO+&number=3.14159265358979323846264338329&lookup_type=simple

evalf(Pi,30);
3.14159265358979323846264338328

Dimitris

/ Vladimir Bondarenko :

Vladimir Bondarenko

unread,
Jun 2, 2007, 12:43:38 PM6/2/07
to
On Jun 2, 7:20 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:

DWC> Clearly, you need to specify the convention
DWC> you have in mind

Yes you are absolutely right. ALL Cyber Tester's
challenges use either Maple or Mathematica syntax.

As of today, in terms of computational powers, say,
minimally, ability to solve math textbooks problems,
there are only two REAL competitors to compare.

Frankly, all the rest CASs are too weak now.

Vladimir Bondarenko

unread,
Jun 2, 2007, 12:45:43 PM6/2/07
to
On Jun 2, 8:33 am, dimitris <dimmec...@yahoo.com> writes:

DA> Similarly with my previous response (and
DA> continuing cheating!)

;)

DA> the result is Pi?

Yes, you are perfectly right.

> Similarly with my previous response (and continuing cheating!)
> the result is Pi?
>
> Re(evalf(sqrt(2)*(
> (-1-I)*EllipticPi(sqrt(2), (1-I)/2, 1/sqrt(2))
> +( 1-I)*EllipticPi(sqrt(2), (1+I)/2, 1/sqrt(2))
> +(-1+I)*EllipticPi((1+I)/2, 1/sqrt(2))
> +( 1+I)*EllipticPi((1-I)/2, 1/sqrt(2)) ),30));
> 3.14159265358979323846264338329
>

> http://bootes.math.uqam.ca/cgi-bin/ipcgi/lookup.pl?Submit=GO+&number=...

David W. Cantrell

unread,
Jun 2, 2007, 12:54:59 PM6/2/07
to
Vladimir Bondarenko <v...@cybertester.com> wrote:
> On Jun 2, 7:20 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:
>
> DWC> Clearly, you need to specify the convention
> DWC> you have in mind
>
> Yes you are absolutely right. ALL Cyber Tester's
> challenges use either Maple or Mathematica syntax.

So I assume then that your challenge was stated using Maple's conventions
for elliptic integrals. If you want Mathematica users to consider your
challenge, you need either to state the challenge also using Mathematica's
conventions or else to give a reference which would inform Mathematica
users how to convert from Maple's conventions to Mathematica's.

David

G. A. Edgar

unread,
Jun 2, 2007, 2:08:04 PM6/2/07
to
In article <20070602102045.076$3...@newsreader.com>, David W. Cantrell
<DWCan...@sigmaxi.net> wrote:

Maple says...

sqrt(2)*(
(-1-I)*EllipticPi(sqrt(2), (1-I)/2, 1/sqrt(2))
+( 1-I)*EllipticPi(sqrt(2), (1+I)/2, 1/sqrt(2))
+(-1+I)*EllipticPi((1+I)/2, 1/sqrt(2))
+( 1+I)*EllipticPi((1-I)/2, 1/sqrt(2))

);

(1/2) / / (1/2) 1 1 1 (1/2)\
2 |(-1 - I) EllipticPi|2 , - - - I, - 2 |
\ \ 2 2 2 /

/ (1/2) 1 1 1 (1/2)\
+ (1 - I) EllipticPi|2 , - + - I, - 2 |
\ 2 2 2 /

/1 1 1 (1/2)\
+ (-1 + I) EllipticPi|- + - I, - 2 |
\2 2 2 /

/1 1 1 (1/2)\\
+ (1 + I) EllipticPi|- - - I, - 2 ||
\2 2 2 //
evalf(%,20);
-19
3.1415926533133462567 + 1.4142135623730950488 10 I

So use whatever convention in Mathematica that produces
the result Pi ...

--
G. A. Edgar http://www.math.ohio-state.edu/~edgar/

G. A. Edgar

unread,
Jun 2, 2007, 3:14:10 PM6/2/07
to
Maple 11, output removed...

# Exact Simplification Challenge 17
restart;
U := sqrt(2)*(


(-1-I)*EllipticPi(sqrt(2), (1-I)/2, 1/sqrt(2))
+( 1-I)*EllipticPi(sqrt(2), (1+I)/2, 1/sqrt(2))
+(-1+I)*EllipticPi((1+I)/2, 1/sqrt(2))
+( 1+I)*EllipticPi((1-I)/2, 1/sqrt(2))

);
U1 := convert(U,Int); # the variable provided was _alpha1
with(student):changevar(x=_alpha1^2-1,U1,x):combine(%):
normal(%):changevar(x=y^2,%,y);
f := op(1,%); # the integrand
oneoverf := simplify(1/%) assuming x>0;
numerf := denom(oneoverf); # numerator of f
numer(oneoverf):sqrt(expand(%^2)); # combine into one square-root
f1 := numerf/%; # simplified integrand
int(f1,y=0..1); # the result

Vladimir Bondarenko

unread,
Jun 2, 2007, 5:07:23 PM6/2/07
to
Aerobatics.

On Jun 2, 12:14 pm, "G. A. Edgar" <e...@math.ohio-state.edu.invalid>
wrote:

Vladimir Bondarenko

unread,
Jun 2, 2007, 10:41:45 PM6/2/07
to
On Jun 2, 9:54 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:

DWC> you need either to state the challenge
DWC> also using Mathematica's conventions

Here you are,

Sqrt[2] (
(1 + I) EllipticPi[1/2 - I/2, 1/2]
- (1 - I) EllipticPi[1/2 + I/2, 1/2]
- (1 + I) Sqrt[2] EllipticPi[1 - I, 2]
+ (1 - I) Sqrt[2] EllipticPi[1 + I, 2]
)

Also, a question for Maple wizards...

Could you come up with a more short solution
than that invented by Wizard (pluralistically
Professor) Edgar?

http://groups.google.com/group/sci.math.symbolic/msg/a7a6ffe9fcc17efe?hl=en&

(Beware, this could be not easy!)

dimitris

unread,
Jun 3, 2007, 9:27:30 AM6/3/07
to
Show

Sqrt[2] (
(1 + I) EllipticPi[1/2 - I/2, 1/2]
- (1 - I) EllipticPi[1/2 + I/2, 1/2]
- (1 + I) Sqrt[2] EllipticPi[1 - I, 2]
+ (1 - I) Sqrt[2] EllipticPi[1 + I, 2] )

equal to Pi in Mathematica?

This is indeed a true challenge Vladimir!

/ Vladimir Bondarenko :

David W. Cantrell

unread,
Jun 3, 2007, 10:03:57 AM6/3/07
to
dimitris <dimm...@yahoo.com> wrote:
> Show
>
> Sqrt[2] (
> (1 + I) EllipticPi[1/2 - I/2, 1/2]
> - (1 - I) EllipticPi[1/2 + I/2, 1/2]
> - (1 + I) Sqrt[2] EllipticPi[1 - I, 2]
> + (1 - I) Sqrt[2] EllipticPi[1 + I, 2] )
>
> equal to Pi in Mathematica?
>
> This is indeed a true challenge Vladimir!

But it should be noted that it's not really the same challenge as the one
given using Maple's conventions. That challenge involved two incomplete and
two complete elliptic integrals of the third kind. In contrast, the newly
stated challenge using Mathematica's conventions involves four complete
integrals. Thus, when VB restated the challenge, he did _more_ than merely
converting it from one convention to the other.

What is the general conversion between Maple's convention for an incomplete
elliptic integral of the third kind and Mathematica's convention for an
incomplete elliptic integral of the third kind?

David

dimitris

unread,
Jun 3, 2007, 10:10:58 AM6/3/07
to Vladimir Bondarenko
Hi Vladimir.

Great news! I finally succeeded in getting Pi (symbolically of
course!) using the lovely
Mathematica 5.2.

Here we go...

First recall the integral representation of the complete elliptic
integral of the third kind in
Mathematica

In[46]:=
Integrate[1/((1 - n*Sin[u]^2)*(1 - m*Sin[u]^2)^(1/2)), {u, 0, Pi/2},
GenerateConditions -> False]
Out[46]=
EllipticPi[n,m]

(I don't care about conditions here; I just want to show the
representation that's why the setting
GenerateConditions->False)

Now let simplify a little your expression

In[47]:=
foo = FullSimplify[Sqrt[2]*((1 + I)*EllipticPi[1/2 - I/2, 1/2] - (1 -
I)*EllipticPi[1/2 + I/2, 1/2] -
(1 + I)*Sqrt[2]*EllipticPi[1 - I, 2] + (1 -
I)*Sqrt[2]*EllipticPi[1 + I, 2])]
Out[47]=
(1 + I)*(Sqrt[2]*EllipticPi[1/2 - I/2, 1/2] + I*Sqrt[2]*EllipticPi[1/2
+ I/2, 1/2] - 2*EllipticPi[1 - I, 2] -
2*I*EllipticPi[1 + I, 2])

Next take

In[50]:=
o1 = FullSimplify[(Sqrt[2]*(1/((1 - n*Sin[u]^2)*(1 -
m*Sin[u]^2)^(1/2))) /. n -> 1/2 - I/2) +
(I*Sqrt[2]*(1/((1 - n*Sin[u]^2)*(1 - m*Sin[u]^2)^(1/2))) /. n ->
1/2 + I/2) /. m -> 1/2]
Out[50]=
((4 + 4*I)*Cos[u]^2)/(Sqrt[2 - Sin[u]^2]*(2 - 2*Sin[u]^2 + Sin[u]^4))

and

In[51]:=
o2 = FullSimplify[(2*(1/((1 - n*Sin[u]^2)*(1 - m*Sin[u]^2)^(1/2))) /.
n -> 1 - I) +
(I*2*(1/((1 - n*Sin[u]^2)*(1 - m*Sin[u]^2)^(1/2))) /. n -> 1 +
I) /. m -> 2]
Out[51]=
((8 + 8*I)*Sqrt[Cos[2*u]])/(3 + Cos[4*u])

Then the original (simplified) expression foo is equal to the sum of
the integrals
of o1 and o2 in the range {0,Pi/2}, multiply by a factor (1+I).

So

In[53]:=
{Integrate[o1, {u, 0, Pi/2}], Integrate[o2, {u, 0, Pi/2}]}
((1 + I)*(Plus[#1 - #2]) & ) @@ %

Out[53]=
{(1/2 + I/2)*Pi, I*Pi}
Out[54]=
Pi

The Pi is here!

Dimitris


/ Vladimir Bondarenko :

Axel Vogt

unread,
Jun 3, 2007, 10:42:25 AM6/3/07
to

According to it's help files Maple uses the definition

EllipticPi(z,nu,k) = int(1/(1-nu*t^2)/sqrt(1-t^2)/sqrt(1-k^2*t^2),t=0..z)
EllipticPi(nu,k) = EllipticPi(1,nu,k)

Axel Vogt

unread,
Jun 3, 2007, 10:43:46 AM6/3/07
to
Vladimir Bondarenko wrote:
> On Jun 2, 9:54 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:
>
> DWC> you need either to state the challenge
> DWC> also using Mathematica's conventions
>
> Here you are,
>
> Sqrt[2] (
> (1 + I) EllipticPi[1/2 - I/2, 1/2]
> - (1 - I) EllipticPi[1/2 + I/2, 1/2]
> - (1 + I) Sqrt[2] EllipticPi[1 - I, 2]
> + (1 - I) Sqrt[2] EllipticPi[1 + I, 2]
> )
>
> Also, a question for Maple wizards...
>
> Could you come up with a more short solution
> than that invented by Wizard (pluralistically
> Professor) Edgar?
>
> http://groups.google.com/group/sci.math.symbolic/msg/a7a6ffe9fcc17efe?hl=en&


His solution is by ways more natural than the original question :-)

dimitris

unread,
Jun 3, 2007, 10:47:29 AM6/3/07
to David W. Cantrell
Hi David.
I think I have an answer to your problem.

Consider the incomplete integral of the third kind in Mathematica.

In[2]:=
Integrate[1/((1 - n*Sin[o]^2)*Sqrt[1 - m*Sin[o]^2]), {o, 0, e},
GenerateConditions -> False]
Out[2]=
EllipticPi[n,e,m]

Go to Maple now and load the package MmaTranslator execute the command
FromMmaToMaple and in the resulting window asking for translation of
the Mathematica
expression EllipticPi[n,e,m]. Then the Maple equivalent is
EllipticPi(sin(e),n,sqrt(m)).

> with(MmaTranslator):
> MmaToMaple();

Let's check it!

Mathematica

In[25]:=
NIntegrate[1/((1 - (1/3)*Sin[o]^2)*Sqrt[1 - (1/2)*Sin[o]^2]), {o, 0,
Pi/2},WorkingPrecision->30,PrecisionGoal->20]
EllipticPi[n, e, m] /. {e -> Pi/2, n -> 1/3, m -> 1/2}
N[%,20]

Out[25]=
2.31079499075428181544
Out[26]=
EllipticPi[1/3, 1/2]
Out[27]=
2.3107949907542818154

subs(n=1/3,m=1/2,e=Pi/2,EllipticPi(sin(e),n,sqrt(m)));

1/2
Pi 2
EllipticPi(sin(----), 1/3, ----)
2 2

evalf(%,20);
2.3107949907542818154

Perfectly!

The same procedure can be used for the other elliptic integrals too!

Dimitris


/ David W. Cantrell :

dimitris

unread,
Jun 3, 2007, 10:47:36 AM6/3/07
to David W. Cantrell

> with(MmaTranslator):
> MmaToMaple();

Let's check it!

Mathematica

subs(n=1/3,m=1/2,e=Pi/2,EllipticPi(sin(e),n,sqrt(m)));

evalf(%,20);
2.3107949907542818154

Perfectly!

Dimitris


/ David W. Cantrell :

dimitris

unread,
Jun 3, 2007, 10:52:09 AM6/3/07
to
In case it is not clear in my previous message
EllipticPi[n, e, m] is Mathematica is equivalent
to EllipticPi(sin(e),n,sqrt(m)).

Let's check it!

------------------
Mathematica
--------------------

In[25]:=
NIntegrate[1/((1 - (1/3)*Sin[o]^2)*Sqrt[1 - (1/2)*Sin[o]^2]), {o, 0,
Pi/2},WorkingPrecision->30,PrecisionGoal->20]
EllipticPi[n, e, m] /. {e -> Pi/2, n -> 1/3, m -> 1/2}
N[%,20]

Out[25]=
2.31079499075428181544
Out[26]=
EllipticPi[1/3, 1/2]
Out[27]=
2.3107949907542818154

----------
Maple
-----------

subs(n=1/3,m=1/2,e=Pi/2,EllipticPi(sin(e),n,sqrt(m)));


1/2
Pi 2
EllipticPi(sin(----), 1/3, ----)
2 2


evalf(%,20);
2.3107949907542818154

Dimitris

/ dimitris :

0 new messages