hello can anyone help me with an infinite series problem? i've tried it but i'm kinda stuck
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos

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 comentarios
Respuestas (1)
Ameer Hamza
el 21 de Abr. de 2020
Editada: Ameer Hamza
el 21 de Abr. de 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 comentarios
Walter Roberson
el 22 de Abr. de 2020
That is what is expected from the code. Your code does not ask to display any results.
disp(y)
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

