Sum of alternating series

30 ビュー (過去 30 日間)
Britnie Casillas
Britnie Casillas 2019 年 9 月 27 日
回答済み: Star Strider 2019 年 9 月 27 日
How do you find the sum of a series with alternate signs. I know how to find with same signs but not alternating. I have no idea where to start. For example, 1-(1/3)+(1/5)-(1/7)+(1/9)...-(1/1003) with the sum equaling to 0.7849~pi/4
*This is not a homework problem. This is a studying question for my upcoming exam. I am very new to matlab and do not know where to start.

採用された回答

Star Strider
Star Strider 2019 年 9 月 27 日
Just create the series and use the sum function:
N = 1003;
frc = (1./(1:2:N));
exv = (-1).^(0:numel(frc)-1);
ser = frc.*exv
ser_sum = sum(ser)
ser_sum =
0.784900155923366

その他の回答 (1 件)

jeewan atwal
jeewan atwal 2019 年 9 月 27 日
Please go through following link:
https://www.quora.com/Why-is-1-1-3-+-1-5-1-7-+-1-9-%CF%80-4

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by