Determine if the following series converges or diverges
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello! Can you tell me why my answer is wrong? What do I see: the sequence of partial sums diverges to ∞ and so the series also diverges.
Please tell me which answer is correct and why.
task and my answer in the screenshot
0 commentaires
Réponse acceptée
Jan
le 8 Nov 2022
Modifié(e) : Jan
le 8 Nov 2022
Of course sum(1:Inf) is divergent. Either your answer contains a space (which is invisible in a screenshot...) or the test contains a bug.
Ask the person, who has created this question.
2 commentaires
John D'Errico
le 8 Nov 2022
I don't know. Did not Ramanujan prove that series converges to -1/12? Only joking of course, as the series diverges for all of us mere mathematical mortals.
But this is why a screenshot is a bad thing to show on answers, since we cannot tell if the word was spelled correctly, if it was corrupted with a noncharacter like a space.
Jan
le 8 Nov 2022
@John D'Errico: Or the programmer made a typo and checks for "divregent". I know another programmer, who swapped two characters without noticing it. Such things happen.
Let's perform a test to decide, if this sum converges.
s = uint64(0);
for k = uint64(1):uint64(Inf)
s = s + k;
end
Oh dear, you have triggered humor. Time for a break.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!