Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is there any general formula for strings?

  1. Sep 8, 2008 #1
    Is there any general formula for strings?

    For example:

    what is the formula of this string -1,3,-5,7,-9,....?

    Thanks.
     
  2. jcsd
  3. Sep 9, 2008 #2

    Defennder

    User Avatar
    Homework Helper

    Re: string

    Why is this called a string?
     
  4. Sep 9, 2008 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: string

    A "string" is any list of symbols so that qualifies as a string, although most of us might prefere the more precise term "numerical sequence".

    Remove the negative signs: 1, 3, 5, 7, 9, ... Can you find a simple formula for that? (How do you normally write odd numbers?)

    Now remember that (-1)n alternates sign.
     
  5. Sep 10, 2008 #4
    Re: string

    (2n-1), and the final (-1)n(2n-1). Thanks for the help.
     
  6. Sep 10, 2008 #5

    Defennder

    User Avatar
    Homework Helper

    Re: string

    Hmm I thought this was related to linear or abstract algebra in some way.
     
  7. Sep 10, 2008 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: string

    Now Why would you think that?:rofl:
     
  8. Sep 11, 2008 #7

    Defennder

    User Avatar
    Homework Helper

    Re: string

    Well, it's in this forum, for one thing. Nevermind then.
     
  9. Sep 11, 2008 #8
    Re: string

    And what about this string:

    2,5,9,14,20....

    a2-a1=3

    a3-a2=4

    a4-a3=5

    a5-a4=6

    an-an-1=n+1
     
  10. Sep 11, 2008 #9

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: string

    Let me reiterate Defennder's point: this is not really "Abstract Algebra" nor "Linear Algebra". It looks pretty much like "pre-calculus problems".

    You have calculated the "first difference". Now what is the "second difference"? That is, what is 4- 3, 5- 4, 6- 5? Do you see that all "third differences" are 0? Do you know "Newton's divided difference formula"? In this particular case, the difference between the values of n is 1 so we have
    [tex]f(n)= f(0)+ \Delta f(0) n+ \frac{\Delta^2 f(0)}{2}n(n-1)+ ...[/tex]
    (and here the "..." is 0 because all higher differences are 0.)
     
  11. Sep 11, 2008 #10
    Re: string

    Sorry, I didn't know where to put this topic. And no, I didn't learn about Newton's divided difference formula. What is second and third difference? How to calculate second and third difference?

    Edit: Ok, I understand the second and third difference. Just what I need to substitute for?
     
    Last edited: Sep 11, 2008
  12. Sep 11, 2008 #11

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: string

    Write it like this:
    [tex]\begin{array}{ccccc}n & f(n) & \Delta f(n) & \Delta^2 f(n) & \Delta^3 f(n) \\ 0 & 0 & 2 & 1 & 0 \\1 & 2 & 3 & 1 & 0 \\ 2 & 5 & 4 & 1 & 0\\ 3 & 9 & 5 & 1 \\ 4 & 14 & 6 \\ 5 & 20 \end{array}[/tex]
    The first column are the "n" values. The second column are the sequence values: f(1)= 2, f(2)= 5, f(3)= 9, f(4)= 14, and f(5)= 20, as you gave. The third column are the "first difference" values also as you gave: the difference between two consecutive values in the second column. The third column is the "second differences": the difference between two consecutive values in the second column. Because those are consecutive integers, 2, 3, 4, 5, the "third differences", the difference between two consecutive values in the third column, is always 1. All further diffences, then, will be 0 and can be ignored.

    I put in the top row, n= 0, by working backwards: if 3-a= 2, then a= 2; if 2- a= 2, then a= 0.

    Now, as I said before, Newton's divided difference formula says
    [tex]f(n)= f(0)+ \Delta f(0) n+ \frac{\Delta^2 f(0)}{2}n(n-1)+ ...[/tex]
    Looking at the chart, f(0)= 0, [itex]\Delta f(0)= 2[/itex], and [itex]\Delta^2 f(0)= 1[/itex]
    Therefore,
    [tex]f(n)= 0+ 2n+ \frac{1}{2}n(n-1)[/tex]
    Simplify that and check its values for n= 1, 2, 3, 4, and 5.
     
  13. Sep 11, 2008 #12
    Re: string

    Ok, now I completely understand. Thanks for the post. Can I use this formula to find other strings or this is special case?
     
  14. Sep 12, 2008 #13
    Re: string

    Can I does the same with :

    -1,3,-5,7,-9?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?