Texas Instruments TI-89 User Manual - Page 852
Simplification changed the order of the, argument., Similarly, x
UPC - 033317196326
View all Texas Instruments TI-89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 852 highlights
part(expression1, n) ⇒ expression part(cos(pùx+3),1) ¸ 3+pøx Simplifies expression1 and returns the nth argument or operand, where n is > 0 and the number of top-level arguments or operands returned by part(expression1). Otherwise, an error is returned. By combining the variations of part(), you can extract all of the sub-expressions in the simplified result of expression1. As shown in the example to the right, you can store an argument or operand and then use part() to extract further subexpressions. Note: When using part(), do not rely on any particular order in sums and products. Expressions such as (x+y+z) and (xì yì z) are represented internally as (x+y)+z and (xì y)ì z. This affects the values returned for the first and second argument. There are technical reasons why part(x+y+z,1) returns y+x instead of x+y. Similarly, xù yù z is represented internally as (xù y)ù z. Again, there are technical reasons why the first argument is returned as yøx instead of xøy. When you extract sub-expressions from a matrix, remember that matrices are stored as lists of lists, as illustrated in the example to the right. The example Program Editor function to the right uses getType() and part() to partially implement symbolic differentiation. Studying and completing this function can help teach you how to differentiate manually. You could even include functions that the cannot differentiate, such as Bessel functions. Note: Simplification changed the order of the argument. part(cos(pùx+3)) ¸ part(cos(pùx+3),0) ¸ part(cos(pùx+3),1)!temp ¸ temp ¸ part(temp,0) ¸ part(temp) ¸ part(temp,2) ¸ part(temp,1)!temp ¸ part(temp,0) ¸ part(temp) ¸ part(temp,1) ¸ part(temp,2) ¸ part(x+y+z) ¸ part(x+y+z,2) ¸ part(x+y+z,1) ¸ 1 "cos" 3+pøx pøx+3 "+" 2 3 pøx "ù" 2 p x 2 z y+x part(xùyùz) ¸ 2 part(xùyùz,2) ¸ z part(xùyùz,1) ¸ yøx part([a,b,c;x,y,z],0) ¸ "{" part([a,b,c;x,y,z]) ¸ 2 part([a,b,c;x,y,z],2)!temp ¸ {x y z} part(temp,0) ¸ "{" part(temp) ¸ 3 part(temp,3) ¸ z delVar temp ¸ Done :d(y,x) :Func :Local f :If getType(y)="VAR" : Return when(y=x,1,0,0) :If part(y)=0 : Return 0 ¦ y=p,ˆ,i,numbers :part(y,0)!f :If f="L" ¦ if negate : Return ëd(part(y,1),x) :If f="−" ¦ if minus : Return d(part(y,1),x) ìd(part(y,2),x) :If f="+" : Return d(part(y,1),x) +d(part(y,2),x) :If f="ù" : Return part(y,1)ùd(part(y,2),x) +part(y,2)ùd(part(y,1),x) :If f="{" : Return seq(d(part(y,k),x), k,1,part(y)) :Return undef :EndFunc 852 Appendix A: Functions and Instructions