Comment #4 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

Probably, we can use constantsimp() for second issue.

In [3]: constantsimp(rsolve(y(n+2) - y(n+1) + y(n)/4,y(n)),n,2)
Out[3]:
 -n
2  ⋅C₁⋅(C₀ + C₁⋅n)
In [6]: solve([Out[3].subs(n,0),(Out[3]-1).subs(n,1)],[C0,C1],dict=True)
Out[6]:
⎡⎧              ___⎫  ⎧             ___⎫⎤
⎢⎨C₀: 0, C₁: -╲╱ 2 ⎬, ⎨C₀: 0, C₁: ╲╱ 2 ⎬⎥
⎣⎩                 ⎭  ⎩                ⎭⎦
In [7]: [Out[3].subs(s) for s in Out[6]]
Out[7]:
⎡   -n       -n  ⎤
⎣2⋅2  ⋅n, 2⋅2  ⋅n⎦

Some preliminary stuff with workaround for 1) issue:
https://github.com/skirpichev/sympy/tree/3745-rsolve-with-constantsimp

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to