HP Forums
Infinite series - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Infinite series (/thread-15167.html)



Infinite series - lrdheat - 06-10-2020 02:16 AM

Summation of (1/x^3) from x=1 to infinity produces Zeta(3) which is correct, ~1.20206. Why does summation of (1/x^2) from x=1 to infinity produce +/- infinity on my G2? For that matter the summation for 1/x^odd integer produces correct results, incorrect for (1/x^even integer). A summation of (1/x^p) should converge for any p>1.


RE: Infinite series - lrdheat - 06-10-2020 03:53 AM

In home, the summations (1/x^even integer from 1 to infinity) are approximated correctly...why is there a difficulty in CAS?


RE: Infinite series - ijabbott - 06-10-2020 08:14 AM

It works on my G1.


RE: Infinite series - ramon_ea1gth - 06-10-2020 12:20 PM

My G2 also gives, in the CAS, a finite result for 1/x^2, i.e., (pi^2)/6. Anyway, my firmware is not the most recent: 2.0.0.13865 (2018 08 02), so I have to update it.


RE: Infinite series - cdmackay - 06-10-2020 04:00 PM

(06-10-2020 12:20 PM)ramon_ea1gth Wrote:  My G2 also gives, in the CAS, a finite result for 1/x^2, i.e., (pi^2)/6. Anyway, my firmware is not the most recent: 2.0.0.13865 (2018 08 02), so I have to update it.

Same result for me in the emulator [2.1.14425 (2020 1 16)], and also my G2 [2.1.14433 (2020 01 21)]


RE: Infinite series - pinkman - 06-10-2020 09:36 PM

(06-10-2020 02:16 AM)lrdheat Wrote:  Summation of (1/x^3) from x=1 to infinity produces Zeta(3) which is correct, ~1.20206. Why does summation of (1/x^2) from x=1 to infinity produce +/- infinity on my G2? For that matter the summation for 1/x^odd integer produces correct results, incorrect for (1/x^even integer). A summation of (1/x^p) should converge for any p>1.

Seeing the above answers you should give us the command line you used.
Mine are:

Home:
Code:

approx(Σ(1/X^2,X,1,∞))

CAS:
Code:

Σ(1/x^2,x,1,∞)



RE: Infinite series - lrdheat - 06-11-2020 02:42 AM

When I use the template in CAS, it comes up with +/- infinity if a small “x” is used (as is default in CAS). If I use capital “X” in CAS, I just discovered that the correct pi^2/6 comes up for summation 1/X^2 from 1 to infinity. Why is this, and do I have some setting incorrectly set to produce this odd behavior?


RE: Infinite series - pinkman - 06-11-2020 09:17 AM

try to delete all values and assumptions of x:
Code:

purge(x)



RE: Infinite series - lrdheat - 06-11-2020 02:36 PM

Thanks...that worked. I did not suspect this was the problem since the series worked for odd powers!


RE: Infinite series - cdmackay - 06-11-2020 04:25 PM

In general, if you want to see/check user variables:

created in Home, := or Sto▸
- viewed with memory manager Shift B — User Variables
- select, then delete or backspace

created in CAS, = or Sto▸
- viewed with memory manager Shift B — CAS Vars
- select, then delete or backspace
- may also be deleted with CAS function purge(), which only works on CAS vars
- purge() also removes assumptions about vars, as well as value

A couple of CAS programs have been posted on this forum in the past:

varslist()
- shows all defined lowercase single letter vars, both Home & CAS

purgeaz()
- purges all single small-letter CAS variables, excluding e & i which are reserved
- does not affect Home variables, which can only be deleted using memory manager (shift B)


RE: Infinite series - pinkman - 06-11-2020 05:01 PM

(06-11-2020 02:36 PM)lrdheat Wrote:  Thanks...that worked. I did not suspect this was the problem since the series worked for odd powers!

Maybe x was assumed to be negative.