Finding initial values with the help of least square method $D: \begin{bmatrix}1&4.19\\2&3.40\\3&2.80\\4&2.30\\5&1.99\\6&1.70\\7&1.51\\8&1.34\\9&1.21\\10&1.09\end{bmatrix}$
In this table of data the first column is representing time (in minutes), and the second column is the mass of some element. 


*

*The element consists of two types of isotopes that decay rapidly.

*The first isotope has a half-life of 3 minutes, and the second of 8 minutes.
How can I figure out the initial mass of the two isotopes using least square method on this table of data?
I will use Wolfram Mathematica for the calculations

The equation is 
$$M(t)=Ae^{-\frac{\ln{2}}{3}t}+Be^{-\frac{\ln{2}}{8}t}$$
The least square method needs to minimize the following:
$$\sum (Ae^{-\frac{\ln{2}}{3}t_i}+Be^{-\frac{\ln{2}}{8}t_i}-M_i)^2$$
So we find the derivative of this function with respect to $A$ and $B$ and set them to $0$:
$$2 \sum (Ae^{-\frac{\ln{2}}{3}t_i}+Be^{-\frac{\ln{2}}{8}t_i}-M_i)e^{-\frac{\ln{2}}{3}t_i}=0\\
2 \sum (Ae^{-\frac{\ln{2}}{3}t_i}+Be^{-\frac{\ln{2}}{8}t_i}-M_i)e^{-\frac{\ln{2}}{8}t_i}=0$$
This gives us a $2\times 2$ system of linear equations with variables $A$ and $B$. Solve them by Cramer's rule:
$$A=\frac{\sum M_i e^{-\frac{\ln{2}}{3}t_i}\sum(e^{-\frac{\ln{2}}{8}t_i})^2-\sum M_i e^{-\frac{\ln{2}}{8}t_i}\sum e^{-\frac{\ln{2}}{3}t_i-\frac{\ln{2}}{8}t_i}}{\sum(e^{-\frac{\ln{2}}{3}t_i})^2\sum(e^{-\frac{\ln{2}}{8}t_i})^2-(\sum e^{-\frac{\ln{2}}{3}t_i-\frac{\ln{2}}{8}t_i})^2}$$
$$B=\frac{\sum M_i e^{-\frac{\ln{2}}{8}t_i}\sum(e^{-\frac{\ln{2}}{3}t_i})^2-\sum M_i e^{-\frac{\ln{2}}{3}t_i}\sum e^{-\frac{\ln{2}}{3}t_i-\frac{\ln{2}}{8}t_i}}{\sum(e^{-\frac{\ln{2}}{3}t_i})^2\sum(e^{-\frac{\ln{2}}{8}t_i})^2-(\sum e^{-\frac{\ln{2}}{3}t_i-\frac{\ln{2}}{8}t_i})^2}$$
