Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Op Calculator

Op

Function: op (<expr>) Returns the main operator of the expression <expr>. op (<expr>) is equivalent to part (<expr>, 0).

f(x):=a*cos[((2*pi*x)/op)+e*sin((2*pi*x)/op)]-a*e;
declare(a,constant);
declare(e,constant);
declare(op,constant);
diff(f(x));

op returns a string if the main operator is a built-in or user-defined prefix, binary or n-ary infix, postfix, matchfix, or nofix operator. Otherwise, if <expr> is a subscripted function expression, op returns the subscripted function; in this case the return value is not an atom. Otherwise, <expr> is an array function or ordinary function expression, and op returns a symbol.

op observes the value of the global flag inflag.

op evaluates it argument.

See also args.

Examples:

          (%i1) stringdisp: true$
          (%i2) op (a * b * c);
          (%o2)                          "*"
          (%i3) op (a * b + c);
          (%o3)                          "+"
          (%i4) op (sin (a + b));
          (%o4)                          sin
          (%i5) op (a!);
          (%o5)                          "!"
          (%i6) op (-a);
          (%o6)                          "-"
          (%i7) op ([a, b, c]);
          (%o7)                          "["
          (%i8) op ((if a > b then c else d));
          (%o8)                         "if"
          (%i9) op (foo (a));
          (%o9)                          foo
          (%i10) prefix (foo);
          (%o10)                        "foo"
          (%i11) op (foo a);
          (%o11)                        "foo"
          (%i12) op (F [x, y] (a, b, c));
          (%o12)                        F
                                         x, y
          (%i13) op (G [u, v, w]);
          (%o13)                          G

There are also some inexact matches for op. Try ?? op to see them.

(%o1)                                true
(%i2) 

Op Example

Related Examples

op-sin

op(sin(x+2));

Calculate

op-sin

op(sin(x+2));

Calculate

op-part-sqrt

x:sqrt(1+cbrt(x+sqrt(...

part(x,0);

part(x,1);

Calculate

op-part

u:(6*x+7)/(9*x+2);

part(u,1);

op(part(u,1));

Calculate

op-part-sum

s: sum(a[i]*sum(b[i,j...

part(s,0);

part(s,1);

Calculate

op

op(a+b);

op(a*b);

op(a^b);

Calculate

op-part-sum

s: sum(a[i],i,0,n);

part(s,0);

part(s,1);

Calculate

op

op(foo(p,q));

foo;

op(foo( p, q ) := p -...

Calculate

op

op(a+b);

op(a*b);

op(a^b);

Calculate

op-sin

a : '(1-sin(%pi/2));

a;

op (sin(p/2));

Calculate