| Author |
Comment/Response |
Jane Shevtsov
|
06/21/05 8:01pm
Hi,
I'm working with a system of four differential equations in Mathematica 5.1 and need one of the parameters to take on one value when one of the functions (vBounce) is at a minimum and a different value the rest of the time. I've tried various usages of If and Piecewise but always get "not a well-formed equation" error messages.
Here's the input.
varsBounce={rBounce[t], eBounce[t],lBounce[t],vBounce[t]};
gBounce=Γ τ -μ rBounce[t]-β rBounce[t] vBounce[t];
hBounce=(1-ρ) β rBounce[t] vBounce[t]+α[t]*lBounce[t]-δ eBounce[t];
jBounce=ρ β rBounce[t] vBounce[t]-α[t]*lBounce[t]-μ lBounce[t];
kBounce=p eBounce[t]-σ vBounce[t];
α[t_]:=If[{vBounce'[t]\[Equal]0&&vBounce''[t]>0},0.36,0.036]
eqnsBounce={rBounce'[t]\[Equal]gBounce,eBounce'[t]\[Equal]hBounce,lBounce'[t]\[Equal]
jBounce, vBounce'[t]\[Equal]kBounce};
initsBounce={rBounce[2000]\[Equal]24.5338,
eBounce[2000]\[Equal]0.720501, lBounce[
2000]\[Equal]0.638742, vBounce[2000]\[Equal]36.0251,vBounce'[2000]\
\[Equal]0};
Γ=1.36;μ=1.36*10^-3; τ=0.2; ρ=0.1; σ=2; δ=0.33; p=100;
β=0.0001;
solBounce2000=varsBounce2000/.NDSolve[Join[eqnsBounce,initsBounce],\
varsBounce,{t,2000, 4000}][[1]];
URL: www.worldbeyondborders.org, |
|