# PharmPK Discussion - Writing differential equation is Basic editor

PharmPK Discussion List Archive Index page
• On 18 Feb 2001 at 18:42:02, Barry Koplowitz (barry.koplowitz.-a-.bms.com) sent the message
`The following message was posted to: PharmPKI have a question about writing a defferential equation in thekinetic basic:usually the equation is of the formSub Deriv (Byval t as double)     DZ1 = -Z1*k12  but how do you write a simular eqation were the expression onthe right has time in it (i.e.)dz/dt = -k12*z*f(t)thanksBarry Koplowitz`
Back to the Top

• On 18 Feb 2001 at 22:15:50, Nick Holford (n.holford.-at-.auckland.ac.nz) sent the message
`The following message was posted to: PharmPKBarry,f(t) is usually the solution to another equation in the system. Theexact syntax depends on the way your de solver works. e.g. in NONMEMfor a 2 cpt model:DADT(1)=A(2)*K21-A(1)*K12-A(1)*K1ODADT(2)=A(1)*K12-A(2)*K21In this case the vector A() contains the solutions to thedifferential equations whose derivatives are stored in the vectorDADT(). You can think of A() as being equivalent to f(t).The DE solver may also allow you access to its integration variablerepresenting the current time (e.g. it may be called t). In this caseyou can directly write your own f(t).--Nick Holford, Divn Pharmacology & Clinical PharmacologyUniversity of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealandemail:n.holford.-a-.auckland.ac.nz tel:+64(9)373-7599x6730 fax:373-7556http://www.phm.auckland.ac.nz/Staff/NHolford/nholford.htm`
Back to the Top

• On 20 Feb 2001 at 12:11:36, "Dan Hirshout" (dhirshout.-a-.innaphase.com) sent the message
`The following message was posted to: PharmPKThere are two ways to do it.1. You can write the expression, f(t), directly to the differentialequation.2. You can define an another term, for example, C=f(t),     and define    dim C as double at the beginning of the program    and then in the differential equation, use C instead of f(t)Regards,Dan Hirshout`
Back to the Top

Want to post a follow-up message on this topic? If this link does not work with your browser send a follow-up message to PharmPK@boomer.org with "Writing differential equation is Basic editor" as the subject

Copyright 1995-2010 David W. A. Bourne (david@boomer.org)