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!

Homework Help: Numerical approximation: Forward diffrerence method

  1. Dec 21, 2009 #1
    1. The problem statement, all variables and given/known data

    [t]=-U+k[xx] u(x,0)=U(L,0)=0 u(x,0)sin(pix/L)

    Write down difference equations for the approximate solution of this problem using the following methods:

    1)forward difference
    2)backward difference
    3)crank nicholson

    2. Relevant equations

    I can do part 3, but i am stuck on the first two methods. I can find an exppression for the partial derivative of t, but the second derivative using the forward difference from a taylor approximation is 0 isnt it?


    which if u solve for f''=0

    3. The attempt at a solution
  2. jcsd
  3. Dec 21, 2009 #2


    User Avatar
    Homework Helper

    I'm not sure about the Taylor expansion (well, I do think that the relevant equations could be derived that way too, but that's not the usual method, I think).

    I'd define the forward difference operator,
    [tex]\partial U_i = \frac{U_{i+1}-U_i}{h}[/tex]
    and use it successively. Similarly for the backward difference. Does this help?
  4. Dec 21, 2009 #3
    This is the definition for the first partial derivative with respect to x , using the forward difference method.I am trying to figure out if it is possible to find an expression for the second derivative with respect to x using the forward difference method. Because when i try i get zero. Usually for a heat equation i use forward difference in time and central difference for spatial, but this question specifically asks for a forward difference representation for the entire problem, so if anyone can help, because i am stuck.
  5. Dec 21, 2009 #4


    User Avatar
    Homework Helper

    Yeah, I know, that's why I mentioned using the operator I defined in my post several times in a row (i.e. what is [itex]\partial\partial U_i[/itex]). The result you get that way deviates from central differences only by a small amount.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook