Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31

Math Help - Different ways of calculating pi

  1. #16
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by TriKri View Post
    That random number thing is interesting, cause I don't understand how \pi can be in this kind of discrete probability, if I may say so. I guess that two randomly chosen positive numbers a and b both in the interval [1, \infty) has this chance of not sharing any prime factor: \prod_{p\text{  prime}} 1 - \frac{1}{p^2} because the chance is \frac{1}{p} for a to be divisible by p and hence have prime factor p, and the same is for b. For both a and b to have prime factor p the chance is \frac{1}{p^2}. For a and b to not share prime factor p the chance is 1 - \frac{1}{p^2}. And for a and b to not share any of the primes as a prime factor the chance is \prod_{p\text{  prime}} 1 - \frac{1}{p^2}. Though I have no idea how to connect that formula with \pi.
    This is the infamous "Euler-Product Formula" that started the entire Riemann hypothesis thing being connected to prime numbers.

    The infinite product in this case is the same as the infinite sum of all integral square, namely the zeta function evaluated at 2.
    Thus, (and I think you meant this)
    \prod _p(1-p^{-2})^{-1}=\zeta (2)=\frac{\pi^2}{6}.
    Hence, pi appears in this expression.
    Follow Math Help Forum on Facebook and Google+

  2. #17
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ThePerfectHacker View Post
    I have a question on this. When I first saw this I found it really interesting that \pi appears in the probability (I believe that you have to think of the full area of the needle, which forms a circle, and hence \pi). But I was told it does not converge very fast. If randomly done on a computer it shall take a few thousand experiments to get a few decimal points. Your approach for calculating \pi is more elegant but I win this competition because mine is more efficient.
    I'm not looking for efficiency I looking for Mad Scientists/Mathemeticians
    methods, so I prefer Bob Matthews' and Buffon's methods, so we both win

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #18
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by ThePerfectHacker View Post
    Here is an infinite series developed by Ramanjuan.
    It has a collasol rate of convergence,
    \frac{1}{\pi} = \frac{\sqrt{8}}{9801}\sum_{n=0}^{\infty} \frac{(4n)!}{(n!)^4} \cdot \frac{1103+26390n}{396^{4n}}
    It certainly is not the nicest looking formula.
    But the the most effective.
    If you have a computer language, program this and see the results.
    Here's my own formula, not nearly as effective (in fact it's reasonably slow) and pretty ugly but how many pi formulas have you made

    And I don't think I'm writing the "sum" part correctly

    \pi=2\cdot\sum_{a\to n}^{n\to \infty}\frac{\sqrt{2\left(n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}\right)}}{n}
    Last edited by Quick; November 29th 2006 at 05:42 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #19
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by Quick View Post
    Here's my own formula, not nearly as effective (in fact it's reasonably slow) and pretty ugly but how many pi formulas have you made

    And I don't think I'm writing the "sum" part correctly

    \pi=2\cdot\sum_{a\to n}^{n\to \infty}\frac{\sqrt{2\left(n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}\right)}}{n}
    just to clarify.

    n\to \infty means that the closer n gets to infinity, the more accurate the number.

    a\to n means you add up every integer less than or equal to n.

    After 100 terms, the series spits out the number: 3.14129
    Follow Math Help Forum on Facebook and Google+

  5. #20
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by Quick View Post
    but how many pi formulas have you made
    I made one. The most obvious one based on area below a semi-circle.
    Follow Math Help Forum on Facebook and Google+

  6. #21
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,939
    Thanks
    338
    Awards
    1
    Quote Originally Posted by Quick View Post
    Here's my own formula, not nearly as effective (in fact it's reasonably slow) and pretty ugly but how many pi formulas have you made

    And I don't think I'm writing the "sum" part correctly

    \pi=2\cdot\sum_{a\to n}^{n\to \infty}\frac{\sqrt{2\left(n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}\right)}}{n}
    I believe you are looking for:
    \pi=\lim_{n \to \infty}2\cdot\sum_{a = 0}^n \frac{\sqrt{2\left(n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}\right)}}{n}

    And where the heck does this monstrosity come from?

    -Dan
    Follow Math Help Forum on Facebook and Google+

  7. #22
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by topsquark View Post
    I believe you are looking for:
    \pi=\lim_{n \to \infty}2\cdot\sum_{a = 0}^n \frac{\sqrt{2\left(n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}\right)}}{n}

    And where the heck does this monstrosity come from?

    -Dan
    Well this "monstrosity" was a failed attempt at a function

    But it's derived from measuring a quarter of the perimeter of an oddly shaped polygon inscribed in a unit circle

    I must say that if you take away the equal sign noone (not even me) would guess that this thing is even remotely related to pi
    Follow Math Help Forum on Facebook and Google+

  8. #23
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Here is another method I came up with when I was Quick's age.
    Using the Polygonal method (just like Quick used).
    \lim_{n\to \infty} n\sin \left( \frac{180^o}{n} \right)=\pi
    Follow Math Help Forum on Facebook and Google+

  9. #24
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by ThePerfectHacker View Post
    Here is another method I came up with when I was Quick's age.
    Using the Polygonal method (just like Quick used).
    \lim_{n\to \infty} n\sin \left( \frac{180^o}{n} \right)=\pi
    I did that to (remember my quick's quick question?)

    Except I thought back and realized that sin might use pi to get the answer

    That's the whole reason for this gigantic new one.
    Follow Math Help Forum on Facebook and Google+

  10. #25
    Senior Member TriKri's Avatar
    Joined
    Nov 2006
    Posts
    358
    Thanks
    1
    Quote Originally Posted by Qiuck
    \lim_{n \to \infty}2\cdot\sum_{a = 0}^n \frac{\sqrt{2\left(n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}\right)}}{n}=\pi
    What does it do? I'm having a hard time following it.

    I can see that it is equivalent to

    \lim_{n \to \infty}\frac{\sqrt{8}}{n}\cdot\sum_{a = 0}^n \sqrt{n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2(n^2+2a(1-a)-1)}}=\pi

    but I don't know how that's supposed to help
    Follow Math Help Forum on Facebook and Google+

  11. #26
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by TriKri View Post
    What does it do? I'm having a hard time following it.

    I can see that it is equivalent to

    \lim_{n \to \infty}\frac{\sqrt{8}}{n}\cdot\sum_{a = 0}^n \sqrt{n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+n^2(n^2+2a(1-a)-1)}}=\pi

    but I don't know how that's supposed to help
    I've rewritten it (so that it looks better) to:

    \lim_{n\to\infty}\frac{\sqrt8}{n}\cdot\sum_{a=0}^n  \sqrt{n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+2an^2(1-a)+n^2(n^2-1)}}=\pi

    although it still looks pretty ugly

    If you are asking how it's derived, I can easily show you
    Follow Math Help Forum on Facebook and Google+

  12. #27
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by Quick View Post
    I've rewritten it (so that it looks better) to:

    \lim_{n\to\infty}\frac{\sqrt8}{n}\cdot\sum_{a=0}^n  \sqrt{n^2-a^2+a-\sqrt{a^2\left(a-1\right)^2+2an^2(1-a)+n^2(n^2-1)}}=\pi

    although it still looks pretty ugly

    If you are asking how it's derived, I can easily show you
    I'm having a weird problem, hopefully with MSexcel

    after 100 terms, excel gives: 3.141299

    After 200 however, excel gives: 3.194243

    The way I set up the equation, it should never get above pi...

    Can anyone verify excels answer (with mathematica or something)

    If it's my equation, then I'll post the method for you guys to see what's wrong (I've gone over the work several times)
    Follow Math Help Forum on Facebook and Google+

  13. #28
    Senior Member TriKri's Avatar
    Joined
    Nov 2006
    Posts
    358
    Thanks
    1
    > If you are asking how it's derived, I can easily show you

    Yes, that's what I meant.
    Follow Math Help Forum on Facebook and Google+

  14. #29
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by TriKri View Post
    > If you are asking how it's derived, I can easily show you

    Yes, that's what I meant.
    I hope you have a good imagination...

    Consider a unit circle surrounding the origin, it's equation is y^2=1-x^2

    Now my method only uses the first quadrant, so forget all the other ones

    First, put n equally spaced points along the x-axis from 0 to 1.

    Now draw vertical lines from the points.

    Connect the intersections of the lines and the circle to each other (you'll get a quarter of an oddly shaped polygon)

    So try finding the total of those measurements.

    To do that you must first solve for the change in y (which I call \Delta y for each increment.

    Consider the vertical line at point a, it intersects the circle at the y value: y^2=1-x^2\Longrightarrow y=\sqrt{1-\left(\frac{a}{n}\right)^2}=\sqrt{\frac{n^2}{n^2}-\frac{a^2}{n^2}}=\sqrt{\frac{n^2-a^2}{n^2}}

    So then: \Delta y=\sqrt{\frac{n^2-a^2}{n^2}}-\sqrt{\frac{n^2-(a-1)^2}{n^2}}

    Then: \Delta y=\sqrt{\frac{n^2-a^2}{n^2}}-\sqrt{\frac{n^2-(a^2-2a+1)}{n^2}}

    Thus: \Delta y^2=\frac{n^2-a^2}{n^2}+\frac{n^2-(a^2-2a+1)}{n^2}-2\sqrt{\frac{n^2-a^2}{n^2}}\sqrt{\frac{n^2-(a^2-2a+1)}{n^2}}

    Working through you'll eventually get: \Delta y^2=\frac{2n^2-2a^2+2a-1-2\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}}{n^2}

    Now the value of the hypotenuse of the triangle with \Delta y as the height is: \sqrt{\frac{2n^2-2a^2+2a-1-2\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}}{n^2}+\frac{1}{n^2}}

    And then solve...

    Can you do it from here? It wasn't a very good explanation...
    Follow Math Help Forum on Facebook and Google+

  15. #30
    Senior Member TriKri's Avatar
    Joined
    Nov 2006
    Posts
    358
    Thanks
    1
    I dont get this ... as far as I can see, you calculate y' from the equation y = \sqrt{1-x^2}, to put an integral on y', to get ... pi? How is that...

    Isn't it simpler just integrating y directly:

    \sum_{a=0}^n \frac{\sqrt{1-\left(\displaystyle\frac{a}{n}\right)^2}}{n}\ =\ \frac{1}{n}\sum_{a=0}^n \sqrt{\frac{n^2-a^2}{n^2}}\ = \ \frac{1}{n^2}\sum_{a=0}^n \sqrt{n^2-a^2}


    And one thing, I spoted that you set \Delta y = \sqrt{\Delta y^2}, that's equal to |\Delta y| for real numbers \Delta y.
    Note that \sqrt{\frac{n^2-a^2}{n^2}}-\sqrt{\frac{n^2-(a-1)^2}{n^2}}\ =\ -\sqrt{\frac{2n^2-2a^2+2a-1-2\sqrt{a^2\left(a-1\right)^2+n^2\left(n^2+2a(1-a)-1\right)}}{n^2}+\frac{1}{n^2}}
    Follow Math Help Forum on Facebook and Google+

Page 2 of 3 FirstFirst 123 LastLast

Similar Math Help Forum Discussions

  1. Ways of calculating Mean and Variance
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: October 18th 2009, 04:25 AM
  2. Two ways of calculating area of a cylinder?
    Posted in the Calculus Forum
    Replies: 0
    Last Post: May 13th 2008, 05:14 AM
  3. how many ways could you
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: February 25th 2008, 05:10 PM
  4. ways............
    Posted in the Discrete Math Forum
    Replies: 30
    Last Post: January 7th 2008, 09:07 AM
  5. in how many ways can...
    Posted in the Statistics Forum
    Replies: 2
    Last Post: May 13th 2007, 07:37 AM

Search Tags


/mathhelpforum @mathhelpforum