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

Difference Equation

  1. Feb 10, 2016 #1
    I have a difference equation which is given as:

    ΔP = e^P [1]

    where we can re-write ΔP as: Δ P = P_2 - P_1, where the subscripts indicate two distinct discrete time indices.

    What I would like to do: is to convert this into a continuous time expression and solve it, if possible.

    In order to help give some insight, I will solve a similar type of problem where I know the solution.

    ΔP = c_1 [2]

    Note here, that in all cases we are running the recursive algorithm at a fixed data rate. Therefore, I can rewrite equation [1] as:

    Δ P = P_2 - P_1 = c_2 ⋅ Δ t

    where c_1 = c_2 ⋅ Δ t

    This allows me to divide both sides by [equation] \Delta t [/equation]:

    ΔP /Δt = c_2

    And in the limit:

    dP/dt = c_2

    which then becomes:

    P(t) - P(0) = c_2⋅(t - t_0)

    And so the result is that this recursive equation [2] gives us a linear ramp if we were to implement it. What I am trying to do for equation [1] is figure out what this expression will look like.
  2. jcsd
  3. Feb 10, 2016 #2
    To which discrete time index is e^P refering?
  4. Feb 10, 2016 #3


    User Avatar
    Science Advisor

    You can approximate it by a "continuous derivative" with different results depending upon what "continuity" assumptions you make.
  5. Feb 10, 2016 #4


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    looks explosive if I try a few numbers:
    Code (Text):

    n   P1           exp(P1)         P2
    0   0.0001       1.0001      1.0002
    1   1.0002       2.718826    3.719026
    2   3.719026    41.2242     44.94323
    3  44.94323      3.3E+19     3.3E+19
    I find it hard to believe this is what's intended ... ?
  6. Feb 10, 2016 #5
    Sorry all I forgot it's e^p1
  7. Feb 10, 2016 #6
    Good point, it's actually e^(p1 - c_3)

    Which is a negative exponential, but we can rewrite that as e^p1 / e^c_3 so I left out the denominator since it was a constant value. c_3 is just a constant
  8. Feb 10, 2016 #7
    I'm open to any solutions that are simple with some reasonable assumptions. :-)
  9. Feb 10, 2016 #8
    Hey look who's back :smile:
  10. Feb 11, 2016 #9


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Still explodes, at some point P1 > c3.
    Let C3 = 100 and P1 start at 1:

  11. Feb 11, 2016 #10


    User Avatar
    Homework Helper

    It looks like you have, for a fixed data rate
    ##\Delta P = e^P,## so ##P_2 - P_1 = e^{P_1 } \Delta t##?
    In the same way you simplified the first problem,

    ##\frac{\delta P}{\delta t} = \frac{ P(t+\delta t) - P(t) }{ \delta t} = e^{ P(t) }.##
    In the limit, this will give you ## P' = e^{P(t)} ##

    As BvU has pointed out, no matter what your starting P_1 is, your function will eventually blow up. Is there some other context for this problem? Maybe some initial values?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Difference Equation
  1. Difference equation (Replies: 0)

  2. Difference equation (Replies: 7)