Find accuracy of 0.xx.. using Symsum

1 view (last 30 days)
Study a
Study a on 13 Feb 2016
Answered: Study a on 14 Feb 2016
Hello!
I was given the following series (1 to inf):
((47^(2*n) *(-1)^n)/ Factorial(2*n),1,inf)
Which eventually gives you cos 47 in radians.
I'm trying to find a way to calculate the index number that gives me the cos 47 accuracy of 0.001 (or less), using symsum. (and not with a 'while' loop that checks every iteraion if cos47 minus current series gives me 0.001 or less).
Thank you very much!
  4 Comments
Study a
Study a on 14 Feb 2016
My bad!yes you are right, it should start from 0. I still can't find a way to find the accuracy (using the while solution I think it was between n=90 to n=100
Study a
Study a on 14 Feb 2016
For those who find this question later on, I found a solution:
syms n;
a= symsum((47^(2*n)*(-1)^n)/factorial(2*n),0,65);
a=vpa(a,4);
b= symsum((47^(2*n)*(-1)^n)/factorial(2*n),0,66);
b=vpa(a,4);
disp(a-b);
this gives you an accuracy of 0.001.

Sign in to comment.

Accepted Answer

Study a
Study a on 14 Feb 2016
For those who find this question later on, I found a solution:
syms n;
a= symsum((47^(2*n)*(-1)^n)/factorial(2*n),0,65);
a=vpa(a,4);
b= symsum((47^(2*n)*(-1)^n)/factorial(2*n),0,66);
b=vpa(a,4);
disp(a-b);
this gives you an accuracy of 0.001.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!