Showing posts with label CAS. Show all posts
Showing posts with label CAS. Show all posts

Saturday, September 14, 2024

HP Prime CAS: Riemann-Louiville Integral vs Taking the Indefinite Integral Twice

HP Prime CAS: Riemann-Louiville Integral vs Taking the Indefinite Integral Twice



Introduction


The Riemann-Louiville Integral takes the integral of the function f(x) of any positive order v. The integral is defined as:


c_D_x^(-v) = 1 / Γ(v) * ∫( (x – t) * f(t) dt, t = c, t = x)


where:

c = a real constant, which can be zero

f(x) = function of x

t = dummy variable of integration

‘v = order where v >0


If v=1, this is the regular integral. However, the value of v can be a positive non-integer. If v=2, then the Riemann-Louiville integral is a result if you integrate the function twice.


This is one of the formulas on determining indefinite integrals of various orders.



HP Prime CAS Function: dblint


Double Integral of f(x) which takes the integral of f(x) twice. The variable x is used in the function.


dblint(f):= ∫∫ f dx dx


HP Prime CAS Function: rlint


The Riemann-Liouville Integral of f(x). The input has the variable x as the independent variable. The result of the function returns t as the independent variable.


rlint(f,c,v):=(∫(t–x)^(v–1)*f,x,c,t)) / Gamma(v)


Note that the variables x and t are switched to allow the input to be a function of x.


Notes


This was programmed on the CAS page in the format:


func(var) := function


I was not able to use the Program Editor mode at time of programming (July 30, 2024). (Beta Firmware 15048)


Examples



Double Integral: dblint

RLI, v = 2: rlint with c = 0

f(x) = x^m, m>0

x^(m+2) / (m^2 + 3*m + 2)

t^(m+2) / (t^2 + 3*t + 2)

f(x) = a*x + b

(a*x^3 + 3*b*x^2) / 6

(a*t^3 + 3*b*t^2) / 6

f(x) = e^x

e^x

-t + e^t – 1

f(x) = cos x

-cos x

-cos t + 1


Taking the derivative twice will return us back to the original function. Note that the indefinite integral function assumes that the added constant is zero ( ∫ f(x) dx = F(x) + C ).



Source


Kimeu, Joseph M., "Fractional Calculus: Definitions and Applications" (2009).Masters Theses & Specialist Projects. Paper 115. http://digitalcommons.wku.edu/theses/115



Eddie


All original content copyright, © 2011-2024. 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.

Saturday, January 27, 2024

HP Prime - Restart and Some CAS Command Comparisons

HP Prime - Restart and Some CAS Command Comparisons


restart - A Rescue in CAS Mode

I learned about this command in a recent HPCC virtual meeting about the command restart.   One of the participants had trouble storing equations in variables.   After changing settings and trying other formats, the restart command was introduced and it solved the problem.  

What the restart command does is purge all the variables in CAS variables and reset all CAS settings.    The restart command can be typed or found in the Catalog.
The command does not require arguments.

When the restart command, the screen will show:

============== restarted ==============

Pressing enter will show a list of the CAS variables in a list.  



Some CAS Command Comparisons


ifactor vs. ifactors

ifactor gives the prime factorization of integers.

ifactors returns a list of prime factors with the associated multiplicity in a list in the format:    
[ factor1, multiplicity1, factor2, multiplicity2, ... ]


Examples:


ifactor(480) returns 2^5 * 3 * 5

ifactors(480) returns [2, 5, 3, 1, 5, 1]


ifactor(507) returns 3 * 13^2

ifactors(507) returns [3, 1, 13, 2]


normal vs. regroup

Both the normal and regroup commands can be found in the catalog or can be typed.  According to the help facility:

normal simplifies an expression to an irreducible form.

regroup simplifies and collects terms in an expression, to match the Minimum simplification setting.  


Examples:


normal(a*(b+a-b^2)) returns a^2-a*b^2+a*b

regroup(a*(b+a-b^2)) returns a*(-b^2+a*b)


normal(x+5*x+6*(x^2-3*x)) returns 6*x^2-12*x

regroup(x+5*x+6*(x^2-3*x)) returns 6*(x^2-3*x)+6*x


normal(x^2*√2-(x^3-1)/(x+1)) returns ((√2-1)*x^3+2*√2*x^2+1)/(x+2)

regroup(x^2*√2-(x^3-1)/(x+1)) returns √2*x^2-(x^3-1)/(x+2)


normal((x+3)^5) returns x^5+15*x^4+90*x^3+270*x^2+405*x+243

regroup((x+3)^5) just returns (x+3)^5


iquo vs irem vs. iquorem

The three commands iquo, irem, and iquorem are commands in Euclidean Division.

iquo(x,y) returns the quotient of x/y

irem(x,y)  returns the remainder of x/y

iquorem(x,y)  returns the quotient and remainder of x/y in a list.

The arguments x and y must be positive integers.  


Examples:


iquo(258,19) returns 13

irem(258,19) returns 11

iquorem(258,19) returns [13, 11]

258 = 13 * 19 + 11



I really need to work with the CAS engine of the HP Prime more often,

Eddie

All original content copyright, © 2011-2024.  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. 

Saturday, May 20, 2023

Casio Classpad fx-CP400: Solving a System of Linear Differential Equations Using Laplace Transforms

Casio Classpad fx-CP400: Solving a System of Linear Differential Equations Using Laplace Transforms



Introduction


The following procedure should work with the Casio Classpad family of calculators (300, 330, fx-CP400, fx-CP500). 


An attempt to use the Casio Classpad to solve the system of differential equations:


dxf/dt = A * xf(t) + B * yf(t) + g1(t)

dyf/dt = C * xf(t) + D * yf(t) + g2(t)


Initial conditions:  xf(0) = xf0,   yf(0) = yf0



The independent variable in all the functions is t.  The Casio Classpad's CAS functions laplace and invLaplace are used to accomplish this task.



Syntax


Laplace Transform of f(t):


laplace(f(t), t, s)


Laplace Transform of a Differential Equation:


laplace(diff eq, independent variable, dependent variable, s)


Inverse Laplace Transformation:


invLaplace(ℒ(s), s, t)


t:  parameter of the original function f(t)

s:  parameter of the transformed function ℒ(s)


The definition of a Laplace Transformation:


ℒ(f(t))(s) = ∫( f(t) * e^(-s*t) dt, t = 0 to ∞)


Now, even though we are working a system of differential equations, the laplace and invLapace commands can only work on function at a time.  Any other variable will be treated as a constant, even it was meant to represent another functions.  The substitution steps will account for this.  


The variables used to respect the Classpad's system variables.  


Here are the steps I used to solve:


dxf/dt = A * xf(t) + B * yf(t) + g1(t)

dyf/dt = C * xf(t) + D * yf(t) + g2(t)


Initial conditions:  xf(0) = xf0,   yf(0) = yf0


Spaces are added to readability.  



1.  Store dxf/dt in the variable f1.   Use xf' to represent dxf/dt.  


2.  Store dyf/dt in the variable f2.   Use yf' to represent dyf/dt.


3.  Execute the following and substitutions:


laplace( f1, t, xf, s ) ⇒ g1

g1 | xf(0) = xf0 and  yf / s = Mp ⇒ g1


4.  Execute the following and substitutions:


laplace( f2, t, yf, s ) ⇒ g2

g2 | yf(0) = yf0 and Lp = Mp ⇒ g2

g2 | xf /s = Lp ⇒ g2


Note Lp = ℒ( xf(t) ) and Mp = ℒ( yf(t) )


5.  Now solve the system of transformed equations: 


solve( {g1, g2}, {Lp, Mp} ) ⇒ lists


6.  Take the inverse laplace transforms:


invLaplace( getRight( lists[1], s, t ) ) ⇒ h1

invLaplace( getRight( lists[2], s, t ) ) ⇒ h2


The solutions are:


xf(t) = h1

yf(t) = h2


The getRight command extracts the right side of an equation.



Examples


Example 1:


xf ' = -0.08 * xf + 0.02 * yf + 6

yf ' = 0.08 * xf - 0.08 * yf


Initial conditions:  xf(0) = 0, yf(0) = 150






Example 2:


xf ' = 2 * xf + yf + t^2

yf ' = -2 * xf + 5


Initial conditions:  xf(0) = 2, yf(0) = 5




Casio Classpad Program:  laplaced


Download here:  https://drive.google.com/file/d/1zxTEynCjXmBrPU9pYqmXo3kF_so7fiI-/view?usp=share_link


Code:


' setup

SetRadian


' local variables

Local str1, str2, f1, f2

Local g1, g2, lists, h1, h2

Local Mp, Lp, t, s, xval, yval


' main

ClrText

InputStr str1, "xf'(xf,yf,g1(t))="

InputStr str2, "yf'(xf,yf,g2(t))="

Input xval, "xf(0)? "

Input yval, "yf(0)? "


StrJoin "xf'=", str1, str1

StrJoin "yf'=", str2, str2

strToExp(str1) ⇒ f1

strToExp(str2) ⇒ f2


' transform and solve

laplace(f1, t, xf, s) ⇒ g1

g1 | xf(0) = xval and yf/s = Mp ⇒ g1


laplace(f2, t, yf, s) ⇒ g2

g2 | yf(0) = yval and Lp = Mp ⇒ g2

g2 | xf/s = Lp ⇒ g2


Print "Laplace Transforms:"

PrintNatural g1

Print g1

PrintNatural g2

Print g2


solve({g1, g2},{Lp, Mp})⇒lists

invLaplace(getRight(lists[1]),s,t) ⇒ h1

invLaplace(getRight(lists[2],s,t) ⇒ h2


Print "Solutions: "

Print "xf = "

PrintNatural h1

Print h1

Print "yf = "

PrintNatural h2

Print h2


Note:  PrintNatural displays the expression in textbook form in a popup box, but it does not add anything to the text output terminal.  This is why I included both PrintNatural and Print commands.  



Source


Kreyszig, Erwin.  Advanced Engineering Mathematics  8th Edition  John Wiley & Sons, Inc:  New York, NY.  1999.  ISBN 0-471-15496-2



All original content copyright, © 2011-2023.  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. 

Saturday, November 26, 2022

HP Prime CAS: Curvature

HP Prime CAS:  Curvature



Introduction


The following CAS functions calculates the curvature of:


functions, y(x)

polar functions, r(t)  (t: Θ)

parametric functions, x(t), y(t)


Let Δα be the angle of rotation angle and Δs is the slight change of distance. Then the radius of curvature is:


K = abs(Δα ÷ Δs) as Δs → 0


And the radius of curvature is the reciprocal of K.  


For circles, the radius of curvature is constant.  Wankel engines and rotary engines have their pistons traveling in a circle.


Calculating the curvature depends on the form of the function.  


Function:  y(x)


K = abs( y''(x) ) ÷ (1 + (y'(x))^2) ^(3/2)


Polar:  r(t)  (t replaces Θ)


K = abs( r(t)^2 + 2 * (r'(t))^2 - r(t) * r''(t) ) ÷ ( r(t)^2 + r'(t)^2 )^(3/2)


Parametric:  x(t), y(t) 


K = abs( x'(t) * y''(t) - y'(t) * x''(t) ) ÷ ( x'(t)^2 + y'(t)^2 )^(3/2)


Radius of Curvature:


r = 1 ÷ K



For the CAS functions, they take the form:


#cas

name(arguments):=

BEGIN

...

END;

#end


Clicking on the CAS checkbox will not put the #cas and #end delimiters.  And these programs will work in CAS mode only.



HP Prime CAS Program: crvfunc


#cas

crvfunc(y,x):=

BEGIN

// curvature

// function

// radius = 1/curvature

LOCAL a,b;

a:=diff(y,x,2);

b:=diff(y,x,1);

RETURN ABS(a)/(1+b^2)^(3/2);

END;

#end






HP Prime CAS Program: crvpol


#cas

crvpol(r,t):=

BEGIN

// curvature

// polar (t: θ)

// radius = 1/curvature

LOCAL a,b,n,d;

a:=diff(r,t,2);

b:=diff(r,t,1);

n:=simplify(r^2+2*b^2-r*a);

d:=r^2+b^2;

RETURN ABS(n)/(d)^(3/2);

END;

#end






HP Prime CAS Program: crvpar


#cas

crvpar(y,x,t):=

BEGIN

// curvature

// parametric

// radius = 1/curvature

LOCAL y1,y2,x1,x2,n,d;

y2:=diff(y,t,2);

y1:=diff(y,t,1);

x2:=diff(x,t,2);

x1:=diff(x,t,1);

n:=simplify(x1*y2-y1*x2);

d:=simplify(x1^2+y1^2); 

RETURN ABS(n)/(d)^(3/2);

END;

#end





Until next time and have a great day, 


Eddie 


Source:


Svirin, Alex Ph.D.      "Curvature and Radius of Curvature" Math24  https://math24.net/curvature-radius.html   2022.  Last Updated September 12, 2022.  


Gratitude to Arno K. and rombio for helping me with derivatives and CAS programs.  

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. 


Monday, August 29, 2022

Retro Review: HP 40gs

Retro Review:  HP 40gs




Quick Facts


Model:  HP 40gs

Company:  Hewlett Packard

Years:  2006-2010s

Type:  Graphing

Batteries: 4 x AAA plus backup batter CR2032

Operating Mode:  Algebraic

Memory Registers: 27 real variables (A - Z, Θ); and 10 of Lists (L#), Statistics (C#), Complex Numbers (Z#), Matrices (M#), Graphic Objects (G#)

Original Price:  about $100.00 

Memory:  256 KB RAM and 2 MB Flash


Other Features


*  Numerical calculus:  integral and derivative

*  Floor, ceiling, fraction, integer, mantissa, exponent parts

*  Complex numbers

*  Polynomial calculations and roots 

*  Matrices and lists

*  Conversions and library of scientific constants


A great feature is the HELPWITH command, as called with the keystrokes [ SHIFT ] [ 2 ] (SYNTAX).  



Keyboard


The keys are pretty responsive.  The keyboard is a beautiful dark gray with light gray and black keys.  The knocks:  first, the alpha characters are in gold, which the font does not contrast well the background.   Another thing I do not like is the alpha characters are placed below keys.  For example:  [ VARS ] has the character A, [ SIN ] has the character E.  


Another challenge is that the double quotes and single quotes are not available directly from the keyboard, and must be accessed through the CHARS menu.   In regular calculation, this may not make much of a difference, but in programming, it makes a big difference when it comes to messages and prompts.   The alpha-lock is regulated to a soft key.  



Equation Writer and CAS 


The HP 40gs has two ways to operate computer algebra system commands:


*  From Home, use of the symbolic variables which takes the form of S# (S1, S2, S3, etc).


*  Equation writer, which is selected by the (CAS) soft key.   In the equation writer, you can build and simplify equations.   The equation writer can use any variable, and is similar to the HP 48S and 48G family (including the HP 50g).   











Aplets 


Aplets are the HP 40gs' applications which includes:


*  Finance:  Time Value of Money and Amortization Table

*  Function:  Plot up to ten functions, F#(X)  where # 0-9

*  Inference:  Hypothesis tests

*  Linear Solver:  Solve 2 x 2 or 3 x 3 linear systems

*  Parametric:  Plot up to ten parametric pairs, X#(T), Y#(T)

*  Polar:  Plot up to ten polar equations, R#(Θ)

*  Quad Explorer: Dynamic graphing, y = a*(x+h)^2 + v

*  Sequences: Plot up to ten sequences, U#(N), with one or two initial conditions

*  Solve:  Store up to ten equations, solve for any one at a time

*  Statistics:  Statistics for 1 or 2 variables.  In 2 variable statistics, 8 regressions plus a user-defined 

*  StreamSmart:  Data streamer device which collects data, stream it, and analyze data 

*  Triangle Solve:  Solves for right triangles and regular triangles

*  Trig Explorer: Dynamic graphing:  f = sin(x ± n*π) and f = cos(x ± n*π)


Aplets can be modified and copied.  



Programming


The program language of the HP 40gs is the same as the HP 38G/39G series.  Each line, except for the last line, must end with a colon (:).   Arguments are separated with a semicolon (;).  


The learning curve of the programming language is little complex, especially when it comes to setting views and customizing aplets.   Thankfully the user guide is thorough, so make sure you have the book or the pdf download, which you can access here:


http://h10032.www1.hp.com/ctg/Manual/c00748685.pdf


  

Two Sample Programs


HP 40gs Program RANDLIST


Generate a list of random numbers of length N.


INPUT N; "LIST LENGTH"; "N:"; ""; 5:

MAKELIST(RANDOM,X,1,N,1)▶L0:

ΣLIST(L0)▶S:

S/N▶A:

-10 ▶Xmin:

10 ▶Xmax:

-10 ▶Ymin:

10 ▶Ymax:

ERASE:

DISPXY -6; 4; 2; "Σ:":

DISPXY 0; 4; 2; S:

DISPXY -6; 1; 2; "μ:":

DISPXY 0; 1; 2; A:

DISPXY -6; -2; 2; "n:":

DISPXY 0; -2; 2; N:

FREEZE:



HP 40gs Program PLOTPX


Asks for A, B, and C in a quadratic equation and stores it to the Function F0(X)


DISP 1; "2022-08-15 EWS":

DISP 2; "y=Ax^2+Bx+C":

FREEZE:

SELECT Function:

INPUT A; ""; "A"; ""; 1:

INPUT B; ""; "B"; ""; 1:

INPUT C; ""; "C"; ""; 1:

'A*X^2+B*X+C' ▶ F1(X)

CHECK 1:

MSGBOX "PRESS PLOT"


Note:  This language is similar to the later HP Prime, which most line ending with a semicolon.  



A Predecessor to the HP Prime?  Final Thoughts 


A lot of the features and structure of the HP 40gs would be present in the HP Prime:  among other things, a solver, program that can select aplets (apps) and set custom views but most of all, a separate CAS mode.  


The HP 40gs is a nice calculator with a ton of features.  I think the HP 40gs was rarely available in the United States because of the CAS mode, because like the HP 39gs, the 40gs is aimed towards the education market.  The key contrast could be better and adding the quotes to the keyboard would be nice.


Eddie


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. 


Saturday, November 13, 2021

TI-92 Plus: Solving Problems Step by Step

 TI-92 Plus:  Solving Problems Step by Step


This program should work with the TI-89 family (TI-89, TI-89 Titanium, Voyage 200).  





Some CAS Tricks Used


With the help of the TI-89/92 Plus manual and adding restrictions with the with ( | ) command:


ln(x^y) | x>0 and y>0 returns x


expand(ln(x∙y)) | x>0 and y>0 returns ln(x)+ln(y)


sin^-1(sin(x)) | x≥-π/2 and x≤π/2 returns x


tan^-1(tan(x)) | x≥-π/2 and x≤π/2 returns

(mod(2∙x-π,2∙π)/2) - π/2


√(x^2) | x≥0 returns x


Also, the part command can be used to pick out parts of an equation or expression.  Using left and right can extract sides of an equation.


Example:


left(2∙x+5 = 3∙y) returns 2∙x+5


right(2∙x+5 = 3∙y) returns 3∙y


TI-92 Plus Program: steps


The equations offered in this program are:


a∙x+c = b

a∙x+b = c∙x+d

a∙x^2 + c = b

y = a∙b^x

√(a∙x+c) = b∙x+d

x^2+(2∙a)∙x = b

1/x+1/a = 1/b

sin(a∙x)∙cos(a∙x) = b



Click on the picture below for the code:




Or you can download the file (.9xf) here:


https://drive.google.com/file/d/1c0DN8gkH_9jWWpSniilsZoYfOs9EBu7v/view?usp=sharing



Take care,


Eddie 



All original content copyright, © 2011-2021.  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. 


Thursday, October 15, 2020

HPCC 2020 Virtual Conference and Document Website

 HPCC 2020 Virtual Conference and Document Website 


HPCC 2020 Virtual Conference


The HPCC 2020 Virtual Conference took place on October 10, 2020.   The HPCC is the Handheld and Portable Computer Club is a long running calculator and computer site based out of the United Kingdom.  Their meetings are held virtually on the 2nd and 4th Saturday of every month.  I have recently joined the HPCC and glad to be a part of the club. 

You can find more information on the meetings here:  http://www.hpcc.org, under the Home tab.  Membership rates are between £17 to £23 depending where you live.


The conference has the following speakers and topics:


Eric Rechlin:  USB Drive Update

Jake Schwartz:  Updates to the PPC Archive

Bob Prosperi:  Swiss Micros DM41X - A little late; a lot better

Eric Hazen:  HP-25 Re-implementation on Z80 with VFD display

Michael Park:  MP-29 - a tactile touchscreen calculator

Mark Power:  Prime G2

Sylvain Côté:  Clonix & NoV modules for the HP-41

Edward Shore:  CAS and Calculators

Gene Wright and Włodek Mier-Jędrzejowicz: HP's Worst Calculators

Godwin Stewart:  Presentation on DMConnect 

Will Marchant:  DM16 in a satellite launch campaign


Conference web page:  http://www.hpcc.org/conferences/index.html


Each talk has slides for download and the corresponding YouTube video.  Special thanks to Eric Rechlin. 


HP Documentation Website


Eric Rechlin of hpcalc.org has put together a new website where you can download manuals for Hewlett Packard calculators, past and present.  


Link:  https://literature.hpcalc.org


Coming soon:  the USB that contains information calculator conferences including manuals through 2020 will be available his commerce site,  https://commerce.hpcalc.org.


Eddie  (Edward Shore)


All original content copyright, © 2011-2020.  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. 


Friday, January 24, 2020

HP Prime: Firmware Update

HP Prime:  Firmware Update

Here's the latest firmware update for the HP Prime.  This version fixes bugs, makes the commands ROUND and TRUNC work with numbers with units, updates the CAS system to 1.5, and allows adjustments for screen refresh rate. 

There are two versions for download.  Which version to download depends on the hardware of the HP Prime you have. 

You have the G2 version if your calculator has the G2 symbol on the back of the calculator.  You can also press [Help], scroll up to About HP Prime.  If your hardware version is D, your HP Prime has Hardware G2.  If neither of the previous statements is the case, then download the Hardware G1 version. 

It's very important that you download the correct version to your calculator!

Hardware G1 - 2.1.14425 dated 1/16/2020:

https://www.hpcalc.org/details/7469


Hardware G2 - 2.1.14433 dated 1/21/2020:

https://www.hpcalc.org/details/7783

These files are from the hpcalc.org, check this site for many programs and text files for various HP Graphing calculators. 

Eddie

All original content copyright, © 2011-2020.  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.


Wednesday, November 27, 2019

HP Prime: Hyperoblic CAS Transformations

HP Prime:  Hyperbolic CAS Transformations

Introduction

These CAS transforms some expressions involving hyperbolic functions, mainly sinh (hyperbolic sine) and cosh (hyperbolic cosine). 

Let ϕ and Ω be any algebraic expression, real number, or complex number.  These commands are meant to work in CAS mode. 

Exponential Definitions

sinhexp

sinhexp(ϕ) = (e^(ϕ) - e^(-ϕ)) / 2 = ((e^ϕ)^2 - 1) / (2 * e^ϕ)

#cas
sinhexp(f):=
BEGIN
RETURN (e^(f)-e^(−f))/2
END;
#end

coshexp

coshexp(ϕ) =  (e^(ϕ) + e^(-ϕ)) / 2 = ((e^ϕ)^2 + 1) / (2 * e^ϕ)

#cas
coshexp(f):=
BEGIN
RETURN (e^(f)+e^(−f))/2
END;
#end

tanhexp

tanhexp(ϕ) = (e^(ϕ) - e^(-ϕ)) / (e^(ϕ) + e^(-ϕ))

#cas
tanhexp(f):=
BEGIN
RETURN (e^(f)-e^(−f))/
(e^(f)+e^(−f))
END;
#end

Adding Properties

addsinh

addsinh(ϕ + Ω) = sinh ϕ * cosh Ω + sinh Ω * cosh ϕ

#cas
addcosh(f,g):=
BEGIN
RETURN COSH(f)*COSH(g)+
SINH(f)*SINH(g);
END;
#end

addcosh

addcosh(ϕ + Ω) = csoh ϕ * cosh Ω + sinh Ω * sinh ϕ

#cas
addsinh(f,g):=
BEGIN
RETURN SINH(f)*COSH(g)+
COSH(f)*SINH(g);
END;
#end

addtanh

addtanh(ϕ + Ω) = (tanh ϕ + tanh Ω) / (1 + tanh ϕ * tanh Ω)

#cas
addtanh(f,g):=
BEGIN
RETURN (TANH(f)+TANH(g))/
(1+TANH(f)*TANH(g));
END;
#end

Squaring Properties

sqsinh

sqsinh(ϕ) = sinh^2 ϕ = 1/2 * cosh(2 * ϕ) - 1/2

#cas
sqsinh(f):=
BEGIN
RETURN COSH(2*f)/2-1/2;
END;
#end

sqcosh

sqcosh(ϕ) = cosh^2 ϕ = 1/2 * cosh(2 * ϕ) + 1/2

#cas
sqcosh(f):=
BEGIN
RETURN COSH(2*f)/2+1/2;
END;
#end

Product Properties

sinhsinh

sinhsinh(ϕ, Ω) = 1/2 * (cosh(ϕ + Ω) - cosh(ϕ - Ω))

#cas
sinhsinh(f,g):=
BEGIN
RETURN 1/2*(COSH(f+g)-
COSH(f-g));
END;
#end

coshcosh

coshcosh(ϕ, Ω) = 1/2 * (cosh(ϕ + Ω) + cosh(ϕ - Ω))

#cas
coshcosh(f,g):=
BEGIN
RETURN 1/2*(COSH(f+g)+
COSH(f-g));
END;
#end

sinhcosh

sinhcosh(ϕ, Ω) = 1/2 * (sinh(ϕ + Ω) + sinh(ϕ - Ω))

#cas
sinhcosh(f,g):=
BEGIN
RETURN 1/2*(SINH(f+g)+
SINH(f-g));
END;
#end

Source:

Spiegel, Murray R. and Seymour Lipschutz, John Liu.  Schuam's Outlines:  Mathematical Handbook of Formulas and Tables  5th Edition   McGraw Hill: New York  2018  ISBN 978-1-260-01053-4


A little early start to our Thanksgiving feast,

Eddie

All original content copyright, © 2011-2019.  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.

Basic vs. Python: Circle Inscribed in Circle [HP 71B, Casio fx-CG 100]

Basic vs. Python: Circle Inscribed in Circle Calculators Used: Basic: HP 71B Python: Casio fx-CG 100 Introduction ...