Question: how to convert complex solution to form with sin and cos

I would like to know how to convert solution from rsolve 

rsolve({y(n+2)-2*y(n+1)+4*y(n), y(0)=C1, y(1)=C2}, y(n));

(1/6*I)*(C1*sqrt(3)-(3*I)*C1-C2*sqrt(3))*(1+I*sqrt(3))^n+(1/6*I)*(-C1*sqrt(3)-(3*I)*C1+C2*sqrt(3))*(1-I*sqrt(3))^n

to this form with sin and cos

2^n*(C1*cos((1/3)*n*Pi)+C2*sin((1/3)*n*Pi))

Pavel

Please Wait...