Save functions for later use?



Dan Soendergaard escribi?:
> Hi,
> 
> As an old Mathcad user I'm used to save some of my most used formulas
> as a worksheet. Is there some similar functionality in Maxima?
> Basically, when I've defined a function, is it possible to save that
> function somewhere, close maxima, open it again, and use that
> function?
> 
> I quite often use the Quadratic Formula at school and it's really a
> pain to re-type it almost every day.
> 
> Besides that, Maxima is a really great piece of work!
> 

Also note that Maxima does know how to solve the quadratic equation:

(%i1) a*x^2+b*x+c=0;
(%o1) a*x^2+b*x+c=0
(%i2) solve([%], [x]);
(%o2) [x=-(sqrt(b^2-4*a*c)+b)/(2*a),x=(sqrt(b^2-4*a*c)-b)/(2*a)]

Of course, a, b and c can be anything. For example:

(%i3) (x-3)*(x-1/2);
(%o3) (x-3)*(x-1/2)
(%i4) expand(%);
(%o4) x^2-(7*x)/2+3/2
(%i5) solve([%], [x]);
(%o5) [x=3,x=1/2]


HTH!
Ismael