Question: "avoid" option in fsolve

The attached Maple10 worksheet solves a system of differential equations. A plot of the solutions y1(t) (red curve) and y2(t) (green curve) appears below. Download 2353_fsolve-avoid.mws
View file details As a check, I want to use fsolve and the "avoid" option to find both times at which y1 has the same value as when y1=y2, but I'm having trouble. I would appreciate any advice on how I can get the "avoid" option to work for me. fsolve finds the earlier time easily enough (t=.9036852930e-1), but when I use the "avoid" option (highlighted statement below) to find the later time (t=.5225499740), I get the error "Error, (in fsolve) avoid = {.9036852930e-1} is an invalid option." The code is appended below. Thanks. Glenn ======== > restart; > with(plots): > sys:= Diff(y1(t),t)=-3*y1(t) + 2*y2(t), Diff(y2(t),t)=y1(t)-3*y2(t); > ic := y1(0)=1, y2(0)=5; d d sys := -- y1(t) = -3 y1(t) + 2 y2(t), -- y2(t) = y1(t) - 3 y2(t) dt dt ic := y1(0) = 1, y2(0) = 5 > odesol:=dsolve({sys,ic},{y1(t),y2(t)},type=numeric,output=listprocedure); odesol := [t = (proc(t) ... end proc), y1(t) = (proc(t) ... end proc), y2(t) = (proc(t) ... end proc)] > Y1:=eval(y1(t),odesol); Y2:=eval(y2(t),odesol); Y1 := proc(t) ... end proc Y2 := proc(t) ... end proc > Teq:=fsolve('Y1'(t)='Y2'(t),t); Teq := 0.5225499740 > Yeq:=Y1(Teq); Y2(Teq); Yeq := 1.45974175440983366 1.45974175447049736 > T1:=fsolve('Y1'(t)=Yeq); T2:=fsolve('Y2'(t)=Yeq); T1 := 0.09036852930 T2 := 0.5225499740 > fsolve('Y1'(t)=Yeq, t, avoid={T1}); fsolve('Y1'(t)=Yeq, t=T2); Error, (in fsolve) avoid = {.9036852930e-1} is an invalid option 0.5225499740 > Y1(%); 1.45974175440983366 > plot({Y1(t),Y2(t)},t=0..3);

Please Wait...