Question: a random force

Using Maple for Functions of a Random Variable

 

How to make a query is made to F (t) at each iteration of the dsolve command?...

restart;
de:=m*diff(x(t),t$2)+b(t)*diff(x(t),t)+k*x(t)=F(t);                 
a random force :
nd := Statistics:-Sample(Uniform(-100, 100)):
F:=proc(t) ;   
if not type(evalf(t),'numeric') then      
'procname'(t);   
else       evalf(nd(1)[1]);   
end if;
end proc;
m:=3:b(t):=0.0:k:=1.9:v0:=5:#F(t):=nd(1)[1] another attempt;
ics := x(0) = 0, (D(x))(0) = v0;                     
S10 := dsolve({ics, de}, numeric, method = rkf45,range = 0 .. 20,known=F,' output' = Array([seq(20/200*i, i = 0 .. 200)]));

Warning, cannot evaluate the solution further right of .89769745e-3, maxfun limit exceeded (see ?dsolve,maxfun for details)

gr:=plots:-odeplot(S10, [t, x(t)],axes=boxed,color=red,linestyle=solid,legend = ["Random force "],view=[0..25,-200..100]):gr;

andomforce.mw

GRACIAS

Please Wait...