[Math] Compounded Interest Differential Equation

ordinary differential equations

You borrow $8000 to buy a car. The lender charges an annual rate of 10% compounded continuously. You make payments of k dollars per year continuously.

A) write a differential equation describing the amount you owe on the loan. Be sure to specify your variables and which values they represent.

B) find the solution for this differential equation. Don't forget your initial conditions, and make sure you justify your treatment of the absolute value that you will run into.

C) Determine the amount k so that the loan is paid off in three years. Give your answer as an exact number.

I have been trying to figure this out for awhile now and am getting nowhere. I think we must use $e^{rt}$ possibly the differential equation will look something like
$$(1-8000/k)e^{0.1t}$$

Any help would be appreciated

Best Answer

Let $D$ be the amount of debt you have. The initial conditions state that $D(0)=8000$

$\frac{dD}{dt}=0.1D-k$

Separating variables and integrating:

$\int\frac{dD}{0.1D-k}=\int dt$

$10\ln|D-10k|=t+C$

If $D>10k$, then it is not possible to repay the loan, so let's ignore this.

$e^{10\ln(10k-D)}=e^{t+C}$

$10k-D=Ae^\frac{t}{10}$, where $A=e^\frac{C}{10}$ is a positive constant.

We have: $D=10k-Ae^\frac{t}{10}$.

Using the initial conditions, $D=10k+(8000-10k)e^\frac{t}{10}$

Finally, the last part wants $D(3)=0$, which should be easy to solve.