## 192 Reputation

17 years, 37 days

## try the command " indets"...

The command "indets" might work

## How to clear Maple output...

Its not the best solution, but under the "edit" tab there is a command that says: "remove output from worksheet".

## A possible explanation...

Hi:

I think I've got it pretty well figured out now - Maple is giving the wrong answer. See below:

The summand "C" is a particular combination of harmonic numbers. When Maple is asked to numerically sum from 0 to infinity it returns test0 = 0. Summing from 1 to infinity (which should give the same result because the k=0 term vanishes), returns test1=unevaluated - Maple seems to do that when a series converges very slowly, and it's not sure.

If you sum from zero to infinity without simplification, it returns unevaluated, but simplification by itself does not return zero, so I theorize that the problem is in the combination of "evalf(simplify(...)) when the first term vanishes.

I have also checked with varying upper limits to 10,000 and the answer is converging to something like -.12, which is reasonable.

I have reported this to technical support.

Too bad - the result could have been zero and I thought Maple had some great new way to determine such things.

____________________________________________________________________

C := -(-H(k+1/2)*H(k+1)+H(1,k+1/2)+H(k+1/2)^2)*GAMMA(k+1/2)/(2*k+1)/Pi^(1/2)/GAMMA(k+1);
> C0:=combine(subs(H(k+1/2)=Psi(k+1/2)-Psi(1/2),H(1,k+1/2)=Psi(1,k+1/2)-Psi(1,1/2),H(k+1)=Psi(k+1)-Psi(1),k=0,C));
> C1:=combine(subs(H(k+1/2)=Psi(k+1/2)-Psi(1/2),H(1,k+1/2)=Psi(1,k+1/2)-Psi(1,1/2),H(k+1)=Psi(k+1)-Psi(1),k=1,C));
2
C := - (-H(k + 1/2) H(k + 1) + H(1, k + 1/2) + H(k + 1/2) )

/              1/2
GAMMA(k + 1/2)  /  ((2 k + 1) Pi    GAMMA(k + 1))
/

C0 := 0

C1 := 1/3

> C1a := Sum(C,k = 0 .. infinity);
> C1b := Sum(C,k = 1 .. infinity);

infinity
-----
\      /
C1a :=    )     |-
/      \
-----
k = 0

2
(-H(k + 1/2) H(k + 1) + H(1, k + 1/2) + H(k + 1/2) )

/              1/2              \
GAMMA(k + 1/2)  /  ((2 k + 1) Pi    GAMMA(k + 1))|
/                                 /

infinity
-----
\      /
C1b :=    )     |-
/      \
-----
k = 1

2
(-H(k + 1/2) H(k + 1) + H(1, k + 1/2) + H(k + 1/2) )

/              1/2              \
GAMMA(k + 1/2)  /  ((2 k + 1) Pi    GAMMA(k + 1))|
/                                 /

> test0:=evalf(simplify(subs(H(k+1/2)=Psi(k+1/2)-Psi(1/2),H(1,k+1/2)=Psi(1,k+1/2)-Psi(1,1/2),H(k+1)=Psi(k+1)-Psi(1),C1a)));
> test1:=evalf(simplify(subs(H(k+1/2)=Psi(k+1/2)-Psi(1/2),H(1,k+1/2)=Psi(1,k+1/2)-Psi(1,1/2),H(k+1)=Psi(k+1)-Psi(1),C1b)));

test0 := 0.

infinity
-----
\      /
test1 :=    )     |-1/2 (-2 Psi(k + 1/2) Psi(k + 1)
/      \
-----
k = 1

+ 2 Psi(k + 1/2) gamma - 2 gamma Psi(k + 1)

- 4 ln(2) Psi(k + 1) + 4 ln(2) gamma + 2 Psi(1, k + 1/2)

2                 2                                 2
- Pi  + 2 Psi(k + 1/2)  + 8 Psi(k + 1/2) ln(2) + 8 ln(2) )

/              1/2              \
GAMMA(k + 1/2)  /  ((2 k + 1) Pi    GAMMA(k + 1))|
/                                 /

> testx1:=evalf((subs(H(k+1/2)=Psi(k+1/2)-Psi(1/2),H(1,k+1/2)=Psi(1,k+1/2)-Psi(1,1/2),H(k+1)=Psi(k+1)-Psi(1),C1a)));
> testx2:=(simplify(subs(H(k+1/2)=Psi(k+1/2)-Psi(1/2),H(1,k+1/2)=Psi(1,k+1/2)-Psi(1,1/2),H(k+1)=Psi(k+1)-Psi(1),C1a)));

infinity
-----   /  /
\      |  |
testx1 :=    )     |- |
/      \  \
-----
k = 0

-(Psi(k + 1/2) + gamma + 2 ln(2)) (Psi(k + 1) + gamma)

2                                    \
Pi                                    2|
+ Psi(1, k + 1/2) - --- + (Psi(k + 1/2) + gamma + 2 ln(2)) |
2                                     /

\
/              1/2              |
GAMMA(k + 1/2)  /  ((2 k + 1) Pi    GAMMA(k + 1))|
/                                 /

infinity
-----
\      /
testx2 :=    )     |-1/2 (-2 Psi(k + 1/2) Psi(k + 1)
/      \
-----
k = 0

+ 2 Psi(k + 1/2) gamma - 2 gamma Psi(k + 1)

- 4 ln(2) Psi(k + 1) + 4 ln(2) gamma + 2 Psi(1, k + 1/2)

2                 2                                 2
- Pi  + 2 Psi(k + 1/2)  + 8 Psi(k + 1/2) ln(2) + 8 ln(2) )

/              1/2              \
GAMMA(k + 1/2)  /  ((2 k + 1) Pi    GAMMA(k + 1))|
/                                 /

>

## If I understood the question properly, t...

If I understood the question properly, try

factor(expand(%));

## How do I export to Latex...

I have been using Maple 11 quite successfully to do this.

I haven't had much luck with the "latex" command in Maple, but if I copy my Maple output to a clean worksheet and export that worksheet using the "export" menu (uder "file" tab), I get a .tex file as you show.

Then I use mikteX (free download), which includes a module called "latex" which reads your style files and tex file to produce a .dvi file, from which you can produce .pdf or whatever. It also has something called pdflatex - not sure if that is the same as the one you are using.

Sometime you have to edit the .tex file that Maple 11 produces because it doesn't always get the line breaks right.

Maple 15 seems to be worse.

Maple 15 containes a direct export to .pdf command in the "export" menu, if that is really what you are trying to get to. Not sure if earlier versions have this command.

## Make sure that you put in a SHIFT-ENTER ...

Make sure that you put in a SHIFT-ENTER at the end of each line, or your indentations will mysteriously disappear if the line is too long.

Without a hard SHIFT-ENTER character, inserting blanks in a long line won't work, and sometimes two command lines will mysteriously become one.

The downside of inserting your own SHIFT-ENTER is that you can only comment out a command that extends over several lines by putting a # sign in front of the first screen line, if it has no embedded hidden SHIFT-ENTER characters.

Perhaps that is why there is a View option to display hidden characters.

Very annoying.

## built in numerical techniques in maple??...

Try

showstat(dsolve);

It will give you a program listing of routine dsolve (or any other Maple routine you choose) from which you can get listings of deeper calls and track things yourself to see what is going on.

## Maple 9 compatibility issues with Window...

Microsoft supplies a free package called Windows Virtual Machine which you can download from the Microsoft website. Its a huge download, and a bit tricky to install, but it works fine as a shell under Win7.

With that package, you can load your old (virtual) operating system that is compatible with your version of Maple.

I've got Win XP running happily as a virtual machine under Windows 7 and my old version of Maple works fine (not as old as your though). You might have some difficulties installing Maple on the virtual machine since Maple thinks you are installing it on a new machine - it can't tell the difference. Talk to the folks at MapleSoft about that.

## Branch Cuts...

So, I tested the code, and now find, that if one is careful, the limit of the answer is as expected - see the following: restart; > assume(eps,real); additionally (eps>0); > x1:=-1+I*eps; > x2:=-1-I*eps; > x1 := -1 + eps~ I x2 := -1 - eps~ I > > series(sqrt(x1),eps=0,2); > series(sqrt(x2),eps=0,2); 2 I + 1/2 eps~ + O(eps~ ) 2 - I + 1/2 eps~ + O(eps~ ) > > limit(sqrt(x1),eps=0,right); > limit(sqrt(x2),eps=0,right); I -I > series(log(x1),eps=0,2); > series(log(x2),eps=0,2); 2 Pi I - I eps~ + O(eps~ ) 2 -I Pi + I eps~ + O(eps~ )

## Maple statement freezes my computer...

Hi: Thanks to those who replied. Here is a summary of my problem, and a trick that solves it. Problem: Maple procedure "rsolve" hangs, freezes, or reboots the computer on one particular problem. Maple support cannot reproduce this, and manages to extract an answer after 15 minutes of computation. Suspicion: "rsolve" is calling "sum" internally in order to try for a simplified solution, but "sum" cannot handle the answer obtained by "rsolve". Evidence: Others are having trouble evaluating posted "rsolve" answer using "sum". As posted earlier, the original problem was to solve a recursion. The solution to Maple hanging/freezing/booting is to redefine procedure "sum" for the duration of "rsolve" as follows: restart; rq:=Q(n+1)=Q(n)/x+4*(n+1)^2*Q(n)+4/3/x*n*(n+1)*(n+1/2); unprotect(sum); sum:=proc() local input, output, subsIndexed; return ('sum')(args); end proc; Ans:=rsolve(rq,Q(n)); save Ans, "temp.m"; restart; read "temp.m"; Then process Ans accordingly, as suggested by several correspondents for whose suggestions I am grateful. When run this way, "rsolve" comes up with an answer in a few seconds, not 15-20 minutes and does not hang the machine. Thanks Mike

## Maple statement freezes my computer...

With reference to my previous post on this topic: Although the "preview" button showed the statement I posted in its entirety, the post itself cut off the statement. Here it is again with a few line feeds: Ans:=2/3*GAMMA(1/2*(2*n*x+2*x+sqrt(-x))/x)* GAMMA(1/2*(2*n*x+2*x-sqrt(-x))/x)*(1/x)^n*(2^(2*n+2)*x^(n+2)*Pi* (Sum((2*n1^2+3*n1+1)*n1*(1/x)^(-n1)*4^(-n1)*x^(-n1)/ (GAMMA(1/2*(2*n1*x+sqrt(-x))/x)*(4*n1^2*x+4*n1*x+4* sqrt(-x)*n1+2*sqrt(-x)-1)*GAMMA(1/2*(2*n1*x-sqrt(-x))/x)* (4*n1^2*x+4*n1*x-4*sqrt(-x)*n1-2*sqrt(-x)-1)), n1 = 0 .. n-1))+3*4^n*x^(n+1)*Q(0)*sqrt(-x)*sin(1/2*Pi/sqrt(-x)))/(x*Pi); value(Ans);
 Page 1 of 1
﻿