Sum of a series?

1 view (last 30 days)
John Mitchell
John Mitchell on 15 Oct 2019
Commented: Matt J on 15 Oct 2019
I'm having some trouble even finding somewhere to start with these problems, where I have to find the sum of these without using for loops:
1) 1/(1*2) + 1/(2*3)+ 1/(3*4)+ 1/(4*5)+....1/(99*100)
2) e^1-e^2+e^3-e^4....+e^99-e^100
3) x+ x^2/2 + x^3/3 + x^4/4 +.... x^10/10 for x = 0.5

Answers (1)

Matt J
Matt J on 15 Oct 2019
Hint:
>> 1./(1:5)
ans =
1.0000 0.5000 0.3333 0.2500 0.2000
  4 Comments
John Mitchell
John Mitchell on 15 Oct 2019
Thank you so much! I got the first one to work now, and I think I have a idea of how to do the third one, but I am still clueless on how to do the changing signs of the second one
Matt J
Matt J on 15 Oct 2019
The second one is a geometric series with ratio r=-exp(1). It has a closed form formula.

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!