I'm doubtful whether I've set up the equations correctly just because the computations are getting ugly:

By natural increase a city, the population of which is 40,000, will double in 50 years. There is also a net addition of 400 people per year because of people moving to and from the city.

I figger to solve for the natural increase function, where $\displaystyle P=$ population and $\displaystyle t$ = years: $\displaystyle \frac{dP}{dt} = kP \Rightarrow$

$\displaystyle \displaystyle \int_{40,000}^{80,000}\frac{dP}{P} = k\int_{0}^{50}dt = 50k = \ln 2 \Rightarrow k = \frac{\ln 2}{50}$

Now taking into consideration the additional 400 people per year,

$\displaystyle \frac{dP}{dt} = \frac{\ln 2}{50}P + 400t$

When I compute this I get something ridiculously wrong.