# Differential equation modeling glucose in a patient's body

ForceBoy
Homework Statement:
"A hospital patient is fed glucose intravenously (directly to the bloodstream) at a rate of r units per minute. The body removes glucose from the bloodstream at a rate proportional to the amount Q(t) present in the bloodstream at time t. " (Finney; Weir; Giordano, 452)

A) write the differential eq.
B) Solve the diff. eq ##Q(0) = Q_0##
C) find the limit as t goes to infinity
Relevant Equations:
The chapter this problem is found in is one on separable differential equations
The rate at which glucose enters the bloodstream is ##r## units per minute so:

## \frac{dI}{dt} = r ##

The rate at which it leaves the body is:

##\frac {dE}{dt} = -k Q(t) ##

Then the rate at which the glucose in the body changes is:

A) ## Q'(t) = \frac{dI}{dt} + \frac {dE}{dt} = r - k Q(t) ##

I don't see how this is a separable differential equation. I still try to solve it.

##\frac{dQ}{dt} + k Q = r ##

## Q e^{kt} = \int r e^{kt} dt ##

## Q = \frac{r}{e^{kt}}\frac{e^{kx}}{k} ##

B) ## Q(t) = \frac{r}{k} ##

This tells me that the glucose in the bloodstream at any point in time will be a constant. I know this is wrong. It would be appreciated if someone could point me onto the right path to solve this diff. eq. Thank you.

## Answers and Replies

Staff Emeritus
Homework Helper
Gold Member
You missed the integration constant which you will need to adapt the solution to the initial condition.

I don't see how this is a separable differential equation.
What do you know about separable ODEs? The point of a separable ODE is that you should be able to write it on the form
$$y'(t) f(y(t)) = g(t).$$
This is possible in this situation.

ForceBoy
What do you know about separable ODEs? The point of a separable ODE is that you should be able to write it on the form

y′(t)f(y(t))=g(t).​

Thank you. I put my equation in the form you gave and solved just fine:

## \frac{dQ}{dt} = Q'(t)##
## r - kQ(t) = g(Q(t)) ##
________________________

##Q'(t) = g(Q(t)) ##
## \frac{Q'(t)}{g(Q(t))} =1 ##

## Q'(t) f(Q(t)) = 1##

##\frac{dQ}{dt} \frac{1}{r-kQ} = 1 ##

##\frac{dQ}{r-kQ} = dt ##

##\int\frac{dQ}{r-kQ} = \int dt ##

## \ln|r-kQ | = t +C## (Can't forget the C now, thanks)

## r-kQ = Ae^{t}##

## Q = \frac{r - A e^{t}}{k} ##

If the above is correct, then I can solve the rest of the problem.

Mentor
Thank you. I put my equation in the form you gave and solved just fine:

## \frac{dQ}{dt} = Q'(t)##
## r - kQ(t) = g(Q(t)) ##
________________________

##Q'(t) = g(Q(t)) ##
## \frac{Q'(t)}{g(Q(t))} =1 ##

## Q'(t) f(Q(t)) = 1##

##\frac{dQ}{dt} \frac{1}{r-kQ} = 1 ##

##\frac{dQ}{r-kQ} = dt ##

##\int\frac{dQ}{r-kQ} = \int dt ##
Things are OK but a bit verbose up to the line above.
For example, you can go directly from ##\frac{dQ}{dt} = r - kQ## and separate the equation to ##\frac{dQ}{r - kQ} = dt##, and skip several of the lines you wrote.
ForceBoy said:
## \ln|r-kQ | = t +C## (Can't forget the C now, thanks)
Mistake in the line above. What is your substitution when you do the integration?
ForceBoy said:
## r-kQ = Ae^{t}##

## Q = \frac{r - A e^{t}}{k} ##

If the above is correct, then I can solve the rest of the problem.

Gold Member
How about writing like this:

##\displaystyle\int_{0}^{t}dt' = \int_{Q(0)}^{Q(t)}\frac{dQ}{r-kQ} = -\frac{1}{k}\int_{Q(0)}^{Q(t)}\frac{-kdQ}{r-kQ}##

Then you already have the integration constant in terms of the initial condition ##Q(0)##.

ForceBoy
Mistake in the line above. What is your substitution when you do the integration?
Oh, I hadn't caught that! Thanks alot.

Here is the correct version: ## Q(t) = \frac{r-Ae^{-kt}}{k} ##

How about writing like this:

##\displaystyle\int_{0}^{t}dt' = \int_{Q(0)}^{Q(t)}\frac{dQ}{r-kQ} = -\frac{1}{k}\int_{Q(0)}^{Q(t)}\frac{-kdQ}{r-kQ}##

Then you already have the integration constant in terms of the initial condition ##Q(0)##.

This is a great tip. Thanks a lot this will save me
work.

## \displaystyle\frac{-1}{k}\int_{Q(0)}^{Q(t)} \frac{-kdQ}{r- kQ} = \int_{0}^{t} dt' ##

## \displaystyle\ln(r-kQ)_{Q(0)}^{Q(t)} = -kt ##

## \displaystyle\frac{r-kQ(t)}{r-kQ(0)} = e^{-kt} ##

##\displaystyle r- kQ(t) = (r-kQ(0))e^{-kt} ##

##\displaystyle Q(t) = \frac{r-(r-kQ(0))e^{-kt}}{k} ##

##\displaystyle Q(t) = \frac{r-re^{-kt}+kQ(0)e^{-kt}}{k} ##

##\displaystyle Q(t) = \frac{r-(r-kQ_{0})e^{-kt}}{k} ##

So this last equation must be the answer. Thank you all for your time

Homework Helper
Dearly Missed
The rate at which glucose enters the bloodstream is ##r## units per minute so:

## \frac{dI}{dt} = r ##

The rate at which it leaves the body is:

##\frac {dE}{dt} = -k Q(t) ##

Then the rate at which the glucose in the body changes is:

A) ## Q'(t) = \frac{dI}{dt} + \frac {dE}{dt} = r - k Q(t) ##

I don't see how this is a separable differential equation. I still try to solve it.

##\frac{dQ}{dt} + k Q = r ##

## Q e^{kt} = \int r e^{kt} dt ##

## Q = \frac{r}{e^{kt}}\frac{e^{kx}}{k} ##

B) ## Q(t) = \frac{r}{k} ##

This tells me that the glucose in the bloodstream at any point in time will be a constant. I know this is wrong. It would be appreciated if someone could point me onto the right path to solve this diff. eq. Thank you.

You can render the equation separable by changing to ##P = Q- r/k##, so that ##dP/dt +kP = 0## (because, of course, ##dP/dt = dQ/dt##).

Staff Emeritus