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

Converting a problem solved with numerical analysis to a simple exponential

  1. Jan 29, 2010 #1
    I'm just a neuroscientist, so forgive me if the answer to this question is either obvious, or the answer is that it is impossible, obviously.

    Basically, this image should outline the question clearly
    http://img713.imageshack.us/img713/2569/mathsissuefixedyxs.gif [Broken]
    (And Y0 is always 1)

    Also, I tried just fitting an exponential to the output. For instance, if I set Y0=1, i = 1, k = 1 and D=0.5, then the output is explained by the curve Yn = (1 - 0.7746)*e^(1.693 * t) + 0.7746 so I can't see the relation, between the fit constants constants in the numerical method

    Oh, and just in case anyone is confused about the exponential recovery process equation
    yn = (y(n-1) * D) + (1 - y(n-1) * D) * (1 - e^(-k*i))
    I modeled it after the general equation for exponential recovery
    Y = initial value + (asymptote - initial value) * (1 - e^(-k*x))
    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Jan 31, 2010 #2
    Your difference equation is of the form y(n) = A*y(n-1) + B, where y(0) = 1.

    The solution I get is y(n) = A^n + B/(1-A)

    I'm guess the A<1 in your case, since the solution decreases? I have assumed that A is not 1.

    But I may have made a mistake. I used the common method of first finding the solution to the homogeneous equation (B=0), and then find a particular solution of the inhomogeneous equation.

  4. Jan 31, 2010 #3
    Okay... and how do your constants of A and B relate to my constants Y0, i, k and D?
    Last edited: Jan 31, 2010
  5. Jan 31, 2010 #4
    A = De^(-k i)

    B = 1 - e^(-k i)
  6. Jan 31, 2010 #5
    Interesting... the seems to match very closely apart from the fact that the initial value is not 1, i.e. when n = 1
  7. Jan 31, 2010 #6
    The general solution is:

    y(n) = K A^n + B/(1-A)

    where K is some arbitrary constant that you can adjust to get the correct initial value. Putting n = 1 gives

    y(1) = K A + B/(1-A) --->

    K = [y(1) - B/(1-A)]/A
  8. Jan 31, 2010 #7
    Ah, excellent. That is amazing!

    How complicated does it get if between events, instead of the process recoverying with a single exponential, it recovery with a bi-exponential

    i.e. the equation for the second event would be

    Y=Y1*D + (1-Y1*D)*PercentFast*(1-exp(-KFast*i)) + (1-Y1*D)*(1-PercentFast)*(1-exp(-KSlow*i))
  9. Feb 1, 2010 #8
    Is that too hard to calculate the difference equation for? Is it likely there is another forum that someone might be able to do it?
  10. Feb 1, 2010 #9
    As far as I can see, this is still of the same form y(n+1) = A*y(n) + B, so the solution is the same, only with other values of A and B. A is everything that multiplies y(n) on the right hand side of your equation, and B is the rest.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook