Equation for exponential growth/decay:
y = Ce^(kt)
Where y is the amount leftover and t is the time elapsed.
Notice if you plug in time (4000 years) right away, you get
y = Ce^(4000k), and you can't solve for y (the amount)--there's too many unknowns (C and k).
So first you have to find C and k in order to find y.
Use what you know.
At time t=0 years, you still have the whole sample of 100 mg. Therefore (0,100) is a solution to the equation. Plug these values in.
100 = Ce^(0*k) so 100 = Ce^(0)
Anything to the zero power is just one,
so 100 = C*1 or C = 100
Now you have to find k. Think of what else we know about half life. At time 1590 years, we'll have half the sample, or 50 mg. Therefore (1590, 50) is a solution to the equation. Plug it in.
y = Ce^(kt)
we know C=100, t=1590, and y=50, so we can solve for k.
50 = 100*e^(1590k)
1/2 = e^(1590k)
take the natural log of both sides to bring down the exponent
ln (1/2) = ln [ e^(1590k)]
ln (1/2) = 1590k
therefore k = ln(1/2) / 1590
You now have your final equation
y = Ce^(kt) or y = 100e^[(ln(1/2) / 1590)t]
Now you can plug in any value for time and find the amount left over:
y = 100e^[(ln(1/2) / 1590)*4000]
Plugging this into a calcuator returns the result 17.5 grams.