Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

Double sum

asked 12 years ago

PB gravatar image

Hello,

I would like SAGE to compute a double sum like 1an1bnmax(a,b). The result is strange :

f(n)=sum(sum(max(a,b),b,1,n),a,1,n)

SAGE tells me that f(2) is 6. But it is rather 7 (unless i am very tired).

Thank you for your advices :-)

Pierre

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
0

answered 12 years ago

kcrisman gravatar image

In this case you may want to try max_symbolic. Try max(a,b) by itself and see what you get - maybe a?

Preview: (hide)
link
0

answered 12 years ago

PB gravatar image

Thank you. You are right : max(a,b) gives me a. I used max_symbolic instead, I get no error, but SAGE can't simplify the double sum.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 1,266 times

Last updated: Nov 26 '12