Using rsolve with hp prime
12-11-2015, 06:45 PM
Post: #1
 wawa Junior Member Posts: 29 Joined: Dec 2013
Using rsolve with hp prime
Hi

I'm trying to get an explicit formula for the sequence
u(n)=4*u(n-1)-5*u(n-2)+2*u(n-3)
u(1)=1
u(2)=14
u(3)=43

With Xcas, I have no problem with the following line :
rsolve(u(n)=4*u(n-1)-5*u(n-2)+2*u(n-3),u(n),[u(1)=1,u(2)=14,u(3)=43])

With the prime, I don't know how to do the same It is the [u(1)=1,u(2)=14,u(3)=43] part I don't see. I tried [] and {} delimiters with no success. Do you have any idea how to solve this on the prime ?

Thank you.
12-11-2015, 07:18 PM
Post: #2
 Helge Gabert Senior Member Posts: 467 Joined: Dec 2013
RE: Using rsolve with hp prime
Works for me.

I get [-3*n+2^n*8-12].

Are you sure you are running rsolve in CAS?
12-12-2015, 11:24 AM
Post: #3
 wawa Junior Member Posts: 29 Joined: Dec 2013
RE: Using rsolve with hp prime

I tried the rsolve command on the emulator and it does work, but on the calculator, the same command gives me nothing.
12-12-2015, 01:55 PM (This post was last modified: 12-12-2015 03:47 PM by DrD.)
Post: #4
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: Using rsolve with hp prime
I get the attached result, with software version 8151, on the hardware calc:

-Dale-
12-12-2015, 02:58 PM
Post: #5
 wawa Junior Member Posts: 29 Joined: Dec 2013
RE: Using rsolve with hp prime
I don't get it. I have the 8151 firmware.

Here is another screenshot with the end of the line. Maybe I mistyped something or maybe there is something special with my settings but I compared with the emulator on which the rsolve command is doing OK and I don't see any difference.

12-12-2015, 03:31 PM (This post was last modified: 12-12-2015 03:36 PM by Helge Gabert.)
Post: #6
 Helge Gabert Senior Member Posts: 467 Joined: Dec 2013
RE: Using rsolve with hp prime
Hmm . . . maybe something to do with the CAS settings? However, I can only see that unchecking "exact" throws an error message, but not empty brackets. What are your settings, especially the recursive values on p. 2?
12-12-2015, 03:55 PM (This post was last modified: 12-12-2015 03:59 PM by wawa.)
Post: #7
 wawa Junior Member Posts: 29 Joined: Dec 2013
RE: Using rsolve with hp prime
my CAS settings are :

and

I tried the DrD's setting for page 2, with no more success : still empty brackets.
12-12-2015, 04:15 PM (This post was last modified: 12-12-2015 04:28 PM by wawa.)
Post: #8
 wawa Junior Member Posts: 29 Joined: Dec 2013
RE: Using rsolve with hp prime
I think I figured out the problem : I have a CAS variable named n with a value of 0.

Now my problem is to purge this variable. I tried purge(n) and purge() but with no success

Edit : It works ! I had a Hanoi program with an "EXPORT ...,n,..." command inside. I deleted this program and my variable n disapeared. The rsolve command is now running properly
12-12-2015, 04:21 PM
Post: #9
 Helge Gabert Senior Member Posts: 467 Joined: Dec 2013
RE: Using rsolve with hp prime
Did you try restart?
12-12-2015, 04:52 PM
Post: #10
 wawa Junior Member Posts: 29 Joined: Dec 2013
RE: Using rsolve with hp prime
yes I tried the restart command with no success because my variable n was exported in a program. I had to delete this program to get things work.
12-12-2015, 09:25 PM
Post: #11
 Helge Gabert Senior Member Posts: 467 Joined: Dec 2013
RE: Using rsolve with hp prime
Good to know - - I'm glad you figured it out!
 « Next Oldest | Next Newest »

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