I have to solve equation:
a[n+2]-4*a[n+1]+4*a[n]=2^n+cos(n*pi/2), a[0]=1, a[1]=2
My sage input is:
from sympy import *
y = Function('y')
n = Symbol('n',integer=True)
rsolve(y(n+2)-4*y(n+1)+4*y(n)-2^n-cos(n*pi/2), y(n), {y(0):1,y(1):2})
But I'm getting an error:
ValueError: 'y' expected, got 'cos'
Sage has some problems with cosine function, any idea how to solve it?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.