I want to calculate the lifetime of a battery operated device. Without self discharge of the battery, it is easy to calculate the lifetime, it's just the battery capacity \$Q\$ (given in mAh) divided by the average current \$I\$ (given in mA).
In my case I have for example 300 mAh and average current of 3 uA. I get a lifetime of 100,000 h or 11.41 years. The self discharge of the battery is given as % per year, e.g. 5% per year. The battery capacity is then:
$$Q = Q_0 * D^T$$
Where:
\$Q_0\$ = capacity at the beginning
\$D\$ = the discharge rate (in my example 0.95)
\$T\$ = the time expressed in years
The lifetime in hours is:
$$t = \dfrac{Q}{I}$$
I replace \$Q\$ by the above equation:
$$t = \dfrac{Q_0 * D^{\genfrac (){1pt}{1}{t}{8760}}}{I}$$
My first question: Is my equation for \$t\$ OK or is there a failure?
My second question: If the equation is OK, how to solve it to get \$t\$?
I asked that question on MathOverflow as well.