Sunday, September 22, 2013


Nowadays, notebooks, tablets and the smartphones can perform the same calculation of the scientific calculators, and faster. So, why would you like to buy a calculator?
In the college, I was a hard user of scientific calculator, an HP 42s, in my opinion, the best scientific calculator even made. However, in that time, notebooks, tablets and smartphones were unavailable. Certainly, these machines have capabilities that couldn’t be provided by a scientific calculator, it’s possible to list a lot of them.
The answer to that question depends of a lot of elements, including your occupation, your proficiency to use all the resources of the calculator and where you will need it.
The computer programs are a “black box” for the most of users. Many people think it is not necessary to understand the algorithm behind the program. Allways will exist a person to build and to develop these programs. However you are going to understand properly the error of the results, the limitations of the calculation and all the capabilities of the program, case you don’t know the algorithm. In the scientific calculator, necessarily you should to know the algorithm of the program because you are responsible to build it. You have complete control on the calculation. The scientific calculator help you to implement the calculation, it doesn’t do it in your place.
Notebooks, tablets and the smartphones are faster than a scientific calculator, they have more computational power. But, do you really need all this computational power? The modern scientific calculator is faster than the fastest computer used in the project Apolo 11.
Case it is completely full, the notebook battery will be discharged after four or six hours. This limitation is not so different in the tablets and smartphones. For other side, you can use the same battery of the scientific calculator during months. In many situations, you do not have facilities to recharge the computer (or smartphone) battery. In these cases, a scientific calculator has an advantage.
Notebooks, tablets and smartphones are susceptible to virus and operational system crash. Case you are using a scientific calculator, you aren't worried about these kind of problem.
Could you keep the tablet or notebook in your pocket? This answer is affirmative to smartphones (some of them) and scientific calculator. You don’t have your tablet or notebook in your hands all the time. The portability of the scientific calculator is other advantage. This is not true for same graphic calculators. I have the HP 50g, definitively I cannot put it in my pocket. For this reason, despite the graphic calculator has more resources, I prefer the scientific calculator.
The scientific calculator is designed specifically to implement math calculations; it is optimized to do that. RPN is one of the excellent resources of the some scientific calculators to turn the math calculation easier, more reliable and faster (case you count the time of initialization) than a computer. Case you don’t know the Reverse Polish Notation (RPN), believe me, you are going to spend around 15 minutes to learn it and you will never use the algebraic notation in the scientific calculator again.
Beside these advantages, the scientific calculator prices have decreased in the last decades. Today you can buy the best HP scientific calculator (HP 35s) for less than US$ 43.
Computers and scientific calculator aren’t fighting. The best choice depends of the each situation. Computers have all the capabilities of the scientific calculators, but they cannot replace it in the regular use.

Saturday, September 21, 2013

This program calculates y(x), once is given dy/dx expression and na initial value, y(xo). This calculation is based on Runge-Kutta 4th order algorithm. For more information, consult the following link of Wikipedia http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods

Variables:

Y : Current variable y.
X : Current variable x.
Z : Value of x for which you want to calculate the value of y.
F : Expression in the format dy/dx = f(y,x).
N : Number of steps will be divided the lenth between initial x and final x (Z).
H : Length of each step, so N x H = (Z- xo).
J, K and I : Intermediate variables.
A : Intermediate variable to keep saved the current variable x in each step of calculation.
B : Intermediate variable to keep saved the current variable y in each step of calculation.


Example:

dy/dx = y+ex
y(0)=1
y(3)=?

In fact, the analitical solution is y = (x+1)ex , so y(3) = 80.3421.  Case you don’t know the analitical solution, this program will give you the required information. The error depends of the number of steps. However, the computing time will increase with the number of steps.


N
Y(3)
Time spent by HP 35s (s)
10
80.5776
7
20
80.3857
14
30
80.3569
20
40
80.3488
26






See below the program listing for HP 35s scientific calculator.

Program R (Runge-Kutta, fourth-order)   LN=292  CK=75BD

R001 LBL R
R002 SF 10
R003 EDIT ROUTINE F
R004 DY÷DX=F(X,Y)
R005 INITIAL VALUE=
R006 X AND Y
R007 TARGET=DEFINE
R008 Y VALUE TO X=Z
R009 N = NUMBER
R010 OF STEPS
R011 CF 10
R012 INPUT N
R013 INPUT X
R014 STO A
R015 INPUT Y
R016 STO B
R017 x<>y
R018 INPUT Z
R019 x<>y
R020 -
R021 RCL÷ N
R022 STO H
R023 XEQ F001
R024 RCL× H
R025 STO I
R026 2
R027 ÷
R028 STO+ Y
R029 RCL H
R030 2
R031 ÷
R032 STO+ X
R033 XEQ F001
R034 RCL× H
R035 STO J
R036 2
R037 ÷
R038 RCL+ B
R039 STO Y
R040 XEQ F001
R041 RCL× H
R042 STO K
R043 RCL+ B
R044 STO Y
R045 RCL A
R046 RCL+ H
R047 STO X
R048 STO A
R049 XEQ F001
R050 RCL× H
R051 RCL J
R052 RCL+ K
R053 2
R054 ×
R055 RCL+ I
R056 6
R057 ÷
R058 STO+ B
R059 RCL X
R060 RCL Z
R061 x>y?
R062 GTO R023
R063 VIEW Y
R064 RTN
F001 LBL F
F002 RCL X
F003 ex
F004 RCL+ Y
F005 RTN