Back to Symbolic Mathematics

assume

Set assumption on symbolic variable

Syntax

assume(x, prop)
assume x prop

Description

Sets an assumption on a symbolic variable. Assumptions affect simplification and solving. Common assumptions: positive, negative, real, integer, rational

Parameters

NameDescription
xSymbolic variable
propProperty to assume (e.g., 'positive', 'real', 'integer')

Returns

Nothing (modifies variable in place)

Examples

Try It
>> syms x; assume(x, 'positive')
% x is now assumed positive
Try It
>> assume x real
% x is now assumed real

See Also