Infinite Sum of a Sequence.

My Code:
syms k x
y= 1-8*(-0.4)^(k)+7*(0.4472135955)^(k)*(cos(2.0344439358*k)-sin(2.0344439358*k))
E=symsum((y-1)^2,k,0,inf)
Im getting this:
>> Untitled
y = 7*(8056283928195279/18014398509481984)^k*(cos((4581160475587523*k)/2251799813685248) - sin((4581160475587523*k)/2251799813685248)) - 8*(-2/5)^k + 1
E = symsum((7*(8056283928195279/18014398509481984)^k*(cos((4581160475587523*k)/2251799813685248) - sin((4581160475587523*k)/2251799813685248)) - 8*(-2/5)^k)^2, k, 0, Inf)
Why am I not getting a sum?

 Accepted Answer

Change
E=symsum((y-1)^2,k,0,inf)
to
E=vpa(symsum((y-1)^2,k,0,inf))

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!