### Related

##### constantp-plot2d

plot2d([-2*x-3, -2*x-...

constantp(%NaN);

Calculate

##### constantp-plot2d

plot2d([-2*x-3, -2*x-...

constantp(inf);

Calculate

? constantp;

Calculate

##### constantp-plot2d

plot2d([-2*x-3, -2*x-...

constantp(NaN);

Calculate

##### constantp-declare-exp-rat-sin

constantp (7 * sin(2));

constantp (rat (17/2...

constantp (%pi * sin...

Calculate

##### constantp-plot2d

plot2d([-2*x-3, -2*x-...

constantp(%NaN);

Calculate

##### constantp-plot2d

plot2d([-2*x-3, -2*x-...

constantp(inf);

Calculate

? constantp;

Calculate

##### constantp-plot2d

plot2d([-2*x-3, -2*x-...

constantp(NaN);

Calculate

##### constantp-declare-exp-rat-sin

constantp (7 * sin(2));

constantp (rat (17/2...

constantp (%pi * sin...

Calculate

### constantp

Run Example
```(%i1)block(    ans: answer,    matchdeclare (a, constantp),    defmatch (match, a^x ,x),    solve: match( ans, x),    if (solve = false) then return (false),    a: subst(solve, a),    is (a # 144));
(%o1)                                false
(%i2) ```
Run Example
```constantp (7 * sin(2));
(%o1)                                true
(%i2)  constantp (rat (17/29));
(%o2)                                true
(%i3)  constantp (%pi * sin(%e));
(%o3)                                true
(%i4)  constantp (exp (x));
(%o4)                                false
(%i5)  declare (x, constant);
(%o5)                                done
(%i6)  constantp (exp (x));
(%o6)                                true
(%i7)  constantp (foo (x) + bar (%e) + baz (2));
(%o7)                                false
(%i8) ```
Run Example
```matchdeclare (a, lambda ([e], e#0 and freeof(x, e)), b,                              freeof(x));
(%o1)                                done
(%i2)  defmatch (linearp, a*x + b, x);
(%o2)                               linearp
(%i3)  linearp (3*z + (y + 1)*z + y^2, z);
2
(%o3)                     [b = y , a = y + 4, x = z]
(%i4)  a;
(%o4)                                y + 4
(%i5)  b;
2
(%o5)                                 y
(%i6)  x;
(%o6)                                  x
(%i7)  matchdeclare (a, lambda ([e], e#0 and freeof(x, e)), b,                              freeof(x));
(%o7)                                done
(%i8)  defmatch (linearp, a*x + b);
(%o8)                               linearp
(%i9)  linearp (3*z + (y + 1)*z + y^2);
(%o9)                                false
(%i10)  linearp (3*x + (y + 1)*x + y^2);
2
(%o10)                        [b = y , a = y + 4]
(%i11)  matchdeclare ([a, f], true);
(%o11)                               done
(%i12)  constinterval (l, h) := constantp (h - l);
(%o12)              constinterval(l, h) := constantp(h - l)
(%i13)  matchdeclare (b, constinterval (a));
(%o13)                               done
(%i14)  matchdeclare (x, atom);
(%o14)                               done
(%i15)  simp : false;
(%o15)                               false
(%i16)  defmatch (checklimits, 'integrate (f, x, a, b));
(%o16)                            checklimits
(%i17)  simp : true;
(%o17)                               true
(%i18)  'integrate (sin(t), t, %pi + x, 2*%pi + x);
x + 2 %pi
/
[
(%o18)                       I          sin(t) dt
]
/
x + %pi
(%i19)  checklimits (%);
(%o19)                               false
(%i20) ```

### Related Help

Help for Constantp