hello can anyone help me with an infinite series problem? i've tried it but i'm kinda stuck
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens

function T = sum(n = 1 to infty)((-1)^{n-1}(n^2+1))/(2^n)
x=input('enter the x value: ');
epsilon_s=(0.5*10^(2-n));
epsilon=100;
iteration=1;
eps_array(1) = 0;
while epsilon>epsilon_s
(i'm stuck on this step)
0 commentaires
Réponses (1)
Ameer Hamza
le 21 Avr 2020
Modifié(e) : Ameer Hamza
le 21 Avr 2020
Try this. It finds the sum symbolically.
syms n
term = (-1)^(n-1)*(n^2+1)/2^n;
y = symsum(term, n, 1, inf);
9 commentaires
Walter Roberson
le 22 Avr 2020
That is what is expected from the code. Your code does not ask to display any results.
disp(y)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

