-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rsolve should handle hypergeometric inhomogeneous terms #451
Comments
I think, that's a (trivial) bug. Current implementation should work for hypergeometric terms too. Also, instead of raising ValueError - there should be (for non-hypergeometric terms) NotImplementedError instead. |
Issue retitled. Let me know if you think it's not accurate now. |
Better. Thanks |
Thanks, now |
In [1]: rsolve(f(n)-2*f(n-1)-3**n*n, f(n),[1])
Out[1]:
n n + 1
7⋅2 + 3 ⋅(n - 2) However, I think this should be a separate issue. |
It seems that so far
rsolve
can only handle rational inhomogeneous part:rsolve( x(n)-2*x(n-1)-3**n, x(n),[1])
yieldsIt could be nice to have also parts of the form
a^nf(n)
witha
a positive integer andf(n)
a polynomial, as insympy
wherersolve( x(n)-2*x(n-1)-3**n, x(n),[1])
ouputsThank you,
Pedro
The text was updated successfully, but these errors were encountered: