## 212 Reputation

17 years, 286 days

## The Suffix is the posint...

Very educational. Thank you both.

## Improve the program...

Very nice, but, there is an added complexity I don't understand.

How did you decide that _Z was a posint? According to the following, it is either an index, a symbol or an integer. The indets works as you suggested, but then we come to _B which seems to be either  an index, a symbol or OrProp. Again it works with posint, but why? See below. Thank you.

## indets/float...

Just what I was looking for. Thank you.

But here is a subsidiary issue: if bb and aa are the first and second elements in the indets output (as they appear to be), could that change someday in a later release of Maple?

Or, is there a way to specify or quesry the output order of indets? Otherwise one must check the output against X, bringing us back to the beginning.

BTW: the previous suggestion

`solve('identity'(aa/f^bb = 1.234/(f^6.789), f), {aa, bb});`

is pretty clever, but doesn't work well because it introduces round-off, making logical checks later down the line fail.

## telescoping Sums...

Because I was trying to understand Hansen's (and Maple's) reasoning so I could apply it to other cases that aren't so straighforward.

Thank you.

## Naive division...

Yup, that works too.

All I needed was a simple one-time program to use as part of the testing of someone else's fancy algorithm, so thank you both, and I've learned something new about Maple programming.

## How Many of Them...

Hi:

Just one prime factor.

I just tried it and your solution works fine if you use "try" and "catch" in case the factor being sought isn't present.

Thank you.

## How did Maple do it?...

Before I posed this question, I had read the "help" and found the command "printlevel" where it says that "printlevel=1000 is not uncommon". You  can guess what my traceback looked like. Your suggestion is much better. Thank you.

By the way, in case anyone reading this is interested, I tried this sum on Mathematica and it failed to come up with an answer.

## Yes, I knew all that already...

Sorry not to be clear. To rephrase: the question is: "what internal algorithm did Maple use to come up with that answer", or alternatively, how can I find out what internal algorithm it used.

Thank you.

## Thank you...

@acer Thank you - that did it.

## solve,identity...

try

solve(identity(Expr,x), {A,B});

It seems that "irem" is all I ever needed, but it's next to impossible to find using the "help" facility.

So that solves my immediate problem.

While we are at it - out of curiosity who invented the "m mod(n)" syntax and why?

It runs counter to just about any other command syntax in the Maple (and just about any other) computer language. And as "acer 9771" points out, the result is premature substitution.

Thank you.

## Substitution with mod function doesn't w...

OK - here is a workaround - you have to split the statement into two.

Maybe someone would be kind enough to tell me why the following works?

subs(m=21,m mod(4));
subs(m=21,'m mod(4)');
evalf(%);
21
`mod`(21, 4)
1.

Yes it does! Cute. Thank you.

Now maybe you happen to know how to extract constants from an integrand and place them outside the integration operator - e.g

Int(a*f(x) becomes a*Int(f(x)

## Documentation...

I was kind of hoping that there was some way of doing both. It seems that the method I originally proposed, doesn't work at all. The only solution I can see so far is to write a procedure for each sum. Otherwise it is easy to get the wrong answer without knowing it - see attached worksheet. Note the difference between "Sum" and "sum".

Michael

PS - Howcum Maple notification doesn't work?

 > restart;
 > Test1:=[sum(1/(k^2-p1),k=0..infinity),And(k^2<>p1)]; Test2:=[sum(1/(k^2-p2),k=0..infinity),And(k^2<>p2)];
 > Test3:=[Sum(1/(k^2-p1),k=0..infinity),And(k^2<>p1)]+[Sum(1/(k^2-p2),k=0..infinity),And(k^2<>p2)];
 > A1:=evalf(subs(p1=9,Test1)); A2:=evalf(subs(p2=4,Test2)); A3:=evalf(subs(p2=4,p1=9,Test3));
 > value(A1); value(A2); value(A3);
 > Test4:=Sum(1/(k^2-p1),k=0..2)+Sum(1/(k^2-p1),k=4..infinity); A4:=evalf(subs(p1=9,Test4));

Test4 is the correct answer for Test1

 (1)
 >

.

## mapleprimes.com does not send email noti...

Me neither! (+....)

 1 2 3 4 5 Page 1 of 5
﻿