Modeling a linear and exponential change concurrently

12 Views Asked by At

Suppose I have $M$ dollars and I buy an item that costs $M$ dollars. Instead of handing over the money all at once, I take a zero-interest loan of $M$ dollars for $T$ years. Payback is continuous and linear so that after time $t$ years I have repaid $M(t/T)$ dollars, until $t=T$. At the same time, I am investing the money I have not paid back so that it returns a continuous compound rate of return $r$. How do I write down an expression for how much money $m$ I have at time $t$? (This expression need only provide a valid answer up to time $T$.)

I have considered two possibilities:

$$m = Me^{rt} - M(t/T)$$

seems like it will give an answer that is too high because it credits me with $M$ dollars compounding the whole time.

On the other hand,

$$m = M(1 - t/T)e^{rt}$$

seems like it will give an answer that is too low, for the opposite reason.

What is the right way to approach this problem?