Exponential decay: I need an expression for N at time t

Click For Summary
SUMMARY

The discussion focuses on solving the differential equation for exponential decay represented by dN/dt = -(B*N - C), where N starts at a value N0 and B and C are constants. The solution involves two steps: solving the homogeneous equation dN_h/dt = -B*N_h(t) and finding a particular solution N_p(t) = A. The general solution is N(t) = N_h(t) + N_p(t). The participants also discuss numerical methods, specifically the Euler method, for approximating N over time using iterative calculations.

PREREQUISITES
  • Understanding of differential equations, specifically first-order linear equations.
  • Familiarity with numerical methods, particularly the Euler method.
  • Basic knowledge of programming for iterative calculations.
  • Concept of exponential decay and its mathematical representation.
NEXT STEPS
  • Study the analytical solution of first-order linear differential equations.
  • Learn about the Euler method for numerical integration of differential equations.
  • Explore advanced techniques for solving differential equations, such as Laplace transforms.
  • Investigate the impact of varying constants B and C on the decay process.
USEFUL FOR

Mathematicians, physics students, computer programmers, and anyone interested in modeling decay processes or solving differential equations numerically.

Jehannum
Messages
102
Reaction score
26
I have a large quantity N, which starts off equal to a determinable value N0.

Over a short time ∆t, the value of N changes by -∆t*(B*N - C)

where B and C are determinable constants. Am I correct in thinking I can turn this into:

dN/dt = -(B*N - C)

How do I get this into a formula for N at time t? The 'extra' constant C seems to be making it more difficult than the examples of exponential decay I've found on the net.
 
Physics news on Phys.org
There are various ways to solve the differential equation, but the easiest is to "guess" the answer: an exponential function plus a constant. You can then find the parameters of this ansatz.
 
Jehannum said:
I have a large quantity N, which starts off equal to a determinable value N0.

Over a short time ∆t, the value of N changes by -∆t*(B*N - C)

where B and C are determinable constants. Am I correct in thinking I can turn this into:

dN/dt = -(B*N - C)

How do I get this into a formula for N at time t? The 'extra' constant C seems to be making it more difficult than the examples of exponential decay I've found on the net.

You can solve the equation in two steps:
1) Solve the homogeneous equation: ##dN_h/dt=-B*N_h(t)##
2) Then, you need to find a particular solution satisfying the full equation. In this case we can guess ##N_p(t)=A##, where ##A## is to be determined.
3) The most general solution is ##N(t)=N_h(t)+N_p(t)##
 
Unfortunately, my maths isn't yet advanced enough to do that.

I've been using a computer program to iterate the value of N over shorter and shorter dt intervals:

Num0 = 8.98249E+23 'Num0 = start value of N
B = 1.3831E-3
C = 1.21989E+21​

Numleft = Num0 'Numleft is the value of N as it decreases through the iterations

For time = 0 To (120 / dt) Step dt
Numleft = Numleft - dt * (B * Numleft - C)
Next time

As I try smaller and smaller values of dt, the final value of Numleft converges to 8.82E23

B and C will change in different situations. I'd like a non-iterative equation to find Numleft for any B and C (these will always be positive, if that helps).

PS. I notice that the constant C is not multiplied by Numleft, so the calculation in the loop could be written as: Numleft = Numleft - dt * B * Numleft + dt * C

Does this mean that dt * C can be ignored as dt -> 0?​
 
Jehannum said:
Unfortunately, my maths isn't yet advanced enough to do that.
That is more complicated than finding the exact solution.
 
I don't know what your background in Mathematics is. How to solve that differential equation is taught in a first course in differential equations, already in high school. Anyway, I can give some advice regarding how to solve it numerically. I don't know if you can find a non-iterative equation unless you solve it analytically.
However, I think you have misunderstood the way it should be solved. To do this numerically the simplest way is to discretize the equation. That is,
##dN \rightarrow N_{k+1}-N_{k)}, dt\rightarrow\Delta_t=t_{k+1}-t_{k}##, where ##N_{k+1}=N(t_{k+1}), N_{k}=N(t_{k})##. Here, ##t_k=k*\Delta##, assuming a equidistant mesh in time.
Then, you have
##N_{k+1}=N_{k}-(BN_k-C)##, where ##N_0=Num0##
In this way you can compute ##N(t)## by starting from ##t=0## and use the aforementioned relation. This is the so-called Euler method, see e.g. https://en.wikipedia.org/wiki/Euler_method
 
mfb said:
That is more complicated than finding the exact solution.
Yes, I completely agree with you.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
Replies
3
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K