Question: how to choose the maximum interval from a set of intervals

Hello,

I would like to choose the maximum interval which is here B3 not the maximum value.I used max which gave me the maximum value. Any ideas?

This is the output:

B1:=[2., 36.718220544331125]
B2:=[2., 35.08378362904457]
B3:=[2., 51.78712780854305]
datamax:= 51.78712780854305

how to get datamax:= [2., 51.78712780854305] instead of datamax:= 51.78712780854305?

This is my Maple code:

> restart;
> n := 3;
> for i to n do A[i] := RandomTools:-Generate(distribution(Uniform(.5, .75))) end do;
> eq := diff(X(t), t) = -S*X(t);
> ic[1] := X(0) = 150;
> for i to n do s[i] := dsolve({ic[1], subs(S = A[i], eq)}, X(t), range = 0 .. 10, numeric) end do;
> for i to n do B[i] := eval([t, X(t)], s[i](2)) end do;

datamax := max([seq(B[i], i = 1 .. n)]);

 

Thank you

Please Wait...