HP Forums
Algebraic Expressions usage in Function Variables/App - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Algebraic Expressions usage in Function Variables/App (/thread-21998.html)



Algebraic Expressions usage in Function Variables/App - MigPrime - 07-06-2024 08:25 AM

I'm trying to understand variables defined by quoted algebraic expressions in Home mode.
(see QUOTE and '' in context help)

For example, I define the user variable J1a that is an algebraic (symbolic) expression using single quotes. It contains X and Y but is not a "user defined function":
J1a := 'Sin(X)*Cos(Y/5.0)'
Then if I enter this in the command line and Enter, it shows this:
J1a Sin(X)*Cos(Y/5.0)
showing that J1a is indeed defined as an unevaluated alebraic expression.
This looks like the same type of variable as a Function or Graph 3D Function App variable.
For example entering FZ2 on command line shows: 
FZ2 X^3 + 2*Sqrt(Y)

I can then assign this to the Graph 3D Function App variable FZ5 like so:
FZ5 := J1a
and Sin(X)*Cos(Y/5.0) shows up in the Graph 3D Symbolic field, an alternate way of entering expressions into the Function or Graph 3D Symbolic View. All good so far.

--- 1st Question: (about user defined variables with symbolic expressions) -----
Is it possible to use the user defined variable J1a as is directly inside say one of the Graph 3D Function App expressions and have it evaluated during graphing process according to its algebraic expression? e.g.
FZ7(X,Y)=3*X/Y + J1a
In the Graph 3D app using this expression for FZ7, how is J1a, a symbolic expression variable evaluated during the graphing process? It only seems to get one value.

---- 2nd Question: (about user defined FUNCTIONS and App functions) -----
In the Function or Graph 3D Apps, one can have an expression use another expression like:
FZ7(X,Y)=3*X/Y + FZ2(X,Y)
and I know how to define a user-defined FUNCTION to do the equivalent of this, and it works.
However there is a difference between a user defined function and the Apps functions.
If you Enter the name on the command one gets:
(as above)
FZ2 X^3 + 2*Sqrt(Y)
but a user defined function (using the Shift/DEFINE key) doesn't behave like this and on command line Entry shows:
UDF1 ---> Syntax Error

So how exactly are user defined function variables different than the Apps symbolic function variables??