Appendix A: Functions and Instructions 185
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