t = integral [(P+S)/P((r-1)P-S)] dP
now, to do partial fraction decomposition, consider
(P+S)/P((r-1)P-S) = A/P + B/((r-1)P-S)
P + S = A((r-1)P -S) + PB
if P = 0, then:
A = -1
If (r-1)P - S = 0
=> p = S/(r-1)
B = 1 + r - 1
B = r
Therefore
t = integral(-1/P + (r-1+1)/((r-1)P - S))dP
t = -ln|P| + ln|(r-1)P-S| + 1/r-1 * integral((r-1)/[(r-1)P-S])
t = -ln|P| + ln|(r-1)P-S| + ln|(r-1)P-S|/(r-1)
t = -ln|P| + (r/r-1)ln|(r-1)P-S|
substituting known constants, we get:
t = -ln|P|-1/9(ln|-0.9P - 900|)
t = -ln|P| - 1/9(ln|-0.9P -900|)
t = -ln|P| - 1/9(ln(|(-9/10)(P + 1000)|))
t = -ln(P) - 1/9ln(P + 1000)- 1/9ln(9/10)
as P >= 0, ln(P) and ln(P + 1000) doesn’t need abs value
Note that our expression for t doesn’t account for P=0 as ln(P) is undefined at P = 0.
The expression for t is also undefined at P = -1000, but that falls outside our domain P >= 0, so we don’t really need to worry about that.