Michael

217 Reputation

11 Badges

18 years, 56 days

MaplePrimes Activity


These are replies submitted by Michael

Answered my own question:

This works

Test:=plots[textplot]([3,3,typeset(A,"'","(x)")]);

Very educational. Thank you both.

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.

 

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.

To answer your query:

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.

@Carl Love 

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.

@acer 

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.

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.

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.

@acer Thank you - that did it.

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.

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.



@Preben Alsholm 

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)

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/2)*(p1^(1/2)+Pi*cot(Pi*p1^(1/2))*p1)/p1^(3/2), And(k^2 <> p1)]

 

[-(1/2)*(p2^(1/2)+Pi*cot(Pi*p2^(1/2))*p2)/p2^(3/2), And(k^2 <> p2)]

 

[Sum(1/(k^2-p2), k = 0 .. infinity)+Sum(1/(k^2-p1), k = 0 .. infinity), And(k^2 <> p2)+And(k^2 <> p1)]

 

[-425475495.7, And(k^2 <> 9)]

 

[-957319865.0, And(k^2 <> 4)]

 

[Sum(1/(k^2-4), k = 0 .. infinity)+Sum(1/(k^2-9), k = 0 .. infinity), And(k^2 <> 4)+And(k^2 <> 9)]

 

[-425475495.7, And(k^2 <> 9)]

 

[-957319865.0, And(k^2 <> 4)]

 

Error, (in SumTools:-DefiniteSum:-ClosedForm) summand is singular at 2 in the interval of summation

 

Sum(1/(k^2-p1), k = 0 .. 2)+Sum(1/(k^2-p1), k = 4 .. infinity)

 

-0.277777778e-1

(1)

 


Download conditions.mw

.

 

1 2 3 4 5 Page 1 of 5