expand - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : Expanding : expand

expand

expand an expression

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

expand(expr, expr1, expr2, ..., exprn)

Parameters

expr

-

any algebraic expression

expr[1], expr[2], ..., expr[n]

-

(optional) expressions

Description

• 

The expand command distributes products over sums. This is done for all polynomials.  For quotients of polynomials, only sums in the numerator are expanded; products and powers are left alone. See the normal command for dealing with quotients of polynomials.

• 

The expand command also expands most mathematical functions, including AngerJ, BesselI, BesselJ, BesselK, BesselY, Beta, ChebyshevT, ChebyshevU, CylinderD, CylinderU, CylinderV, Dirac, Ei, GAMMA, GegenbauerC, HankelH1, HankelH2, HermiteH, JacobiAM, JacobiCD, JacobiCN, JacobiCS, JacobiDC, JacobiDN, JacobiDS, JacobiNC, JacobiND, JacobiNS, JacobiP, JacobiSC, JacobiSD, JacobiSN, JacobiTheta1, JacobiTheta2, JacobiTheta3, JacobiTheta4, JacobiZeta, KelvinBei, KelvinBer, KelvinHei, KelvinHer, KelvinKei, KelvinKer, LaguerreL, LegendreP, LegendreQ, LerchPhi, Psi, StruveH, StruveL, WeberE, WeierstrassP, WeierstrassPPrime, WeierstrassSigma, WeierstrassZeta, Zeta, abs, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, bernoulli, binomial, cos, cosh, cot, coth, csc, csch, csgn, dilog, erf, erfc, euler, exp, factorial, ln, pochhammer, polylog, sec, sech, signum, sin, sinh, tan, and tanh.

• 

The optional arguments expr1, expr2, ..., exprn are used to prevent particular sub-expressions in expr from being expanded. To prevent all expressions from being expanded, use the frontend command: frontend(expand, [expr]);

• 

The expand command is extensible: if the procedure `expand/f` is defined, then the call expand(f(x)); calls `expand/f`(x);

Examples

expandx+1x+2

x2+3x+2

(1)

expandx+1x+2

xx+2+1x+2

(2)

expand1x+1x

1x+1x

(3)

expandsinx+y

sinxcosy+cosxsiny

(4)

expandcos2x

2cosx21

(5)

expandⅇa+lnb

ⅇab

(6)

expandx+1y+z

xy+xz+y+z

(7)

Do not fully expand an expression.

expandx+1y+z,x+1

x+1y+x+1z

(8)

The expand command will only expand an expression if it is possible.

expandlnx1x2

lnx1x2

(9)

assumex,real

expandlnx1x2

ln11x~2+lnx~

(10)

The expand command works on more advanced functions.

expandBesselJ2,t

2BesselJ1,ttBesselJ0,t

(11)

expandLegendreQ2,t

14lnt+1+14lnt1+34t2lnt+134t2lnt132t

(12)

expandJacobiP3,1,14,t

307102422471024t+15751024t2+50751024t3

(13)

To selectively prevent expansions of subexpressions, it is frequently useful to use indets, to get subexpressions of certain type, and pass the operands of its output as extra arguments to expand.

eea+bz+sina+b+ⅇa+b

ee:=a+bz+sina+b+ⅇa+b

(14)

By default products and functions are expanded.

expandee

za+zb+sinacosb+cosasinb+ⅇaⅇb

(15)

Avoid expanding sin(a+b)

expandee,sina+b

za+zb+sina+b+ⅇaⅇb

(16)

Avoid expanding the exponential function.

expandee,opindetsee,specfuncanything,exp

za+zb+sinacosb+cosasinb+ⅇa+b

(17)

Avoid expanding the exponential and sine functions.

expandee,opindetsee,specfuncanything,exp,sin

za+zb+ⅇa+b+sina+b

(18)

Avoid expanding all functions.

expandee,opindetsee,function

za+zb+ⅇa+b+sina+b

(19)

See Also

assume

collect

combine

convert

Expand

expandoff

expandon

ExtendingMaple

factor

frontend

indets

normal

op

RealDomain

sort

type[expanded]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam