Post Reply 
Using rsolve with hp prime
12-11-2015, 06:45 PM
Post: #1
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])
I get the correct answer.

With the prime, I don't know how to do the same Sad 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.
Find all posts by this user
Quote this message in a reply
12-11-2015, 07:18 PM
Post: #2
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?
Find all posts by this user
Quote this message in a reply
12-12-2015, 11:24 AM
Post: #3
RE: Using rsolve with hp prime
Thank you for your answer. Yes I am in cas.

I tried the rsolve command on the emulator and it does work, but on the calculator, the same command gives me nothing.
[Image: IMG_4813.jpg]
Find all posts by this user
Quote this message in a reply
12-12-2015, 01:55 PM (This post was last modified: 12-12-2015 03:47 PM by DrD.)
Post: #4
RE: Using rsolve with hp prime
I get the attached result, with software version 8151, on the hardware calc:
(Find your software version: Help | Tree | About HP Prime)

       

-Dale-
Find all posts by this user
Quote this message in a reply
12-12-2015, 02:58 PM
Post: #5
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.

[Image: rsolve.jpg]
Find all posts by this user
Quote this message in a reply
12-12-2015, 03:31 PM (This post was last modified: 12-12-2015 03:36 PM by Helge Gabert.)
Post: #6
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?
Find all posts by this user
Quote this message in a reply
12-12-2015, 03:55 PM (This post was last modified: 12-12-2015 03:59 PM by wawa.)
Post: #7
RE: Using rsolve with hp prime
my CAS settings are :
[Image: CAS1.jpg]
and
[Image: CAS2.jpg]

I tried the DrD's setting for page 2, with no more success : still empty brackets.
Find all posts by this user
Quote this message in a reply
12-12-2015, 04:15 PM (This post was last modified: 12-12-2015 04:28 PM by wawa.)
Post: #8
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 Sad

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
Find all posts by this user
Quote this message in a reply
12-12-2015, 04:21 PM
Post: #9
RE: Using rsolve with hp prime
Did you try restart?
Find all posts by this user
Quote this message in a reply
12-12-2015, 04:52 PM
Post: #10
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.
Find all posts by this user
Quote this message in a reply
12-12-2015, 09:25 PM
Post: #11
RE: Using rsolve with hp prime
Good to know - - I'm glad you figured it out!
Find all posts by this user
Quote this message in a reply
Post Reply 




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