value of ฯ€ by Gregory-Leibniz series in fortran

An infinite sum series first given by Madhava and later rediscovered by Gregory and Leibniz is expressed as, 

โˆžโˆ‘n=0(-1)n2n+1=ฯ€4
or, ฯ€4=โˆžโˆ‘n=0(-1)n2n+1
โˆดฯ€=4ร—โˆžโˆ‘n=0(-1)n2n+1
Where n  = 0,1,2,3,4,5, ..................................,  positive integer.

For n =0
ฯ€=4ร—1

For n = 0,1
   ฯ€=4ร—(1-13)

For n = 0,1,2
ฯ€=4ร—(1-13+15)

For n = 0,1,2,3
ฯ€=4ร—(1-13+15-17) and so on.

Continuiing this process  up to nโ‰ˆโˆž,  you obviously get,
   ฯ€=4ร—(1-13+15-17+19-111+....................)   (2)
This is called Gregory-Leibniz series to estimate value of ฯ€

fig. 1. n vs. ฯ€ plot

n gives number of terms in the series. 

To get fortran code for estimation of value of ฯ€ by using Gregory-Liebniz series, click on the given button :  Get Files



Learn to create gif animation in gnuplot software: Click Here.


Comments

These posts may also be useful for you

top 3 websites for downloading research papers for free

plot graph in gnuplot from csv and data file | knowledge of physics

projectile motion in fortran | relation of angle of projection and horizontal range

NEB physics exam numerical problems with solutions for grade 12 students

how to plot 3D and parametric graphs in gnuplot | three dimensional plot in gnuplot software

how to create GIF animation in gnuplot | animation using gnuplot software

NEB board exam maths solved problems with proper solutions - available for free | short answered mathematics problems solved group A

NEB grade 11 and 12 maths exam MCQ solved problems | NEB mathematics MCQ solved problems