Question: How can I reduce my code?

I want to find the parameters m to the  equation x^4 -(3*m+2)*x^2 + 3*m+3 = 0 has four distinct solutions and all of them were less than 2. I tried

eq:= x^4 -(3*m+2)*x^2 + 3*m+3:

sol:=[solve(eq=0,x)]:

d:=discrim(eq,x):

solve([d>0,sol[1]<2,sol[2]<2,sol[3]<2,sol[4]<2],m):

allvalues(%);

How to reduce my code?

P.S.

1) How can I determine the biggest root of list sol?

2) How to use? for i to nops(sol) do solve(sol[i]< 2,m) end do;

 

Please Wait...