# Math Help - 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!

2. Originally Posted by waikarss
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
$C' + \frac KVC = \frac GV$

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

multiplying through by the integrating factor, we get:

$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 $Ce^{Kt/V}$, so reverse it:

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

integrate both sides:

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

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

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

where $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?

4. Originally Posted by waikarss
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 $C_0$ is the initial amount of C, that is, the value of $C(0)$.

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

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

solving for $A$, we get:

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

so yes, they are right

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

$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!