if city A's population is 5000 with a yearly growth rate of 4% and city B has a population of 8000 with a yearly growth rate of 2% when will city A surpass city B?
So equation goes like
sub x with 1,2,3,etc
keep going till a passes
I ain't taking away yo education XD Figure it put urself took me long enough to find out
I'm doing Java code and I need the answer to know if my code is working and I don't know the answer so I don't know if my code is giving me the right answer.
We want to solve this
5000 (1.04)^t = 8000 (1.02)^t rearrange as
(1.04)^t / (1/02)^t = 8000/ 5000
(1.04 / 1/02)^t = 8/5
(52/51)^t = 8/5 take the log of both sides
log (52/51)^t = log (8/5) and we can write
t * log (52/51) = log (8/5) divide both sides by log (52/51)
t = log (8/5) / log (52/51) = after ≈ 24.2 years