Symbolic expansion.
Syntax
R = expand(S)
Description
expand(S)
writes each element of a symbolic expression S
as a product of its factors. expand
is most often used only with polynomials, but also expands trigonometric, exponential, and logarithmic functions.
Examples
expand((x-2)
*(x-4))
returns
x^2-6
*x+8
expand(cos(x+y))
returns
cos(x)*cos(y)-sin(x)*sin(y)
expand(exp((a+b)^2))
returns
exp(a^2)*exp(a*b)^2*exp(b^2)
expand(log(a
*b/sqrt(c)))
returns
log(a)+log(b)-1/2*log(c)
expand([sin(2*t), cos(2*t)])
returns
[2*sin(t)*cos(t), 2*cos(t)^2-1]
See Also
collect
, factor
, horner
, simple
, simplify
, syms
[ Previous | Help Desk | Next ]