# differential equations with initial condition

I am trying to understand a step in the answer to a differential equation which has initial condition: $i_0 = i(t=0)$

$$\frac{di} i + \frac{di}{1-i} = \beta\langle k\rangle \, dt$$

integrate both sides to obtain

$$\ln i - \ln(1-i) + C = \beta\langle k \rangle t$$

Using the initial condition of $i_0 = i(t=0)$, we get:

$$i = \frac{i_0 e^{\beta \langle k \rangle t}}{1-i_0 + i_0 e^{\beta \langle k \rangle t}}$$

That is the correct answer. However, I am having difficulty moving from line 2 ie $$\ln i - \ln(1-i) + C = \beta\langle k \rangle t$$

Firstly, I am trying to justify the value of C using the initial condition. If i substitute into the second line, I get:

$$\ln \left\lvert\frac{i}{1-i}\right\rvert + C = \beta \langle k \rangle(0)$$ so, $$\ln\left\lvert\frac{i}{1-i}\right\rvert + C = 0$$ $$\ln\left\lvert\frac{i}{1-i}\right\rvert + C = 0$$ I am not even sure if I am on the right track. I would appreciate some suggestions on how to proceed.

• You are on the right track (although it should be $i_0$ instead of $i$ in the last equation). Hence, $C = -\ln\tfrac{i_0}{1-i_0}$. Putting this into the equation that you have for $i$ gives $\ln\tfrac i{1-i} = \beta t+\ln\tfrac{i_0}{1-i_0}$. Now, use the exponential function on both sides and go on with Donald's answer. Sep 10 '18 at 23:55

You have $$\ln\lvert\frac{i_0}{1-i_0}\rvert + C = 0$$

Solve for $C$ and substitute in

$$\ln i - \ln(1-i) + C = \beta\langle k \rangle t$$ to get $$\ln i - \ln(1-i) - \ln\lvert\frac{i_0}{1-i_0}\rvert = \beta\langle k \rangle t$$

Combine the logarithms and solve for $i$ to get the final answer.

• When I combine the logarithms and apply e to both sides I get $$\frac{i}{1-i}\times \frac{i_{0}}{1-i{0}} = e^{\beta \langle k \rangle t}$$ From there I get: $$\frac{i}{1-i} = \frac{1-i{0}}{i_{0}} e^{\beta \langle k \rangle t}$$ I see where @DonaldSplutterwit has something a bit different. He has: $$\frac{i}{1-i} = \frac{i_{0}}{1-i{0}} e^{\beta \langle k \rangle t}$$. Why is that.
– niz
Sep 11 '18 at 1:04
• you should get $\frac{i}{1-i}\times \frac{1-i_{0}}{i{0}} = e^{\beta \langle k \rangle t}$ Sep 11 '18 at 1:10
• thank you, i see that. silly oversight. I appreciate you patience.
– niz
Sep 11 '18 at 1:19

\begin{eqnarray*} \frac{i}{1-i}= \frac{i_0}{1-i_0} e^{\beta(k)t} \end{eqnarray*} Now multiply both sides by$(1-i)(1-i_0)$ and make $i$ the subject of the formula.