1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding a closed form expression given decimal approximation

  1. Nov 21, 2015 #1

    fedaykin

    User Avatar
    Gold Member

    Good evening. Is there a way to take a decimal approximation and see if there is a relatively simple expression?
    I'm guessing there might be software for this, but I'm not sure I'm even asking the appropriate question.
    If it matters, the number I'm after is [tex]\sqrt{1+\sqrt{2+\sqrt{4+\sqrt{8+\sqrt{16+ ... }}}}}[/tex] . This is the powers of 2 under a nested radical.
     
  2. jcsd
  3. Nov 21, 2015 #2

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You can apply Ramanujan's method to this. Set
    $$ t =\sqrt{1+\sqrt{2+\sqrt{2^2+\sqrt{2^3+\sqrt{2^4+ \cdots }}}}}.$$
    Then
    $$ t^2 = 1 + \sqrt{2} t,$$
    and we must take the positive root.
     
  4. Nov 22, 2015 #3

    fresh_42

    Staff: Mentor

    If I calculate $$\sqrt{2} t$$ then the powers of 2 under the roots increase exponentially:
    $$ \sqrt{2+\sqrt{2^3+\sqrt{2^6+\sqrt{2^{11}+\sqrt{2^{20}+ \cdots }}}}}.$$
    Am I mistaken somewhere or is $$ t^2 = 1 + \sqrt{2} t$$ meant as an approximation?
     
  5. Nov 22, 2015 #4

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The first few terms in the sequence for ##t## are {1., 1.55377, 1.73205, 1.78812}, so this certainly looks convergent. You might try to prove a bound on convergence for the expression where we replace 2 by ##n##.
     
  6. Nov 23, 2015 #5

    fedaykin

    User Avatar
    Gold Member

    Thank you guys! It's a lead!
     
  7. Nov 23, 2015 #6

    Svein

    User Avatar
    Science Advisor

    And then it is simple to solve: [itex]t^{2}=1 + \sqrt{2}t [/itex], rearrange: [itex] t^{2}-\sqrt{2}t-1=0[/itex] and solve: [itex]t=\frac{\sqrt{2}\pm\sqrt{2+4}}{2}=\frac{\sqrt{2}}{2}(1\pm \sqrt{3}) [/itex]. Obviously, we must use the positive sign and get [itex] t=\frac{\sqrt{2}}{2}(1+ \sqrt{3})[/itex] (the numerical value is 1.931852...).
     
  8. Nov 24, 2015 #7

    fedaykin

    User Avatar
    Gold Member

    I've made a nice little excel file to help study these. Interestingly, if you use 4 as a base, it seems to converge to exactly 2. It's the only number so far that I've seen do this. I've tried powers of 2 up to 2^16, and those appear non-rational so far.

    If anyone wishes to use it, you'll have to create a module (or some other means) of implementing the following in VBA:
    Option Explicit

    Public Function goatVal(theInput As String) As Double

    goatVal = Evaluate(theInput)

    End Function


    I can't attach it as macro enabled (wisely), so unfortunately, you'll have to add it manually. The previous code allows you to use the Evaluate function as a standard cell function. That is, it Excel will try to evaluate the contents of a cell as if they were a formula if you put " =goatVal(cellReference) " into them. Be careful, this can take up a decent amount of processor time. It gives me a !value error if the string is getting too large, but seems reasonable otherwise.
     

    Attached Files:

  9. Nov 25, 2015 #8

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The basic idea is this: set [itex]t= \sqrt{1+ \sqrt{2+ \sqrt{2^2+ \sqrt{2^3+ \cdot\cdot\cdot}}}}[/itex]. Squaring both sides, [itex]t^2= 1+ \sqrt{2+ \sqrt{2^2+ \sqrt{2^3+ \cdot\cdot\cdot}}}[/itex]. So [itex]t^2- 1= \sqrt{2+ \sqrt{2^2+ \sqrt{2^3+ \cdot\cdot\cdot}}}[/itex] and, factoring a [itex]\sqrt{2}[/itex] out of the right, [itex]t^2- 1= \sqrt{2}\sqrt{1+ \sqrt{2+ \sqrt{2^2+ \cdot\cdot\cdot}}}= \sqrt{2}t[/itex].
     
  10. Nov 25, 2015 #9

    fresh_42

    Staff: Mentor

    I can see this delivers an upper bound and thus proves convergence. What I cannot see, as mentioned in #3, is equality by factoring out ##\sqrt 2 ##. Since all of you insist on the equality I assume I was mistaken. Can somebody enlighten me why ##\sqrt 2 t > t^2 - 1## is wrong?
     
  11. Nov 25, 2015 #10

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    First, you want to calculate a specific numbers. So, as I and others said, we set t equal that number. How in the world did you convert that equation to an inequality?
     
  12. Nov 25, 2015 #11

    fresh_42

    Staff: Mentor

    $$\sqrt{2} t = \sqrt{2} \sqrt{1+\sqrt{2+\sqrt{2^2+\sqrt{2^{3}+\sqrt{2^{4}+ \cdots }}}}} = \sqrt{2 \cdot 1 + 2 \cdot \sqrt{2+\sqrt{2^{2}+\sqrt{2^{3}+ \cdots }}}} = \sqrt{2 + \sqrt {4 \cdot 2+ 4 \cdot \sqrt{2^{2}+\sqrt{2^{3}+ \cdots }}}} = \sqrt{2 + \sqrt{2^3 +\sqrt{16 \cdot 2^2 +16 \cdot \sqrt{2^{3}+ \cdots }}}} = \cdots = \sqrt{2+\sqrt{2^3+\sqrt{2^6+\sqrt{2^{11}+\sqrt{2^{20}+ \cdots }}}}}.$$
     
  13. Nov 25, 2015 #12

    fedaykin

    User Avatar
    Gold Member

    One thing I don't quite understand yet:

    Evaluating the approximation to these (with several bases) leads to a value that appears to always be less than using Ramanujan's method.
    For example: let n = 4 (where n is the base of powers under the radical) and you get:

    [tex] t^2-2t-1=0 [/tex]
    [tex] t=1+\sqrt{2} \approx {2.414} [/tex]
    [tex] t= 1 - \sqrt{2} \approx {-0.414} [/tex]

    But, if you were to guess at the value from calculation:

    [tex]\sqrt{1+\sqrt{4+\sqrt{16+\sqrt{64+\sqrt{256}}}}} \approx{1.999} [/tex]

    By the way, the calculated approximation does not appear to be related to the two solutions from Ramanujan's method. For the number 4, it's just a coincidence that it is the sum. Perhaps these have a very slow rate of convergence and have a 'false positive' convergence to a different value?

    To everyone that's been so helpful in this thread, you've brought me a lot of joy in understanding these. I first saw the representation of the golden ratio as the powers of one under the radical, and I've been working on these on and off since college. Thank you so much!
     
  14. Nov 26, 2015 #13

    Samy_A

    User Avatar
    Science Advisor
    Homework Helper

    I also think something is wrong here. For your first expression, the calculated value is ##t=\frac{\sqrt{2}}{2}(1+ \sqrt{3})=1.93...##, but your own Excel calculation gives 1.783...
    I also did a calculation in Excel, and get the same results: 1.783... for the first expression, 2 for the second expression (the one with 4).

    I tried Ramajunan's method on the first expression, factoring out the ##\sqrt{2}##, but didn't get the result shown above.

    EDIT: here they also find 1.783... as solution, but no closed-form solution.
     
    Last edited: Nov 26, 2015
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Finding a closed form expression given decimal approximation
  1. Decimal approximations (Replies: 3)

  2. Closed-Form Expression (Replies: 2)

Loading...