
78 Chapter 3: Symbolic Manipulation
03SYMBOL.DOC TI-89/TI-92 Plus: Symbolic Manipulation (English) Susan Gullord Revised: 02/23/01 10:52 AM Printed: 02/23/01 2:12 PM Page 78 of 24
Multi-statement user-defined functions should be used as an
argument for numeric functions (such as nDeriv and nInt) only.
In some cases, you may be able to create an equivalent single-
statement function. For example, consider a piecewise function with
two pieces.
When: Use expression:
x < 0 ëx
x ‚ 0 5 cos(x)
¦ If you were to create a multi-statement user-defined function with
the form:
Func
If x<0 Then
Return ëx
Else
Return 5cos(x)
EndIf
EndFunc
Then numerically
integrate y1(x) with
respect to x.
¦ Create an equivalent single-statement user-defined function.
Use the
TI-89 / TI-92 Plus’s
built-in when
function.
Then integrate y1(x)
with respect to x.
Multi-Statement vs.
Single-Statement
Functions
Tip: You can use your
computer keyboard to type
lengthy text and then use
TI-GRAPH LINK to
send it to
the
TI-89 / TI 92-Plus.
See
Chapter 18 for more
information.
Tip: To select
nInt
from the
Calc
toolbar menu, press
… B:nInt.
Tip: To select
‰
from the
Calc
toolbar menu, press
… 2
(or press
2 <
on the
keyboard).
Define y1(x)=Func:If x<0 Then: ... :EndFunc
Define y1(x)=when(x<0,ëx, 5cos(x))
Press ¥ ¸ for a
floating-point result.