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!

Two-Step backward differentiation

  1. Oct 15, 2013 #1
    1. The problem statement, all variables and given/known data

    By using Taylor expansion, derive the following two-step backward differentiation which has second
    order accuracy:
    [tex]\frac{3y_{j+1}-4y_j+y_{j-1}}{2h}=f(t_{j+1},y_{j+1})[/tex]




    2. Relevant equations
    Taylor expansion
    ODE
    [tex]y^{\prime}=f(t,y) , y(0)=\alpha[/tex]

    3. The attempt at a solution

    I find the expansion for [tex] y_{j+1}=y_j+hy^{\prime}_j+\frac{h^2}{2!}y^{\prime \prime}+\cdots [/tex]
    and
    [tex]y_{j-1}=y_j-hy^{\prime}_j+\frac{h^2}{2!}y^{\prime \prime}+\cdots [/tex]

    This is where I get stuck. If I multiply [itex]y_{j+1}[/itex] by 3 and add [itex]y_{j-1}[/itex] I get the needed left hand side but the right hand side is [itex]f(t_{j},y_{j})=y^{\prime}_j[/itex]. How can I have an expansion that includes[itex]f(t_{j+1},y_{j+1})[/itex] that will yield the LHS of the derivation? Am I going about this all wrong? This problem seems relatively simple yet I think I am missing an important step.
     
  2. jcsd
  3. Oct 15, 2013 #2
    Your equation doesn't have second order accuracy. It only has first order accuracy. Do your expansion around tj+1 and yj+1, going 1 step back and 2 steps back. You need to end up with an equation that has a zero coefficient for the second derivative.
     
  4. Oct 15, 2013 #3

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    It does have second order accuracy, Chester. This is an implicit integration technique as both the left and right hand sides involve yj+1.

    stvoffutt, what this means is that you should be doing your expansions about yj+1 rather than yj.
     
  5. Oct 15, 2013 #4
    I think you might have misunderstood what I said. The original equation does have second order accuracy, but stvoffutt's derived formula does not. My suggested method is the same as yours for deriving the original formula (featuring 2nd order accuracy).
     
  6. Oct 15, 2013 #5

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Actually, stvoffutt wasn't able to derive a formula. That was his problem.
     
  7. Oct 15, 2013 #6
    Actually, it was clear to me that that the formula he came up with was:

    [tex]\frac{3y_{j+1}-4y_j+y_{j-1}}{2h}=f(t_{j},y_{j})[/tex]

    This was the source of his concern. It didn't match the given equation. Also, he didn't realize that, as a consequence of the method that he used, this formula is not 2nd order accurate. The method that both you and I suggested will yield the desired formula, and the derivation will automatically lead to 2nd order accuracy (by requiring that the coefficient of the second derivative in the final equation is zero).
     
  8. Oct 15, 2013 #7
    So should I expand like this?
    [tex]y_{j+2}=y_{j+1}+2hy^{\prime}_{j+1}+\frac{4h^2}{2!}y^{\prime \prime}_{j+1}+\cdots[/tex]
    and do the same thing for [itex]y_{j-2}[/itex]?
     
  9. Oct 15, 2013 #8

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    No. There is no yj+2 anywhere in the problem statement. You don't need it. You should expand yj and yj-1 in terms of yj+1.
     
  10. Oct 15, 2013 #9
    I'm not sure how to expand y_j in terms of y_j+1. Can you point me in the right direction?
     
  11. Oct 15, 2013 #10

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Sure you do. You did it right here:
    Just relabel your indices.
     
  12. Oct 15, 2013 #11
    [itex]y_j=y_{j+1}+hy^{\prime}_{j+1}+\frac{h^2}{2!}y^{\prime \prime}_{j+1}+O(h^3)[/itex]?
     
  13. Oct 15, 2013 #12

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    No. That's yj+2. You want yj.
     
  14. Oct 15, 2013 #13
    [itex]y_j=y_{j-1}-hy^{\prime}_{j-1}+\frac{h^2}{2!}y^{\prime \prime}_{j-1}+O(h^3)[/itex]?
    I'm sorry. I am having a hard time trying to keep all of this straight. This is my first course in numerical analysis.
     
  15. Oct 15, 2013 #14

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    No!!! Don't just guess. You want yj on the left, terms involving yj+1 and it's time derivatives on the right.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted