Post Reply 
Function view [Eval], & [Simplify]
11-03-2018, 10:49 PM (This post was last modified: 11-12-2018 09:40 PM by compsystems.)
Post: #1
Function view [Eval], & [Simplify]
Hello, Users and Developer group of the hp-prime calculator

Topic: Operations (+, -, *, /, o) with functions on CAS VIEW and HOME VIEW (NUMERICAL)

it is required to define the same mathematical object twice =( to show the graphic part and symbolic operation

PHP Code:
assume(X,symbolic) [EnterErrorBad Argument 

(X):=X² 1
F3(X):=F1(F2(X)) [enterok 
(F3(X))  [enter] -1  =( // X^2+2*X-2

// X  → X_
assumeX_ symbolic)

F1(X_):=2*X_ -3
(X_):=X_² 1
F3(X_):=F1(F2(X_)) [enter] => 2*(X_^2+1)-// Composition of functions
F4(X_):=F2(F1(X_)) [enter] => (2*X_-3)^2+1
(X_):=(F1+F2)(X_) [enter] => X_^2+2*X_-// Combination of functions
F6(X_):=(F1-F2)(X_) [enter] => -X_^2+2*X_-4
(X_):=(F1*F2)(X_) [enter] => (X_^2+1)*(2*X_-3)
F8(X_):=(F1/F2)(X_) [enter] => (2*X_-3)/(X_^2+1)
F9(X_):=F1(X_+1) [enter] => 2*(X_+1)-// Horizontal translation of 1 units to the left
F0(X_):=F1(X_)-[enter] => 2*X_-// Vertical translation of -5 units down

F10(X_):=F1(X_-1) [enter] => 2*(X_+1)-// Horizontal translation of 1 units to the right
F11(X_):=F1(X_)+[enter] => 2*(X_+1)-// Vertical translation of +5 units to the up

F12(X_):= -F1(X_) [enter] => -2*X_+// Reflection (with respect to the x axis)
F13(X_):= F1(-X_) [enter] => -2*X_-// Reflection (with respect to the y axis)
F14(X_):= -F1(-X_) [enter] => 2*X_+// Reflection (regarding the origin): 

PHP Code:
// restart(X) // numerical mode

(X)=X² 1
F3(X)=F1(F2(X)) [Eval] 2*(X^2+1)-3
(X)=F2(F1(X)) [Eval] (2*X-3)^2+1
(X)=(F1+F2)(X) [Eval] does not respond
(X)=(F1-F2)(X) [Eval] does not respond
(X)=(F1*F2)(X) [Eval] does not respond
(X)=(F1/F2)(X) [Eval] does not respond
(X)=F1(X+1) [enter2*(X+1)-


Attached File(s) Thumbnail(s)
Find all posts by this user
Quote this message in a reply
11-04-2018, 11:04 AM (This post was last modified: 11-04-2018 11:11 AM by JMB.)
Post: #2
RE: Function view [Eval]
Of course it doesn't work, the Function App is not CAS!

Inside the Function App you must write:
  • F5(X)=F1(X)+F2(X) [Eval]
  • F6(X)=F1(X)-F2(X) [Eval]
  • F7(X)=F1(X)*F2(X) [Eval]
  • F8(X)=F1(X)/F2(X) [Eval]

Josep Mollera. HP PRIME, HW: C, SW: 2.1.14425 (2020 01 16).
Find all posts by this user
Quote this message in a reply
11-04-2018, 12:41 PM (This post was last modified: 11-04-2018 08:36 PM by compsystems.)
Post: #3
RE: Function view [Eval]

The expression F5(X)=(F1+F2)(X) algebraically is equivalent to F5(X)=F1(X)+F2(X), but the most used in the math books is F5(X)=(F1+F2)(X), like (F1○F2)(X), instead of F1(F2(X))

I think the function application must have some kind of symbolic calculation library [Symbolic key] to be able to evaluate the expressions symbolically, simply that it needs to add some rules as in the cases that it can not currently evaluate. But more useful is that the whole system could be integrated NUM mode with CAS mode, because there are three ways to solve certain types of mathematical problems, by graphical method [Plot key], tabulation of values ​​[Num key] and analytically mode [CAS] The most valuable is the CAS, because the graphics are deceptive (they disfigure reality) for example F0(X) = 3/(2*X -5) apparently there are intersections, and in the function F1(X) = X^3-1.1*X^2-65.4*X+229.5, the Fundamental Theorem of Algebra tells us that any cubic equation can have at most three real solutions, but the graph shows me two. until you zoom in. Many authors are against the teaching of mathematics by means of graphics, mathematics is symbolic and therefore the CAS is the most important, but the graphing It is a great heuristic resource.

I hope in the future that they can integrate the [NUM/HOME] mode with the Computer Algebra System, as you can see in CAS mode I have to replace the variable X with X_ when I expose the three solution methods in the classroom, it is a problem assign the value from 0 to X, although this could easily be fixed as I propose in the following thread:

Solution to the problem of pre-assigned variables to 0

I await your feedback from the following publication

With the integration of [NUM / HOME] mode with [CAS] the power of the HP-prime was great. Maybe one day.

Thank you
Find all posts by this user
Quote this message in a reply
11-11-2018, 01:46 PM (This post was last modified: 11-12-2018 09:21 PM by compsystems.)
Post: #4
RE: Function view [Eval]
Hello, the EVAL function is not simplified, it only replaces, it is very useful to see the simplified expression, as well as an option to recover the previous definition, because after evaluating it, the original expression is lost.

at present

in a very close firmware update.

PHP Code:
F2(X)=X² 1
F3(X)=F1(X)+F2(X) [Eval]  2*X-3+(X^2+1)  
Simplify] => X^2+2*X-

the following statement if it is interpreted [PLOT VIEW], but it does not show the result

Usually the cases of a subject in mathematics to show in a class, are 10 to 15 options, for this reason it is necessary to expand the input fields from F0 to F15
PHP Code:
F2(X)=X² 1;

// Composition of functions
F3(X)=F1(F2(X)) [enterF1(F2(X)) [Eval] 2*(X^2+1)-[Simplify2*X^2-

(X)=F2(F1(X)) [enterF2(F1(X)) [Eval] (2*X-3)^2+[Simplify4*X^2-12*X+10

// Combination of functions
F5(X)=F1(X)+F2(X) [enterF1(X)+F2(X) [Eval] 2*X-3+(X^2+1) [SimplifyX^2+2*X-
(X)=F1(X)-F2(X) [enterF1(X)-F2(X) [Eval] 2*X-3-(X^2+1) [Simplify]  -X^2+2*X-4
(X)=F1(X)*F2(X) [enterF1(X)*F2(X) [Eval] (X^2+1)*(2*X-3) [Simplify2*X^3-3*X^2+2*X-3
(X)=F1(X)/F2(X) [enterF1(X)/F2(X) [Eval] (2*X-3)/(X^2+1)

// Horizontal translation of 1 units to the left
F9(X)=F1(X+1) [enterF1(X+1) [Eval] 2*(X+1)-[Simplify2*X-

// Horizontal translation of 1 units to the right
F0(X)=F1(X-1) [enterF1(X-1) [Eval] 2*(X-1)-[Simplify2*X-5

// Vertical translation of -5 units dow
F10(X)=F1(X)-[enterF1(X)-[Eval] 2*X-3-[Simplify2*X-8

//  Vertical translation of +5 units to the up
F11(X)=F1(X)+[enterF1(X)+[Eval] 2*X-3+[Simplify2*+2

//  Reflection (with respect to the x axis)
F12(X)= -F1(X) [enter] -F1(X) [Eval]  -(2*X-3) [Simplify] -2*X+3

// Reflection (with respect to the y axis)
F13(X)= F1(-X) [enterF1(-X) [Eval] 2*-X-[Simplify] -2*X-3

// Reflection (regarding the origin)
F14(X)= -F1(-X) [enter] -F1(-X) [Eval] -(2*-X-3) [Simplify2*X+
Find all posts by this user
Quote this message in a reply
Post Reply 

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