Only real roots (basic)



thank you all !

it's how i did:

f(x):=x^3-x^2+x+1;

solver(u):=block (
[q:length(u),m],
m:makelist(0,n,1,q),
for i:1 thru q do (if imagpart(u[i]) then m[i]:u[i] else m[i]:IROOT),
m:delete(IROOT,m),
return(m));

solver(   solve(f(x))   );



From: rcrdjf at hotmail.com
To: maxima at math.utexas.edu
Date: Sun, 8 Dec 2013 16:26:43 +0300
Subject: Only real roots (basic)




hi friends,

why this doesn't give only real roots:

f(x):=x^3-x^2+x+1;
declare(x,real);
solve(f(x));

i just want [x=(sqrt(11)/...)]

thanks.
 		 	   		  

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima