Expr(), 818 appendix a: functions and instructions – Texas Instruments TITANIUM TI-89 User Manual

Page 818

Advertising
background image

818

Appendix A: Functions and Instructions

expand(

expression1,var

)

returns

expression

expanded with respect to

var

. Similar powers of

var

are collected. The terms and their factors are

sorted with

var

as the main variable. There might

be some incidental factoring or expansion of the
collected coefficients. Compared to omitting

var

,

this often saves time, memory, and screen space,
while making the expression more
comprehensible.

expand((x+y+1)^2,y)

¸

yс +

2ш yш (x

+

1)

+

(x

+

1)ñ

expand((x+y+1)^2,x)

¸

xс +

2ш xш (y

+

1)

+

(y

+

1)ñ

expand((x^2ì x+y^2ì y)/(x^2ù y^2ì x^2ù

yì xù y^2+xù y),y)

¸

expand(ans(1),x)

¸

Even when there is only one variable, using

var

might make the denominator factorization used
for partial fraction expansion more complete.

Hint: For rational expressions,

propFrac()

is a

faster but less extreme alternative to

expand()

.

Note: See also

comDenom()

for an expanded

numerator over an expanded denominator.

expand((x^3+x^2ì 2)/(x^2м 2))

¸

2ш x

xс м 2 + x+1

expand(ans(1),x)

¸

1

xì ‡2 +

1

x+‡2 + x+1

expand(

expression1,

[

var

])

also distributes

logarithms and fractional powers regardless of

var

. For increased distribution of logarithms and

fractional powers, inequality constraints might be
necessary to guarantee that some factors are
nonnegative.

expand(

expression1,

[

var

])

also distributes

absolute values,

sign()

, and exponentials,

regardless of

var

.

Note: See also

tExpand()

for trigonometric

angle-sum and multiple-angle expansion.

ln(2xù y)+‡(2xù y)

¸

ln(2ø xø y)

+

(2ø xø y)

expand(ans(1))

¸

ln(xø y)

+

2ø ‡(xø y)

+

ln(2)

expand(ans(1))|y>=0

¸

ln(x)

+

2ø ‡xø ‡y

+

ln(y)

+

ln(2)

sign(xù y)+abs(xù y)+

e

^(2x+y)

¸

e

2ø x+y

+

sign(xø y)

+

|xø y|

expand(ans(1))

¸

sign(x)øsign(y)

+

|x|ø|y|+

(

e

x

)

2

ø

e

y

expr()

MATH/String menu

expr(

string

)

expression

Returns the character string contained in

string

as

an expression and immediately executes it.

expr("1+2+x^2+x")

¸

xñ +

x

+

3

expr("expand((1+x)^2)")

¸

xс +

2ш x

+

1

"Define cube(x)=x^3"! funcstr

¸

"Define cube(x)=x^3"

expr(funcstr)

¸

Done

cube(2)

¸

8

Advertising