ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 12 Aug 2021 10:31:07 +0200How we can solve a difference equations in Sagemath.https://ask.sagemath.org/question/58419/how-we-can-solve-a-difference-equations-in-sagemath/ How we can solve a difference equations in Sagemath.Thu, 12 Aug 2021 06:51:30 +0200https://ask.sagemath.org/question/58419/how-we-can-solve-a-difference-equations-in-sagemath/Answer by Emmanuel Charpentier for <p>How we can solve a difference equations in Sagemath.</p>
https://ask.sagemath.org/question/58419/how-we-can-solve-a-difference-equations-in-sagemath/?answer=58421#post-id-58421sage: import sympy
sage: sympy.rsolve?
gives :
Signature: sympy.rsolve(f, y, init=None)
Docstring:
Solve univariate recurrence with rational coefficients.
Given k-th order linear recurrence \operatorname{L} y = f, or
equivalently:
a_{k}(n) y(n+k) + a_{k-1}(n) y(n+k-1) + ... + a_{0}(n) y(n) =
f(n)
where a_{i}(n), for i=0, ..., k, are polynomials or rational
functions in n, and f is a hypergeometric function or a sum of a
fixed number of pairwise dissimilar hypergeometric terms in n,
finds all solutions or returns "None", if none were found.
[ Abbreviated... ]
Of course, see also [Wikipedia](https://en.wikipedia.org/wiki/Recurrence_relation)...
HTH,Thu, 12 Aug 2021 10:31:07 +0200https://ask.sagemath.org/question/58419/how-we-can-solve-a-difference-equations-in-sagemath/?answer=58421#post-id-58421