Comment #2 on issue 3745 by [email protected]: Sympy doesn't solve a
recurrence with initial conditions
http://code.google.com/p/sympy/issues/detail?id=3745
The problem is that rsolve() (without initial conditions) returns a
solution with non-linear combination of constants:
In [1]: u=Function('u')
In [2]: rsolve(u(n+2) - u(n+1) + u(n)/4,u(n))
Out[2]:
C₀
- ── - n + 1
C₁
2 ⋅C₀⋅(C₀ + C₁⋅n)
────────────────────────────
C₁
This should be (C0 + C1*n)*2**(-n).
But this is only beginning:
1) list of symbols, returned rsolve_hyper() is wrong (only [C0]) - that's
why the above exception
2) solve(equations,C0,C1) returns [], not C1=oo and C0=1:
Out[16]:
C₀
- ── + 1
C₁ 2
2 ⋅C₀
─────────────
C₁
In [17]: s1
Out[17]:
-C₀
───
C₁
2 ⋅C₀⋅(C₀ + C₁)
─────────────────
C₁
In [19]: solve([s0,s1-1],C0,C1)
Out[19]: []
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.