Yes it is possible, but who wants to calculate the square root of –1 every time, to have i?
We can use the COMPLEX function to take register y and register x of the stack and create a
complex number y + ix. Again unlike HP-33S almost all the functions of the HP-42S fully support
complex numbers.
Example: Show that i
2
is √–1.
Solution: 0 ENTER 1 COMPLEX x
2
which gives -1.0000 i0.0000 (means -1).
5.2 Complex numbers in polar coordinates
When representing a point in R
2
we can use any kind of coordinate system. The most commonly used
are the rectangular (or Cartesian system) which use the usual coordinates x and y and the polar system
which use the coordinates r and θ. The relationship between them is x = r cos θ, y = r sin θ and
r =
(x
2
+ y
2
)
1/2
, θ = tan
–1
y/x. When dealing with complex numbers we can think of the real axis as being
the x axis and the imaginary axis as being the y axis in Cartesian coordinates, or we can use also polar
coordinates. In this case i will be r = 1 and θ = π/2 (90°).To change between rectangular or polar
modes use RECT and POLAR in the MODES menu.
6 Programming
Programming the HP-42S is very simple and very versatile. It does not use the RPL style of the HP-
48 or HP-49. You program in the same way you use the calculator and unlike some non-HP cheaper
calculators, all the steps are shown in the display and in numbered lines.
6.1 Basic programming
Let's imagine you want to make a given calculation. For example: Suppose you want to solve a
equation x
2
–5x + 4 = 0 which is of the form ax
2
+ bx + c = 0. As you know the solution for this kind
of equation is
a
b
x
2
Δ±−
=
where Δ = b
2
– 4ac. Let's suppose a, b and c are in R
00
, R
01
and R
02
respectively and we are going to
use R
03
for ∆. To solve this equation using HP-42S/Free42 we just do
RCL 01 (This is b)
x
2
4
RCL 00 (This is a)
RCL 02 (This is c, keep in mind we have only four lines in the stack)
×
×
–
STO 03 (This is ∆)
Unlike some other models, say 33S, we don't need to worry whether ∆ is negative. But we save the
square root for later because in R
03
the number cannot be complex. (otherwise we would need to store
it in a normal memory)
Now we calculate the first root
RCL 01