[R] Differential Equations
Ravi Varadhan
rvaradhan at jhmi.edu
Mon Mar 27 19:21:29 CEST 2006
Dominik,
Adding (1) and (2) yields,
A(t) + B(t) = constant = A(0) + B(0) = c
So, plug in B = c - A in (1) and solve for A. This should be an easy
solution.
Hope this is helpful,
Ravi.
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-
> bounces at stat.math.ethz.ch] On Behalf Of Peter Dalgaard
> Sent: Monday, March 27, 2006 11:37 AM
> To: Dominik Heinzmann
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] Differential Equations
>
> Dominik Heinzmann <dominik.heinzmann at math.unizh.ch> writes:
>
> > Dear R-community
> >
> > My ODE problems looks as follows:
> > (1) dA/dt = u*A - v*B
> > (2) dB/dt = v*B - u*A
> >
> > where u is a constant, and v=k*t (k=constant, t=time)
> >
> > Does anybody knows a good function/procedure of solving? Should one
> > involve the equation (3) dv/dt = k?
> > Thanks for your support.
>
> You probably need to look into the odesolve package. The v*B terms
> make it nonlinear, so I wouldn't expect an analytic solution.
>
> --
> O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph: (+45)
> 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45)
> 35327907
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-
> guide.html
More information about the R-help
mailing list