--- Justin Burket wrote:
> Question: how would I put in the quadratic function? I can get
> everything in except the -+
Hmm. You could define a function which computes both options and
returns a list containing both, but I don't know if that's what you are
after. A naive way to do this would be something like:
(%i1) quadratic(a,b,c):=solve(a*x^2+b*x+c=0,x);
2
(%o1) quadratic(a, b, c) := SOLVE(a x + b x + c = 0, x)
(%i2) quadratic(2,3,4);
SQRT(23) %I + 3 SQRT(23) %I - 3
(%o2) [x = - ---------------, x = ---------------]
4 4
Using solve here is almost certainly a bad idea, but will work for this
simple case (at least in 5.9.1). In general you would want to be a bit
more elaborate - probably using block and avoiding solve.
If you mean explicitly enter the +- operator... I'm not sure if Maxima
defines that one. Anybody know?
CY
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/