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

An exact 1-D integration challenge - 48 - (go and give a kick to all stupid CASs!)

0 views
Skip to first unread message

Vladimir Bondarenko

unread,
Jan 1, 2008, 7:39:39 AM1/1/08
to
Hello you brave computer algebra Warrior-Host,

Happy New Year of 2008 to you!

And consider. Last December, a stupid software named Deep Fritz
did the world chess champion, Mr. Kramnik... A pile of shame!!!

http://www.nytimes.com/2006/12/05/crosswords/chess/05cnd-chess.html?_r=1&hp&ex=1165381200&en=92caa45502331dee&ei=5094&partner=homepage&oref=slogin
http://ebiquity.umbc.edu/blogger/2006/12/05/chess-champ-kramnik-loses-match-to-deep-fritz-42/

Consider, those damned computers are grabbing our place under
the sun! We are in a danger!

Isn't now the highest time to repulse the computer aggressors,
until it's not too late??!!

Time is pressing, so let's start right now! First, give these
insensate pieces of iron a decisive defeat in math, where they
are especially weak (it's called strategy).

Say, none of the modern computer algebra systems can calculate
this stuff correctly. Mathematica 6.0.1 yields a false result,
Maple etc returns this integral unevaluated...

Is there an intrepid Warrior (or better, several of Them, to
deliver a stronger blow!) who can devise the steps to get to
the exact value of this integral

int(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)), z= 0..1);

?

May the Power be with us,

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,
Jan 1, 2008, 9:20:45 AM1/1/08
to
Vladimir Bondarenko <v...@cybertester.com> wrote:
[snip]

> Say, none of the modern computer algebra systems can calculate
> this stuff correctly. Mathematica 6.0.1 yields a false result,
> Maple etc returns this integral unevaluated...
>
> Is there an intrepid Warrior (or better, several of Them, to
> deliver a stronger blow!) who can devise the steps to get to
> the exact value of this integral
>
> int(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)), z= 0..1);

The answer is (4/15)*Sqrt[4 + 11*Sqrt[2] + 2*Sqrt[226 + 127*Sqrt[2]]] .

I obtained that using Mathematica 6.0.1 after first making an obvious
substitution by hand. Thus, my steps were just

Integrate[2*u*Sqrt[u + Sqrt[2]*(1 + Sqrt[1 + Sqrt[2]*u + u^2])], {u, 0, 1}]
FullSimplify[%]

But the point you raise about Mathematica giving a false result for

Integrate[Sqrt[Sqrt[2] + Sqrt[z] + Sqrt[2 + 2*Sqrt[2]*Sqrt[z] + 2*z]],
{z, 0, 1}]

is valid. As best I can tell, it indicates a serious bug. Why serious?
Because the indefinite integral

Integrate[Sqrt[Sqrt[2] + Sqrt[z] + Sqrt[2 + 2*Sqrt[2]*Sqrt[z] + 2*z]], z]

yields a function which is continuous on [0, 1] but yet is _not_ an
antiderivative of the integrand! I'm not sure I've ever encountered such a
thing with Mathematica before. It's rather disturbing.

David

Martin Rubey

unread,
Jan 1, 2008, 9:25:41 AM1/1/08
to
Vladimir Bondarenko <v...@cybertester.com> writes:

> Is there an intrepid Warrior (or better, several of Them, to
> deliver a stronger blow!) who can devise the steps to get to
> the exact value of this integral
>
> int(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)), z= 0..1);
>
> ?

Axiom / FriCAS is quite good at stuff like that:

(1) -> )se me au of
(1) -> integrate(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)), z= 0..1,
"noPole")

+-----------------------+
+---------+ | +---------+
+-+ | +-+ +-+ | | +-+ +-+
((- 8\|2 + 4)\|2\|2 + 4 + 16\|2 + 16)\|\|2\|2 + 4 + \|2 + 1
(1) -------------------------------------------------------------------
+-+
15\|2
Type: Union(f1: OrderedCompletion Expression Integer,...)

(2) -> ex :: EXPR Float

(2) 2.0627598398 725741738
Type: Expression Float

Martin

Axel Vogt

unread,
Jan 1, 2008, 9:41:29 AM1/1/08
to
Vladimir Bondarenko wrote:
> Hello you brave computer algebra Warrior-Host,
>
> Happy New Year of 2008 to you!
>
...
> Is there an intrepid Warrior (or better, several of Them, to
> deliver a stronger blow!) who can devise the steps to get to
> the exact value of this integral
>
> int(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)), z= 0..1);

using Maple:

(4/5-8/15*2^(1/2)+(2/3*2^(1/2)-2/3)*(4+2*2^(1/2))^(1/2))*(2*(4+2*2^(1/2))^(1/2)+2)^(1/2);

quasi

unread,
Jan 1, 2008, 11:43:43 AM1/1/08
to
On 01 Jan 2008 14:20:45 GMT, David W. Cantrell
<DWCan...@sigmaxi.net> wrote:

Yep.

If Mathematica returned no answer, that would be more acceptable than
returning a false one.

quasi

Axel Vogt

unread,
Jan 1, 2008, 1:58:17 PM1/1/08
to

Due to a mail request here is how one can do it in Maple (yes,
it does not give the integral or at least an antiderivative).

There are 2 ways, both involve the compositional inverse g of
f, f(z) = integrand, in the integration range.

Solving f(x) = y one gets 2 solutions, demanding [0 , 1] =
[g(f(0)), g(f(1))] gives the correct inverse, g(y) =
y^2*(3*y^2-2*y*(2*y^2-2*2^(1/2))^(1/2)-2*2^(1/2))


1st Way: change of variables, x = g(y).

Directly using the according command does not help much. But
writing it (manually) in general form

Int(F(G(y))*diff(G(y),y),y = RootOf(G(_Z)) .. RootOf(G(_Z)-1))
= Int(F(G(y))*diff(G(y),y),y = F(0) .. F(1))
= Int(y*diff(G(y),y),y = F(0) .. F(1))

and then substituting f and g gives it:

subs(F=f,G=g,%);
simplify(%,size);
value(%);
evala(%);
simplify(%,size);
evalf(%);

1/15*((10*2^(1/2)-10)*(4+2*2^(1/2))^(1/2)-8*2^(1/2)+12)*
(2*(4+2*2^(1/2))^(1/2)+2)^(1/2);

2.0627598398725


2nd way:

Taking the inverse means to reflect at the diagonal, so the
integral over f and that over g (care for the endpoints) give
the whole rectangle, hence we need

1*f(1) - Int(g(y),y=f(0)..f(1))

and Maple can symbolically evaluate that (use the same commands
for simplification as above; for the posted solution I used
different ones).

Mate

unread,
Jan 2, 2008, 9:23:00 AM1/2/08
to

A 3rd way:

J:=Int(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)), z= 0..1):
J1:=student[changevar](sqrt(z)=x,J,x):
J2:=student[changevar]((2*x^2+2*2^(1/2)*x+2)^(1/2)=sqrt(2)*x+u,J1,u):
(rationalize@simplify)(value(J2));


Mate


Vladimir Bondarenko

unread,
Jan 2, 2008, 10:46:58 PM1/2/08
to
On Jan 1, 6:20 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:

DWC> But the point you raise about Mathematica giving a false
DWC> result for
DWC>
DWC> Integrate[Sqrt[Sqrt[2]+Sqrt[z]+Sqrt[2+2Sqrt[2]Sqrt[z]+2z]],
DWC> {z, 0, 1}]
DWC>
DWC> is valid. As best I can tell, it indicates a serious bug.
DWC> Why serious? Because the indefinite integral
DWC>
DWC> Integrate[Sqrt[Sqrt[2]+Sqrt[z]+Sqrt[2+Sqrt[8]Sqrt[z]+2z]],z]
DWC>
DWC> yields a function which is continuous on [0, 1] but yet
DWC> is _not_ an antiderivative of the integrand!

Precisely.

Consider

f = Sqrt[Sqrt[2] + Sqrt[z] + Sqrt[2 + 2 Sqrt[2] Sqrt[z] + 2 z]];
int = Integrate[f, z]; delta = D[int, z] - f;
Plot[delta, {z, 0, 1}]

which must be a constant; but it isn't.

DWC> I'm not sure I've ever encountered such a thing with
DWC> Mathematica before.

In the past, our LIFT technique was able to identify quite a
number of defects in indefinite integration in Mathematica 3
and Mathematica 4.

Some of them were reported to Wolfram Research as

Opportunities To Improve The Mathkernel And Frontend

http://maple.bug-list.org/chapter1.txt

Subj: The MathKernel can be reinforced (Cover Letter)

http://maple.bug-list.org/VB-2-SW-2001.txt

(see 1.1 Indefinite 1-D Integration)

Mathematica 6's integrator is really a big makeover; so we
feel nice that our LIFT still can identify many a defect in
Mathematica 6 - automatically!

DWC> It's rather disturbing.

Why sure.

Hopefully, we could hear some enlightening comments from
Daniel Lichtblau or some other Wolfram Research tech rep?

Cheers,

Vladimir

--

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

> But the point you raise about Mathematica giving a false result for

Vladimir Bondarenko

unread,
Jan 9, 2008, 9:22:31 PM1/9/08
to
Hello,

On Jan 1, 6:20 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:

DWC> Integrate[Sqrt[Sqrt[2]+Sqrt[z]+Sqrt[2+Sqrt[8]Sqrt[z]+2z]]

DWC> ,z] yields a function which is continuous on [0, 1] but
DWC> yet is  _not_  an antiderivative of the integrand!

What could be the origin of this bug?

Could someone of Wolfram Research please comment this case?

Cheers,

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

P.S. Meanwhile, the VM machine discovered new funny bug
stuff in Mathematica.... speaking nothing of Maple! ;-)

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

David W. Cantrell

unread,
Jan 9, 2008, 9:45:30 PM1/9/08
to
Vladimir Bondarenko <v...@cybertester.com> wrote:
> Hello,
>
> On Jan 1, 6:20=A0am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:
>
> DWC> Integrate[Sqrt[Sqrt[2]+Sqrt[z]+Sqrt[2+Sqrt[8]Sqrt[z]+2z]], z]

> DWC> yields a function which is continuous on [0, 1] but
> DWC> yet is _not_ an antiderivative of the integrand!
>
> What could be the origin of this bug?
>
> Could someone of Wolfram Research please comment this case?

I also would be interested in the origin.

BTW, I submitted this bug to Wolfram's Technical Support about a week ago.
The only response I have gotten so far said, in part,

"I have forwarded your example to our development group.

I am sorry for any inconvenience caused by this problem.

I have included your contact information so that you can be notified
when this has been resolved."

And so I await notification of its resolution.

David

Dave

unread,
Jan 10, 2008, 9:05:24 AM1/10/08
to
Vladimir Bondarenko wrote:
> Hello you brave computer algebra Warrior-Host,
>
> Happy New Year of 2008 to you!
>
> And consider. Last December, a stupid software named Deep Fritz
> did the world chess champion, Mr. Kramnik... A pile of shame!!!

A car can move faster than any human. Following your logic, "the stupid
car does the worlds fastest sprinter a pile of shame". The fact a
computer can play better chess than a human should not be surprising, no
more than it is surprising an F1 car can move faster than any human.

I believe Kramnik had a better position than Deep Fritz when he
overlooked the mate in one.

I would argue that Topolov done the human race a pile of shame with his
actions in the match with Kramnik.

Bhuvanesh

unread,
Jan 11, 2008, 12:23:05 PM1/11/08
to
It was fixed in the development build around a week back:

In[1]:= Head[Integrate[Sqrt[Sqrt[2]+Sqrt[z]+Sqrt[2+Sqrt[8]Sqrt[z]+2z]], z]]

Out[1]= Integrate

Bhuvanesh,
Wolfram Research

Vladimir Bondarenko

unread,
Jan 11, 2008, 3:45:15 PM1/11/08
to
On Jan 11, 9:23 am, Bhuvanesh Bhatt <lalu_bh...@yahoo.com> writes:

BB> It was fixed in the development build around a week back:

BB> Out[1]= Integrate

Hello,

Thank you for informing us about the current outcome!

A question, at least two persons (me and David Cantrell)
would like to hear the answer to,

Where (at least) approximately was the rub with this integral?

Yet another remark.

Personally, I am surprised to hear that getting an evaluated
integrals (instead of a correct answer shown above) is called
by you the "fix".

Do you mean "partial fix", "semi-fix"?

(I am interested, to the utmost, to hear a comment from
David Cantrell... and sure any other person!)

Cheers,

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,
Jan 11, 2008, 4:05:05 PM1/11/08
to
Vladimir Bondarenko <v...@cybertester.com> wrote:
> On Jan 11, 9:23 am, Bhuvanesh Bhatt <lalu_bh...@yahoo.com> writes:
>
> BB> It was fixed in the development build around a week back:
>
> BB> Out[1]= Integrate
>
> Hello,
>
> Thank you for informing us about the current outcome!
>
> A question, at least two persons (me and David Cantrell)
> would like to hear the answer to,
>
> Where (at least) approximately was the rub with this integral?

Yes, good question.

> Yet another remark.
>
> Personally, I am surprised to hear that getting an evaluated

I suppose you meant to write "unevaluated".

> integrals (instead of a correct answer shown above) is called
> by you the "fix".
>
> Do you mean "partial fix", "semi-fix"?
>
> (I am interested, to the utmost, to hear a comment from
> David Cantrell... and sure any other person!)

I don't know what to say. When I saw Bhuvanesh's reply here, my first
reaction was to think that he mistakenly sent his reply before he had
actually finished writing. But if he had actually written everything he
intended, and thus the "fix" consists of nothing but having the integral
return unevaluated, then I must say that it is not a _good_ fix.

David

Vladimir Bondarenko

unread,
Jan 11, 2008, 5:34:15 PM1/11/08
to
On Jan 11, 1:05 pm, David W. Cantrell <DWCantr...@sigmaxi.net> writes:

DWC> I suppose you meant to write "unevaluated".

Ooops, why sure! Thanks!

DWC> the "fix" consists of nothing but having
DWC> the integral return unevaluated, then I
DWC> must say that it is not a _good_ fix.

I agree with you 100%!

BTW, on the basis of our internal Maple bugs
data base (a small and outdated version of
which is the Maple Bugs Encyclopaedia), one
can infer that it is quite a typical for Maplesoft,
in a quality of a "fix", just have their wrong
integrals returned unevaluated, - just as Mr.
Bhatt described. Such is a clear trend in
*Maplesoft*, at least about the integrals.

However, I am of very high opinion of Wolfram
Research development process as well as personal
traits of the developers I happened to know in
person.... so Mr. Bhatt's today's statement made
me, like you, quite amazed...

And definitely, it would be great to learn, at
least a bit, what was that wrong cog of their
thrilling machinery that made their wonder
machine acting up?

Cheers,

Vladimir

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

> > > Wolfram Research- Hide quoted text -
>
> - Show quoted text -

Vladimir Bondarenko

unread,
Jan 12, 2008, 7:08:50 AM1/12/08
to
On Jan 10, 6:05 am, Dave <somepl...@nowhere-nice.com> writes:

D> I would argue that Topolov done the human race a pile
D> of shame with his actions in the match with Kramnik.

Ah, how much right you are, I fail to express!

Still, even this is still not the full truth....

You *won't* believe how far chess thought has progressed!

Know how Anatoly Karpov became the world champion? Oh....

http://en.wikipedia.org/wiki/Viktor_Korchnoi

At the World Championship, where he played against his arch-
rival, Victor Korchnoy, Karpov's team sent him a blueberry
yogurt during a game (! just imagine! a low blow!!)

Mean villains, what to say - sure thing this was a secret
code, how to do Korchnoy in!

Where on earth the society looks at?!

Even worse still (learn, the full truth is fierce & ugly):

http://www.sovlit.com/chess.html

"You know, Lasker's using vulgar tactics. It's impossible to
play with him. He blows cigar smoke on his opponents. And he
purposely smokes cheap cigars so the smoke is more disgusting.
The chess world is in an uproar."

I agree with you... we should think about these sad cases
carefully... or else an eerie disaster could strike!


On Jan 10, 6:05 am, Dave <somepl...@nowhere-nice.com> wrote:


> VladimirBondarenko wrote:
> > Hello you brave computer algebra Warrior-Host,
>
> > Happy New Year of 2008 to you!
>
> > And consider. Last December, a stupid software named Deep Fritz

> > did the worldchesschampion, Mr. Kramnik... A pile of shame!!!


>
> A car can move faster than any human. Following your logic, "the stupid
> car does the worlds fastest sprinter a pile of shame". The fact a

> computer can play betterchessthan a human should not be surprising, no

Nasser Abbasi

unread,
Jan 12, 2008, 7:55:31 AM1/12/08
to

"Dave" <some...@nowhere-nice.com> wrote in message
news:4786...@212.67.96.135...
> Vladimir Bondarenko wrote:

>> And consider. Last December, a stupid software named Deep Fritz
>> did the world chess champion, Mr. Kramnik... A pile of shame!!!
>

> A car can move faster than any human. Following your logic, "the stupid
> car does the worlds fastest sprinter a pile of shame".

I think it is different when machines beat humans in an activity related to
human thought, imagination and other such mental abilities which we consider
special to humans only, than when they beat us in an area related to
physical strength. After all, we humans are very weak physically, always
been.

So when a machine goes faster than a human or it can carry more weight than
the strongest man amongst us, this is less spectacular than when a machine
beats a human in an intelligence oriented activity like chess (or when it
does better Math than we can) and so we humans do not feel shame for losing
to a machine in this case, would you not agree?

>The fact a computer can play better chess than a human should not be
>surprising, no more than it is surprising an F1 car can move faster than
>any human.
>

Well, this became less surprising when the AI community gave up on trying to
imitate the human thought process in term of how it thinks about chess
positions many years ago, and resorted back to brute search algorithms,
where computers can calculate much faster than we can. It would however be
very surprising if a computer can beat the world champion in chess, when the
computer is programmed to think like a human not like a machine. But no one
has been able to build a chess program which does that yet. When I play
chess on the net against unknown opponents, I know quickly if the other end
is a computer or human by the way it plays back and how it responds. So, for
me, this is not true AI in the sense of imitating human brain. Still, for
me, a program playing good chess, even if it is doing brute search, is
something much more interesting and exciting than a car that can travel 500
miles per hour.

In the early days, they tried to write chess programs to analyze chess
positions like a human Grandmaster does. This turned out to be very hard to
do and it really failed.

Btw, Still to this day, with the fastest and most powerful computers and
programs, I understand that an average GO human player can easily beat any
computer in the game of GO. This will remain so for many more years to come.
Brute search fails in the game of GO due to huge size of the search space in
that game (for standard tournament board size), so we humans can still feel
proud we can do something computers can't. Beat it in the game of GO.

http://www.aaai.org/AITopics/html/go.html

Nasser


Bhuvanesh

unread,
Jan 28, 2008, 8:05:41 PM1/28/08
to
The antiderivative you gave earlier(*) doesn't appear to be valid in general:

In[1]:= Integrate[u*Sqrt[u + Sqrt[2]*(1 + Sqrt[1 + Sqrt[2]*u + u^2])], u] //Short

2
2 u <<1>> (21 <<1>> + <<4>>)
Out[1]//Short= --------------------------------------
2 <<3>> 2 <<4>>
15 <<5>> (-------- + <<6>> - --------)
15 <<5>> 15 <<5>>

In[2]:= expr = Simplify[D[%1, u] - u*Sqrt[u + Sqrt[2]*(1 + Sqrt[1 + Sqrt[2]*u + u^2])]];

In[3]:= expr /. u->RandomReal[{-1000,1000}, 20, WorkingPrecision->40] //Chop //Union //InputForm

Out[3]//InputForm=
{0,
5.04190294422310029301466535888`14.16293665376828,
5.48358273955621598576357484322`14.19307268161505,
5.9235831544867647453861836138`14.21407088096171,
10.57778584577932474945015580806`14.29468797196714,
13.56258623308169638880665824176`14.30822511206638,
13.80624827999012687322765986636`14.308953356572413}

(*) Actually, you didn't show the antiderivative:
http://mathforum.org/kb/thread.jspa?forumID=13&threadID=1678119&messageID=6049674

Bhuvanesh,
Wolfram Research

David W. Cantrell

unread,
Jan 28, 2008, 11:55:00 PM1/28/08
to
Bhuvanesh <lalu_...@yahoo.com> wrote:

Your post is surely one of the strangest I've see recently.

> The antiderivative you gave earlier(*) doesn't appear to be valid in
> general:

Not only did I _not_ give an antiderivative, as you yourself say in your
footnote, I never even claimed to _have_ an antiderivative, much less one
which is "valid in general"!

David

sashap

unread,
Jan 29, 2008, 12:42:57 AM1/29/08
to
On Jan 28, 10:55 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:

> Bhuvanesh <lalu_bh...@yahoo.com> wrote:
>
> Your post is surely one of the strangest I've see recently.
>
> > The antiderivative you gave earlier(*) doesn't appear to be valid in
> > general:
>
> Not only did I _not_ give an antiderivative, as you yourself say in your
> footnote, I never even claimed to _have_ an antiderivative, much less one
> which is "valid in general"!
>
> David

In the midst of heated discussion, I would like to simply share the
workout
of an anti-derivative correct, at least, along the real axis.

In[5]:= integrand[u_] :=
u*Sqrt[u + Sqrt[2] + Sqrt[2 + 2*Sqrt[2]*u + 2*u^2]]

the integrand is well defined real function for Element[u, Reals]:

In[6]:= Reduce[ Element[integrand[u], Reals], u, Reals]

Out[6]= True

Make a change of variables Sqrt[2] u== Tan[t]-1. Reality of u
implies -Pi/2 < t < Pi/2. Thus:

In[7]:= (Simplify[#1, -Pi/2 < t < Pi/2] & )[
integrand[u]*Dt[u] /. u -> (Tan[t]-1)]/Sqrt[2]

Out[7]= (1/2)*Dt[t]*Sec[t]^2*(-1 + Tan[t])*
Sqrt[Sec[t] + (1 + Tan[t])/Sqrt[2]]

Now integrate using Mathematica:

In[8]:= int[t_] = Integrate[% /. Dt[t] -> 1, t]

Out[8]= (Sqrt[
2]*(27 + 18*Sqrt[2] + (8 + 6*Sqrt[2])*Cos[t] -
6*(3 + 2*Sqrt[2])*Cos[2*t] - 28*Cos[3*t] - 21*Sqrt[2]*Cos[3*t] +
64*Sin[t] + 48*Sqrt[2]*Sin[t] + 66*Sin[2*t] +
44*Sqrt[2]*Sin[2*t] +
16*Sin[3*t] + 12*Sqrt[2]*Sin[3*t])*(-1 + Tan[t])^2*
Sqrt[2*Sec[t] + Sqrt[2]*(1 + Tan[t])])/
(15*(12 + 8*Sqrt[2] + 3*(4 + 3*Sqrt[2])*Cos[t] -
6*(3 + 2*Sqrt[2])*Cos[2*t] - 12*Cos[3*t] - 9*Sqrt[2]*Cos[3*t] +
36*Sin[t] + 27*Sqrt[2]*Sin[t] + 36*Sin[2*t] +
24*Sqrt[2]*Sin[2*t] +
4*Sin[3*t] + 3*Sqrt[2]*Sin[3*t]))

Substitute back:

In[9]:= res =
FullSimplify[Simplify[TrigExpand[int[ArcTan[Sqrt[2]*u + 1]]]]]

Out[9]= (2*u^2*
Sqrt[u +
Sqrt[2]*(1 + Sqrt[1 + u*(Sqrt[2] + u)])]*(12*(4 + 3*Sqrt[2])*
u^5 + (3 + 2*Sqrt[2])*
u^4*(83 + 15*Sqrt[1 + u*(Sqrt[2] + u)]) +
4*(4 + 3*Sqrt[2])*u*(21 + 17*Sqrt[1 + u*(Sqrt[2] + u)]) +
6*(3 + 2*Sqrt[2])*u^2*(33 + 20*Sqrt[1 + u*(Sqrt[2] + u)]) +
2*(4 + 3*Sqrt[2])*u^3*(63 + 26*Sqrt[1 + u*(Sqrt[2] + u)]) +
(3 + 2*Sqrt[2])*(29 +
31*Sqrt[1 + u*(Sqrt[2] + u)])))/(15*(4*(4 + 3*Sqrt[2])*u^5 +
8*(3 + 2*Sqrt[2])*(1 + Sqrt[1 + u*(Sqrt[2] + u)]) +
7*(3 + 2*Sqrt[2])*
u^2*(8 + 5*Sqrt[1 + u*(Sqrt[2] + u)]) + (3 + 2*Sqrt[2])*
u^4*(26 + 5*Sqrt[1 + u*(Sqrt[2] + u)]) + (4 + 3*Sqrt[2])*
u^3*(37 + 16*Sqrt[1 + u*(Sqrt[2] + u)]) +
(4 + 3*Sqrt[2])*u*(23 + 19*Sqrt[1 + u*(Sqrt[2] + u)])))

verify that the anti-derivative is indeed correct.

In[10]:= FullSimplify[D[res, u] - integrand[u]]

Out[10]= 0

Now we can find the value of definite integral:

In[11]:= (res /. u -> 1) - (res /. u -> 0) // FullSimplify

Out[11]= 2/15 Sqrt[4 + 11 Sqrt[2] + 2 Sqrt[226 + 127 Sqrt[2]]]

I am sure algebraic Hermite reduction is able to find the anti-
derivative
avoiding substitutions.

I tried doing this indefinite integral in axiom, and gave up after 10
minutes of consumed cpu time. It got stuck in 'package
TriangularMatrixOperations'.

Doing definite integral worked quite fast, though.

Oleksandr Pavlyk
Wolfram Research

sashap

unread,
Jan 29, 2008, 12:59:27 AM1/29/08
to
>
> I tried doing this indefinite integral in axiom, and gave up after 10
> minutes of consumed cpu time. It got stuck in 'package
> TriangularMatrixOperations'.
>
> Doing definite integral worked quite fast, though.
>
> Oleksandr Pavlyk


To be more precise, I tried (fast):

integrate(sqrt(sqrt(2*z+2*sqrt(2)*sqrt(z)+2)+sqrt(z)+sqrt(2)),
z=0..1,"noPole")

and

integrate(2*z*sqrt(sqrt(2*z*z+2*sqrt(2)*z+2)+z+sqrt(2)),
z=0..1,"noPole")

which did not succeed in 10 minutes...

Oleksandr Pavlyk

Martin Rubey

unread,
Jan 29, 2008, 3:12:53 AM1/29/08
to fricas-devel
sashap <pav...@gmail.com> writes:

thanks for the report, I'll add it in a minute. As far as I know (but I'm not
the expert here), FriCAS/axiom does definite integrals mostly by taking limits.

So, there are several issues here:

1)

integrate(2*z*sqrt(sqrt(2*z*z+2*sqrt(2)*z+2)+z+sqrt(2)),z=0..1, "noPole")

in a *fresh* axiom takes longer than my patience lasts.

2)

so does

integrate(2*z*sqrt(sqrt(2*z*z+2*sqrt(2)*z+2)+z+sqrt(2)),z)

3) interupting the above, and reevaluating it gives - surprise -

0

Oh dear!

The other integral works alright.

I didn't follow the thread too closely, what is the correct antiderivative of

2*z*sqrt(sqrt(2*z*z+2*sqrt(2)*z+2)+z+sqrt(2))

?


Many thanks for the report.

Martin

David W. Cantrell

unread,
Jan 29, 2008, 7:56:27 AM1/29/08
to

Thanks for showing how you got an antiderivative valid on the real line.

I will just mention that your result above is exactly half of the symbolic
result which I posted in my first response in this thread. That discrepancy
is due merely to a factor of 2 which is missing from your integrand.

David

Martin Rubey

unread,
Jan 31, 2008, 3:21:26 AM1/31/08
to fricas-devel
Dear all,

Waldek was so kind and tried the integrals below on friCAS/axiom, and found
that they do indeed terminate - albeit after a *very* long time, saying that
the results are not integrable.

Assuming this is correct, I'd like to demonstrate a rather different approach,
namely, guessing a recurrence or differential equation for the result. Of
course, one doesn't get a "closed" form, but at times, the recurrence may be
more useful anyway.

Please note that the guessing is relatively slow, because the sequence contains
algebraic numbers, which are not very efficiently implemented in axiom/friCAS
currently.

Martin

(1) -> s := series(z*sqrt(sqrt(2*z*z+2*sqrt(2)*z+2)+z+sqrt(2)),z=0)

(1)
+-----+ +-----+ +-----+ +-----+
+-----+ | +-+ | +-+ | +-+ | +-+
| +-+ \|2\|2 2 \|2\|2 4 5\|2\|2 5 7\|2\|2 6
\|2\|2 z + -------- z - -------- z + --------- z - --------- z
+-+ +-+ 128 +-+
2\|2 16\|2 256\|2
+
+-----+ +-----+ +-----+
| +-+ | +-+ | +-+
33\|2\|2 8 429\|2\|2 9 715\|2\|2 10 12
---------- z - ----------- z + ----------- z + O(z )
+-+ 32768 +-+
2048\|2 65536\|2
Type: UnivariatePuiseuxSeries(Expression Integer,z,0)
(2) -> sc := coefficients(s)::Stream AN

(2)
+-----+ +-----+ +-----+ +-----+
+-----+ +-+ | +-+ +-+ | +-+ | +-+ +-+ | +-+
| +-+ \|2 \|2\|2 \|2 \|2\|2 5\|2\|2 7\|2 \|2\|2
[0, \|2\|2 , ------------, 0, - ------------, ---------, - -------------,
4 32 128 512
+-----+ +-----+
+-+ | +-+ | +-+
33\|2 \|2\|2 429\|2\|2
0, --------------, - -----------, ...]
4096 32768
Type: Stream AlgebraicNumber
(3) -> )time on
(3) -> guessPRec entries complete first(sc, 14)

(3)
[
[
function =
BRACKET
f(n):
2 2 +-+ 2
(4n + 4n)f(n + 2) + (4n - 2n)\|2 f(n + 1) + (4n - 8n + 3)f(n)
=
0
,
+-----+
| +-+
f(0)= 0,f(1)= \|2\|2
,
order= 0]
]
Type: List Record(function: Expression Integer,order: NonNegativeInteger)
Time: 0.02 (IN) + 7.69 (EV) + 0.10 (OT) + 1.16 (GC) = 8.97 sec
(4) -> si := coefficients(integrate(s, z))::Stream AN

(4)
+-----+ +-----+ +-----+ +-----+ +-----+
| +-+ +-+ | +-+ +-+ | +-+ | +-+ +-+ | +-+
\|2\|2 \|2 \|2\|2 \|2 \|2\|2 5\|2\|2 \|2 \|2\|2
[0, 0, --------, ------------, 0, - ------------, ---------, - ------------,
2 12 160 768 512
+-----+
+-+ | +-+
11\|2 \|2\|2
0, --------------, ...]
12288
Type: Stream AlgebraicNumber
Time: 0.02 (IN) + 0.01 (OT) = 0.03 sec
(5) -> guessPRec((entries complete first(si, 14)), homogeneous==true)

(5)
[
[
function =
BRACKET
f(n):
3 2 3 2 +-+
(4n + 4n - 8n)f(n + 2) + (4n - 6n - 4n + 6)\|2 f(n + 1)
+
3 2
(4n - 16n + 15n)f(n)
=
0
,
f(0)= 0,f(1)= 0
,
order= 0]
]
Type: List Record(function: Expression Integer,order: NonNegativeInteger)
Time: 0.01 (IN) + 1.51 (EV) + 0.14 (GC) = 1.66 sec

0 new messages