# Thread: Help a kidney doctor with a differential equation!

1. ## Help a kidney doctor with a differential equation!

Hi, I am a kidney doctor and do research into how the body excretes various substances. I have developed a model in Matlab/Simulink that uses ordinary differential equations; I've had to teach myself some diff eq to do this part of my research, which has been fun but frustrating. Can anybody help with this diff eq:

dC/dt + KC/V = G/V

where K, V, and G are all constants and C of course changes over time?
This is in the form of a linear differential equation. I am beginning to understand the basic approach of using an integrating factor (e ^ kt/V in this case I believe), but am having trouble getting a solution that is expressed in terms of the variables above (even though they are all just constants and could be replaced by "N," for my purposes it's actually important to retain the "V" and "G" as constant variables, and examine the solution as such.

Any help would be greatly appreciated!

Hi, I am a kidney doctor and do research into how the body excretes various substances. I have developed a model in Matlab/Simulink that uses ordinary differential equations; I've had to teach myself some diff eq to do this part of my research, which has been fun but frustrating. Can anybody help with this diff eq:

dC/dt + KC/V = G/V

where K, V, and G are all constants and C of course changes over time?
This is in the form of a linear differential equation. I am beginning to understand the basic approach of using an integrating factor (e ^ kt/V in this case I believe), but am having trouble getting a solution that is expressed in terms of the variables above (even though they are all just constants and could be replaced by "N," for my purposes it's actually important to retain the "V" and "G" as constant variables, and examine the solution as such.

Any help would be greatly appreciated!
So we want to solve
$\displaystyle C' + \frac KVC = \frac GV$

the integrating factor is, of course, $\displaystyle \mbox{exp} \left( \int \frac KV~dt \right) = e^{Kt/V}$, as you said.

multiplying through by the integrating factor, we get:

$\displaystyle e^{Kt/V}C' + \frac KVe^{Kt/V}C = \frac GVe^{Kt/V}$

the left hand side is the result of using the product rule to differentiate $\displaystyle Ce^{Kt/V}$, so reverse it:

$\displaystyle \Rightarrow (Ce^{Kt/V})' = \frac GVe^{Kt/V}$

integrate both sides:

$\displaystyle \Rightarrow Ce^{Kt/V} = \frac GKe^{Kt/V} + A$

divide through by $\displaystyle e^{Kt/V}$:

$\displaystyle \Rightarrow C(t) = \frac GK + Ae^{-Kt/V}$

where $\displaystyle A$, of course, is some arbitrary constant

3. ## thanks!

Now the question I have is about the constant. What is the constant "A"? To actually solve an initial value problem (say, C0 = 1)? One of the research papers has the constant equal to "C0 - G/K"
Is that true?

Now the question I have is about the constant. What is the constant "A"? To actually solve an initial value problem (say, C0 = 1)? One of the research papers has the constant equal to "C0 - G/K"
Is that true?
well, let's see if they're right. i assume $\displaystyle C_0$ is the initial amount of C, that is, the value of $\displaystyle C(0)$.

we have $\displaystyle C(t) = \frac GK + Ae^{-Kt/V}$

now, $\displaystyle C_0 = C(0) = 1 = \frac GK + Ae^0 = \frac GK + A$

solving for $\displaystyle A$, we get:

$\displaystyle A = 1 - \frac GK = C_0 - \frac GK$

so yes, they are right

we can now replace $\displaystyle A$ in our equation for $\displaystyle C$. we have, finally,

$\displaystyle C(t) = \frac GK + \left(C_0 - \frac GK \right)e^{-Kt/V}$

and you can simplify that to make it look nicer

5. ## thanks!

Thank you so much!