# Radioactive decay

- toc: false
- branch: master
- badges: false
- comments: false
- categories: [mathematics, numerical recipes]
- hide: true

----
Questions:
- How can I describe radioactive decay using a first-order ODE? 
- What are <mark>initial conditions</mark> and why are  they important?
----

----
Objectives:
- Map between physical notation for a particular problem and the more general notation for all differential equations
- Solve a linear, first order, separable ODE using integration
- Understand the physical importance of initial conditions 
----



### Radioactive decay can be modelled a linear, first-order ODE

As our first example of an ODE we will model radioactive decay using a differential equation.

We know that the decay rate is proportional to the number of atoms present.  Mathematically, this relationship can be expressed as:

\begin{equation}
\frac{d N}{d t} = -\lambda N
\end{equation}

Note that we could choose to use different variables, for example:

\begin{equation}
\frac{d y}{d x} = cy
\end{equation}

However we try to use variables connected to the context of the problem. For example $N$ for the Number of atoms.


For example,  if we know that 10% of atoms will decay per second we could write:

\begin{equation}
\frac{d N}{d t} = -0.1 N
\end{equation}

where $N$ is the number of atoms and $t$ is time measured in seconds.

This equation is linear and first-order.

| physical notation | generic notation |
|-----|-----|
|number of  atoms $N$ | dependent  variable $y$|
| time $t$ | independent variable  $x$|
| decay rate $\frac{dN}{dt}$ | differential $\frac{dy}{dx}$|
| constant of proportionality $\lambda=0.1 $ | parameter $c$ |

### The equation for radioactive decay is separable and has an analytic solution

The radioactive decay equation is <mark>separable</mark>. For example,

\begin{equation}
\frac{d N}{d t} = -\lambda N
\end{equation}

Can be seperated as

\begin{equation}
\frac{dN}{N} = -\lambda dt.
\end{equation}

We can then integrate each side:

\begin{equation}
\ln N = -\lambda t + const.
\end{equation}

and solve for N:

\begin{equation}
N = e^{-\lambda t}e^{\textrm{const.}} 
\end{equation}


> Note: Remember that $\int \frac{1}{x} dx = \ln x + \textrm{const.}$

### To model a physical system an initial value has to be provided

At the beginning (when $t=0$):

\begin{equation}
N = e^{-\lambda t}e^{\textrm{const.}} = e^{0}e^{\textrm{const.}} = e^{\textrm{const.}}
\end{equation}

So we can identify $e^{\textrm{const.}}$ as the amount of radioactive material that was present in the beginning. We denote this starting amount as $N_0$.

Substituting this back into Equation 4, the final solution can be more meaningfully written as:

\begin{equation}
N = N_0 e^{-\lambda t}
\end{equation}

We now have  not  just one solution, but a whole class  of solutions that are dependent on the initial amount of radioactive material $N_0$. 

Remember that not all mathematical solutions make physical sense. <mark>To model a physical system, this initial value (also known as initial condition) has to be provided alongside the constant of proportionality $\lambda$.</mark>



### ODEs can have initial values or boundary values

ODEs have either initial values or boundary values. For example, using Newton's second laws we could calculate the distance $x$ an object travels under the influence of gravity over time $t$

\begin{equation}
\frac{\mathrm{d}^2x}{\mathrm{d}t^2} = -g
\end{equation}

An initial value problem would be where we know the starting position and velocity. A boundary value problem would be where we specify the position of the ball at times $t=t_0$ and $t=t_1$. 

In this course we will only study ODEs with initial values. ODEs with boundary values are more difficult to solve, but you can related materials listed under `External resources`.


### The number of  initial conditions depends on the order of  the differential equation

Our radioactive decay example is a first-order ODE and so we only had to provide a single initial condition. For second-order ODEs (such as acceleration under gravity) we need to provide two initial/boundary conditions, for third-order ODEs we would need to provide three, and so on.


-----
Keypoints:
- Radioactive decay can be modelled a linear, first-order ODE
- The equation for radioactive decay is separable and has an analytic solution
- To model a physical system an initial value has to be provided
- The number of  initial conditions depends on the order of  the differential equation
-----

---

Do [the quick-test](https://nu-cem.github.io/CompPhys/2021/08/02/Radioactive-Decay-Qs.html).

Back to [Modelling with Ordinary Differential Equations](https://nu-cem.github.io/CompPhys/2021/08/02/ODEs.html).

---

b752a404a3887f590720a6ec1acf49fb178f2598
ipynb
Jupyter Notebook
_notebooks/2021-08-02-Radioactive-Decay.ipynb
charlo66609/CompPhys
a28ad04f44e314adf238d4ea9dc8d73af4bce2ce
CC-BY-4.0
_notebooks/2021-08-02-Radioactive-Decay.ipynb
charlo66609/CompPhys
a28ad04f44e314adf238d4ea9dc8d73af4bce2ce
CC-BY-4.0
2021-10-06T08:11:43.000Z
2021-11-24T13:46:08.000Z
_notebooks/2021-08-02-Radioactive-Decay.ipynb
charlo66609/CompPhys
a28ad04f44e314adf238d4ea9dc8d73af4bce2ce
CC-BY-4.0
2021-11-03T10:11:28.000Z
2021-11-03T10:11:28.000Z
Qwen/Qwen-72B
1. YES
2. YES