Symbolic Math Toolbox
 Go to function:
  Search    Help Desk 
simple See Also

Search for a symbolic expression's simplest form.

Syntax

Description

simple(S) tries several different algebraic simplifications of the symbolic expression S, displays any that shorten the length of S's representation, and returns the shortest. S is a sym. If S is a matrix, the result represents the shortest representation of the entire matrix, which is not necessarily the shortest representation of each individual element. If no return output is given, simple(S) displays all possible representations and returns the shortest.

[r,how] = simple(S) does not display intermediate simplifications, but returns the shortest found, as well as a string describing the particular simplification. r is a sym. how is a string.

Examples

Expression

Simplification

Simplification Method

cos(x)^2+sin(x)^2

1

simplify

2*cos(x)^2-sin(x)^2

3*cos(x)^2-1

simplify

cos(x)^2-sin(x)^2

cos(2*x)

combine(trig)

cos(x)+
(-sin(x)^2)^(1/2)

cos(x)+i*sin(x)

radsimp

cos(x)+i*sin(x)

exp(i*x)

convert(exp)

(x+1)*x*(x-1)

x^3-x

collect(x)

x^3+3*x^2+3*x+1

(x+1)^3

factor

cos(3*acos(x))

4*x^3-3*x

expand

See Also

collect, expand, factor, horner, simplify



[ Previous | Help Desk | Next ]