Post Reply 
Saving, using expressions.equations saved as CAS variables
01-15-2014, 01:27 AM
Post: #3
RE: Saving, using expressions.equations saved as CAS variables
Case #1.

f(x):=x^2-5 creates a mathematical function named \( f \), whose input (dummy) variable is \( x \). The CAS is capable of functional algebra. That is, f+g, f*g and f/g are all understood by the CAS, without ever referring to the dummy input variables of each function. As an example, create two functions: f(x):=x^2 and g(t):=2-t. Then in the CAS, type h:=f(g) to create a composition of functions. Even though you did not specify an input variable for \( h \), the calculator has (in a sense) promoted \( h \) to a function so that h(3) produces the result 1. (It calculates this as h(3) = f( g(3) ) = f( -1 ) = (-1)^2 = 1). However, commands such as diff() and int() only know how to handle expressions and have no awareness of functional algebra. (There are commands, however, which can compute functional derivatives in xcas, though.) When one evaluates a function using a variable as input, then the result is an expression in terms of that variable. That is, if \( f\) is evaluated at \( x = t\) then the result is an expression in terms of \( t \). (Or at \( x = x\) then the result is an expression in terms of \( x \). Therefore, \( f(t) \) and \( f(x) \) are valid inputs for diff(), int(), solve(), etc. whereas \( f \) by itself is not. Case #3 is similar with the slight difference merely being the number of inputs.

Case #2.

Using f:=x^2-5 creates a variable \( f \) -- as opposed to a mathematical function as above -- and the value of \( f \) in this case is whatever \( x^2-5 \) simplifies to, if at all (depending on whether \(x \) was defined when \(f\) was created as a variable). It does not, however, create a function. Instead, it either creates a numerical value (if \(x \) is defined) or an algebraic expression (which _could_ evaluate to a numerical value once \(x\) is defined and the expression evaluated). Case #5 is no different from #2.

In cases 1 through 3, and in 5, you have not created an equations whatsoever in the mathematical sense.

Cases #4

This cases actually results in equations (sometimes). You have created a function whose domain is \( \mathbb{R}[x] \times \mathbb{R}[x] \times \mathbb{R}[x] \times \mathbb{Z}[x] \), where \( S[x] := S \cup \{ x \} \) and \( x \) is a dummy variable (I'm abusing some conventional mathematics notation); and whose range consists of exponential equations (or booleans). This is one means of CREATING a family of equations of a specific form (in this case, an exponential function modeling growth/decay). So you can create an equation such as \( y=50(1+.05)^t \) by evaluating \( F_{P5}(y,50,.05,t) \). If all the inputs of \( F_{P5} \) are numerical, then you essentially create a boolean test as the resulting equality can only be either true or false (there are no variables, after all).

That said, I am still not sure I understand your goal. You mention wanting to "save" a multivariable expression. What is meant by "save" -- are you looking for ways to create a "library" of frequently used formulas? Or are you merely interested in storing intermediate results (obtained by using diff(), int(), etc. on these formulas) for use in other calculations?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Saving, using expressions.equations saved as CAS variables - Han - 01-15-2014 01:27 AM



User(s) browsing this thread: 1 Guest(s)