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

In summary: I was just trying to find a solution that avoided iteration.The equation can be solved analytically by using the method of integrating factors. However, as you pointed out, this requires some advanced knowledge in differential equations. So, the simplest way to solve it numerically is by using the Euler method.
  • #1
Jehannum
102
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.
 
Mathematics news on Phys.org
  • #2
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.
 
  • #3
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)##
 
  • #4
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?​
 
  • #5
Jehannum said:
Unfortunately, my maths isn't yet advanced enough to do that.
That is more complicated than finding the exact solution.
 
  • #6
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
 
  • #7
mfb said:
That is more complicated than finding the exact solution.
Yes, I completely agree with you.
 

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

1. What is exponential decay?

Exponential decay is a mathematical process in which a quantity decreases at a rate proportional to its current value. This means that the amount by which the quantity decreases becomes smaller over time.

2. What is the formula for exponential decay?

The formula for exponential decay is N(t) = N0 * e^(-kt), where N(t) is the quantity at time t, N0 is the initial quantity, e is the mathematical constant approximately equal to 2.71828, and k is the decay rate.

3. How is exponential decay different from exponential growth?

Exponential decay and exponential growth are similar in that they both involve a quantity changing at a rate proportional to its current value. However, in exponential growth, the quantity increases over time, while in exponential decay, the quantity decreases over time.

4. How can I use the expression for N at time t to solve a real-world problem?

The expression for N at time t can be used to model various real-world phenomena, such as population growth or radioactive decay. By plugging in different values for N0, k, and t, you can calculate the quantity at any given time and make predictions about future values.

5. What does the value of k represent in the expression for N at time t?

The value of k represents the rate of decay. A larger value of k indicates a faster rate of decay, while a smaller value of k indicates a slower rate of decay. It is often referred to as the decay constant.

Similar threads

  • Introductory Physics Homework Help
Replies
3
Views
902
  • Differential Equations
Replies
7
Views
1K
Replies
3
Views
446
Replies
1
Views
3K
  • Materials and Chemical Engineering
Replies
14
Views
2K
Replies
1
Views
2K
Replies
1
Views
1K
Replies
16
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • General Math
Replies
1
Views
3K
Back
Top