Computer Algebra Commands 4-21
Result: 1/3
See also: DEFINE, STORE
DEGREE
Type: Function
Description: Returns the degree of a polynomial expression. Returns 0 for a constant expression, but –1 if
the expression is zero.
Access: Catalog, …µ
Input: Level 1/Argument 1: A polynomial expression or equation; all powers must be integers or real
numbers with no fractional part.
Output: Level 1/Item 1: An integer representing the highest power in the polynomial. If the input
contains powers of more than one variable, including the current variable, returns the highest
power of the current variable. If the input contains powers of more than one variable, not
including the current variable, returns the highest power of the first symbolic variable (one
that is not stored in the current directory path). If the input contains powers of more than one
variable, and all the variables are stored in the current directory path, returns the highest
power of any of the variables.
Flags: If exact mode is set (flag –105 clear), the result is returned as an integer, otherwise it is
returned as a real number.
Example 1: Find the degree of the polynomial represented by:
x
2
-17=x
3
+2x
Command:
DEGREE(x^2-17=x^3+2*X)
Result: 3
DERIV
Type: Function
Description: Returns the partial derivatives of a function, with respect to the specified variables.
Access: Calculus, P CALCULUS or !ÖDERIV. & INTEG.
Input: Level 2/Argument 1: A function or a list of functions.
Level 1/Argument 2: A variable, or a vector of variables. The variable or variables must not
exist as variables stored in the current directory nor directories above it.
Output: The derivative, or a vector of the derivatives, of the function or functions.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example: Find the gradient of the following function of the spatial variables x, y, and z:
2x
2
y 3y
2
zzx++
Command:
DERIV(2*X^2*Y+3*Y^2*Z+Z*X, [X,Y,Z])
EXPAND(ANS(1))
Result: [4*Y*X+Z,2*X^2+6*Z*Y,X+3*Y^2]
See also: DERVX, dn, ∂, POTENTIAL
DERVX
Type: Function
Description: Returns the derivative of a function with respect to the current variable. This variable must
not exist as a variable stored in the current directory path.
Access: Calculus, !Ö or P CALCULUS or !ÖDERIV. & INTEG.