Saturday, August 20, 2022

Plus42: The Solver SEQ Command

Plus42: The Solver SEQ Command


Solver SEQ Function


In the calculator app Plus42, we can evaluate a sequence of calculations to return a result.  The SEQ is also good for the FOR loop because it allows us to initialize several variables.


Syntax:

SEQ( expr1 : expr2 : expr3: ... : expr_n )


I think this is best illustrated by example.


Example 1


Calculate   f(x) = x * p ÷ t^2


where:

p = 0.01 * a^2

a = 36 *t^2 - 280


Equation:

SEQ1:F=SEQ(L(A:36×T^2-280):L(P:.01×G(A)^2))×X÷EXP(T)


The commands listed in the SEQ are:


1.  L(A:36×T^2-280):  Let A = 36 * T^2 - 280.  T is the input variable.  


2.  L(P:.01×G(A)^2)):  Let P = 0.01 * A^2;  the Get command (G) is used to keep A from the variable menu


The answer is stored in P.


Variables in calculation:  F, T, X


X = 2, T = 0.8, solve for F = 593.3698253


X = 0.3, T = 9, solve for F = 2.57253759


T = 11.1, F = 58.68, solve for X = 22.4853545434


Example 2


Calculate p = Π( n / 4, n = 1 to m)


Equation:

SEQ2: P=FOR(SEQ(L(A:1):L(N:1)):G(N)<=IP(M):L(N:G(N)+1):L(A:G(A)×(G(N)÷4)))


The commands listed in the SEQ are:


1.  L(A:1):   Let A = 1


2.  L(N:1):  Let N = 1


In this example, SEQ is in a FOR command and is used to initialize variables.   


Variables in calculation: M, P


M = 3, solve for P = 0.09375


M = 6, solve for P = 0.17578125


M = 18, solve for P = 93166.79943


If you have not checked out the Plus42 app, please check it out.  The Plus42 is an HP-42S Simulator which builds up on the Free42.   However, the Plus42 adds the solver in a style of the HP 17B and 27S, graphing commands, and units.


Thomas Okken's Plus42 page:  https://www.thomasokken.com/plus42/


Note:  Casio fx-991EX Week - September 5, 2022 to September 9, 2022 


All original content copyright, © 2011-2022.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 

Spotlight: Sharp EL-5200

  Spotlight: Sharp EL-5200 As we come on the 13 th (April 16) anniversary of this blog, I want to thank you. Blogging about mathematic...