The "clear" command  The "factor" command  The "gcd" command  The "system" command  Minima Commands Summary

function

Synonyms

func, fun.

Description

The purpose of the "function" command is to define a function with one or several variables.

Examples

minima: function "f; x; 2*x - 3*x^2"
f(x)=-3*x^2+2*x

minima: f(1/2)
1
–
4

minima: f((a+b)/3)
-a^2 - 2·a·b - b^2 + 2·a + 2·b
––––––––––––––––––––––––––––––
               3

minima: function "g;x;y; x^2 - x*y"
g(x,y)=x^2-x*y

minima: g(-6, t)
6·t + 36

minima: g(a, b) 
a^2 - a·b

minima: function "d;a;h; (f(a+h)-f(a))/h"
d(a,h)=(-6*a*h-3*h^2+2*h)/(h)

minima: d(2, 1/100)
-1003
–––––
 100

minima: n;x;f(f(f(x)))
n(x)=-2187*x^8+5832*x^7-6804*x^6+4536*x^5-1890*x^4+504*x^3-84*x^2+8*x

minima: n(x)
-2187·x^8 + 5832·x^7 - 6804·x^6 + 4536·x^5 - 1890·x^4 + 504·x^3 - 84·x^2 + 8·x

minima: 

Notes

See also

See commands "define" and "clear".

The "clear" command  The "factor" command  The "gcd" command  The "system" command  Minima Commands Summary