Re: Problem with a system of equations describing an exposure to lead...

*To*: mathgroup at smc.vnet.net*Subject*: [mg50391] Re: [mg50375] Problem with a system of equations describing an exposure to lead...*From*: DrBob <drbob at bigfoot.com>*Date*: Wed, 1 Sep 2004 01:49:38 -0400 (EDT)*References*: <200408311028.GAA18673@smc.vnet.net>*Reply-to*: drbob at bigfoot.com*Sender*: owner-wri-mathgroup at wolfram.com

First of all, it's easier to check the answer if all quantities represent present levels (including cumulative urine). Secondly, you have a sign wrong on the right-hand-side of the equation for bl[t] (I think). Third, using small l in a variable name is a bold and (to me) annoying choice. I'd never do it unless it was a name like "bell" or "line" or "blood" in which it's easy to see what's meant. I wasted a few minutes typing in b1 in the RSolve statement where I needed bl, and getting puzzling errors. Here's a table that shows no loss in total lead: eqns = {urine[t] == urine[t - 1] + a blood[t - 1], bone[t] == b blood[t - 1] + (1 - c) bone[t - 1], blood[t] == (1 - a - b) blood[t - 1] + c bone[t - 1], urine[0] == 0, bone[0] == 0, blood[0] == lead}; soln = First@Block[{lead = 1, a = 1/4, b = 1/3, c = 1/10}, RSolve[eqns, {urine[t], bone[t], blood[t]}, t] ]; k = 10; TableForm[Table[Flatten[{#, Total@#}] &[Through[{urine, blood, bone}@t] /. soln] // N, {t, 0, k}], TableHeadings -> {Range[0, k], {urine, blood, bone, lead}}] By the way, you don't need RSolve for this unless you want a closed-form solution: Clear[urine, bone, blood] urine[0] = 0; bone[0] = 0; blood[0] = lead; urine[t_] := urine[t] = a blood[-1 + t] + urine[-1 + t] bone[t_] := bone[t] = b blood[-1 + t] + (1 - c) bone[-1 + t] blood[t_] := blood[t] = (1 - a - b) blood[-1 + t] + c bone[-1 + t] k = 10; TableForm[Table[Flatten[{#, Total@#}] &[Through[{urine, blood, bone}@ t] /. soln] // N, {t, 0, k}], TableHeadings -> {Range[0, k], {urine, blood, bone, lead}}] Bobby On Tue, 31 Aug 2004 06:28:57 -0400 (EDT), Richard Palmer <dickp at bellatlantic.net> wrote: > I have a system of equations > > Eqns={u[t]==a bl[t-1], > bo[t]==b bl[t-1]-c bo[t-1], > bl[t]==(1-a-b) bl[t-1]-c bo[t-1], > u[0]==0, > bo[0]==0, > bl[0]==pb} > > They are supposed to represent a system of what happens when a person > suffers a one-time exposure to lead (pb). At any given time, the person > will pass some portion of the lead that is in the blood and soft tissue > (bl[t]) through the urine (u[t]) while some portion moves to the bone > (bo[t]) and a small portion moves from the bone back into the blood. This > is easily solved with RSolve. However, I am concerned the solution may not > be correct: I believe that for any time t, the amount of lead in the bone > and blood less all lead passed to date through the urine should equal the > level of exposure (pb). Taking the Rsolve solutions and making a table of > u[t], bl[t], and bo[t] for times 0-5 will show the problem (substitute > random fractions for a,b, and c and take pb to be 1). Is the mistake in the > solution or in my formulation of the model? I am using Mathematica 5. > > Thanks in advance. -- DrBob at bigfoot.com www.eclecticdreams.net

**Re: Optimization Problem - Need Stochastic Method**

**Re: Problem with a system of equations describing an exposure to lead...**

**Re: Optimization Problem - Need Stochastic Method**

**Re: Problem with a system of equations describing an exposure to lead...**