Post Reply 
Wolfram Alpha != HP Prime CAS result: who is wrong?
06-04-2024, 02:39 PM (This post was last modified: 06-04-2024 04:50 PM by robve.)
Post: #5
RE: Wolfram Alpha != HP Prime CAS result: who is wrong?
(06-04-2024 11:48 AM)Albert Chan Wrote:  It return 0 because there is no elements to sum

But then:

Albert Chan Wrote:
(06-04-2024 01:08 AM)robve Wrote:  HP Prime CAS:
\( \sum_{k=0}^{-10}k=45 \)
which checks out \( \frac12(-10)(-10+1)=45 \)

Actually, limits get changed.

sum(k, k= 0 .. -10) = - sum(k, k=-9 .. -1) = sum(k, k = 1 .. 9) = 9*10/2 = 45

which is contradictory to the former sum, i.e. the point I was trying to make.

If we accept the semantics of the former sum then we ought to define:

\( \displaystyle \sum_{k=0}^n k = \cases{0 & if $n<0$ \cr \frac12n(n+1) & otherwise} \)

whereas the latter places no constraints on the limits (at least in this case) nor restricts \( n \) to be integer for that matter.

So what's the problem? Or why do we care?

Say we define \( s(n) := \sum_{k=0}^n k \) and apply \( s(-10) \). Now, if we pre-simplify \( s(n) := \frac12n(n+1) \) then we get \( s(-10) \Rightarrow 45 \). On the other hand, if we don't simplify our definition then a CAS could potentially evaluate \( s(-10) \Rightarrow 0 \). Like a "mechanical device" we write it out as \( \sum_{k=0}^n f(k) = f(0)+f(1)+\cdots+f(n) \) with sum identity zero if \( n<0 \).

By the way, the triangle number of inverted bounds completes the triangle number to a square number:

\( \displaystyle \sum_{k=0}^n k + \sum_{k=0}^{-n} k = \frac12(n^2+n) + \frac12(n^2-n) = n^2 \)

That's neat. And also

\( \displaystyle \sum_{k=0}^{-n} k = \frac12(-n)(-n+1) = \frac12n(n-1) = \frac12(n-1)(n-1+1) = \sum_{k=0}^{n-1} k \)

It's not deep, a bit entertaining perhaps.

- Rob

"I count on old friends to remain rational"
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Wolfram Alpha != HP Prime CAS result: who is wrong? - robve - 06-04-2024 02:39 PM



User(s) browsing this thread: 1 Guest(s)