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 compsystems Senior Member Posts: 1,337 Joined: Dec 2013
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

CAS VIEW
PHP Code:
assume(X,symbolic) [Enter] Error: Bad Argument F1(X):=2*X -3 [enter] okF2(X):=X² + 1; F3(X):=F1(F2(X)) [enter] ok simplify(F3(X))  [enter] -1  =( // X^2+2*X-2// X  → X_assume( X_ , symbolic)F1(X_):=2*X_ -3F2(X_):=X_² + 1; F3(X_):=F1(F2(X_)) [enter] => 2*(X_^2+1)-3 // Composition of functionsF4(X_):=F2(F1(X_)) [enter] => (2*X_-3)^2+1F5(X_):=(F1+F2)(X_) [enter] => X_^2+2*X_-2 // Combination of functionsF6(X_):=(F1-F2)(X_) [enter] => -X_^2+2*X_-4F7(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)-3 // Horizontal translation of 1 units to the leftF0(X_):=F1(X_)-5 [enter] => 2*X_-8 // Vertical translation of -5 units downF10(X_):=F1(X_-1) [enter] => 2*(X_+1)-3 // Horizontal translation of 1 units to the rightF11(X_):=F1(X_)+5 [enter] => 2*(X_+1)-3 // Vertical translation of +5 units to the upF12(X_):= -F1(X_) [enter] => -2*X_+3 // Reflection (with respect to the x axis)F13(X_):= F1(-X_) [enter] => -2*X_-3 // Reflection (with respect to the y axis)F14(X_):= -F1(-X_) [enter] => 2*X_+3 // Reflection (regarding the origin):

FUNCTION VIEW
PHP Code:
// restart(X) // numerical modeF1(X)=2*X -3F2(X)=X² + 1; F3(X)=F1(F2(X)) [Eval] 2*(X^2+1)-3F4(X)=F2(F1(X)) [Eval] (2*X-3)^2+1F5(X)=(F1+F2)(X) [Eval] does not respondF6(X)=(F1-F2)(X) [Eval] does not respondF7(X)=(F1*F2)(X) [Eval] does not respondF8(X)=(F1/F2)(X) [Eval] does not respondF9(X)=F1(X+1) [enter] 2*(X+1)-3 F0(X)=F1(X)-5 [enter] 2*X -3-5

Thanks

Attached File(s) Thumbnail(s) 11-04-2018, 11:04 AM (This post was last modified: 11-04-2018 11:11 AM by JMB.)
Post: #2 JMB Member Posts: 97 Joined: Jan 2016
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).
11-04-2018, 12:41 PM (This post was last modified: 11-04-2018 08:36 PM by compsystems.)
Post: #3 compsystems Senior Member Posts: 1,337 Joined: Dec 2013
RE: Function view [Eval]
Hello

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

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

Thank you
11-11-2018, 01:46 PM (This post was last modified: 11-12-2018 09:21 PM by compsystems.)
Post: #4 compsystems Senior Member Posts: 1,337 Joined: Dec 2013
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
[✓][X][][Eval][Show]

in a very close firmware update.
[✓][X][Eval/Definition][Simplify][Show]

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

the following statement if it is interpreted [PLOT VIEW], but it does not show the result
CAS(simplify(F1(X)+F2(X))

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:
F1(X)=2*X -3;F2(X)=X² + 1;// Composition of functionsF3(X)=F1(F2(X)) [enter] F1(F2(X)) [Eval] 2*(X^2+1)-3 [Simplify] 2*X^2-1 F4(X)=F2(F1(X)) [enter] F2(F1(X)) [Eval] (2*X-3)^2+1 [Simplify] 4*X^2-12*X+10// Combination of functionsF5(X)=F1(X)+F2(X) [enter] F1(X)+F2(X) [Eval] 2*X-3+(X^2+1) [Simplify] X^2+2*X-2 F6(X)=F1(X)-F2(X) [enter] F1(X)-F2(X) [Eval] 2*X-3-(X^2+1) [Simplify]  -X^2+2*X-4F7(X)=F1(X)*F2(X) [enter] F1(X)*F2(X) [Eval] (X^2+1)*(2*X-3) [Simplify] 2*X^3-3*X^2+2*X-3F8(X)=F1(X)/F2(X) [enter] F1(X)/F2(X) [Eval] (2*X-3)/(X^2+1)// Horizontal translation of 1 units to the leftF9(X)=F1(X+1) [enter] F1(X+1) [Eval] 2*(X+1)-3 [Simplify] 2*X-1 // Horizontal translation of 1 units to the rightF0(X)=F1(X-1) [enter] F1(X-1) [Eval] 2*(X-1)-3 [Simplify] 2*X-5// Vertical translation of -5 units dowF10(X)=F1(X)-5 [enter] F1(X)-5 [Eval] 2*X-3-5 [Simplify] 2*X-8//  Vertical translation of +5 units to the upF11(X)=F1(X)+5 [enter] F1(X)+5 [Eval] 2*X-3+5 [Simplify] 2*+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) [enter] F1(-X) [Eval] 2*-X-3 [Simplify] -2*X-3// Reflection (regarding the origin)F14(X)= -F1(-X) [enter] -F1(-X) [Eval] -(2*-X-3) [Simplify] 2*X+3
 « Next Oldest | Next Newest »

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