Method on @sym: x = assumeAlso (x, cond, cond2, …)
Method on @sym: [x, y] = assumeAlso ([x y], cond, …)
Method on @sym: assumeAlso (x, cond)
Method on @sym: assumeAlso ([x y], cond, …)

Add additional assumptions on a symbolic variable.

Behaviour is similar to assume; however cond is combined with any existing assumptions of x instead of replacing them.

Example:

syms x integer
x1 = x;
assumptions(x1)
  ⇒ ans =
    {
      [1,1] = x: integer
    }

x = assumeAlso(x, 'positive');
assumptions(x)
  ⇒ ans =
    {
      [1,1] = x: integer, positive
    }

As with assume, note x1 is unchanged:

assumptions(x1)
  ⇒ ans =
    {
      [1,1] = x: integer
    }

Warning: with no output argument, this tries to find and replace any x within expressions in the caller’s workspace. See ‘assume’.

See also: @sym/assume, assumptions, sym, syms.

Package: symbolic