Quadratic Equation with Complex Coefficients

Description

By Eddie Shore, December 2011 (Eddie's Math and Calculator Blog)

The following equation solves the quadratic equation:

A × Z2 + B × Z + C = 0

where A, B, C, and Z are complex numbers.

The roots are:

    -B ± √(B2 - 4·A·C)
Z = ——————————————————
            2A


A = R0 + R1i
B = R2 + R3i
C = R4 + R5i
Root 1 = R6 + R7i
Root 2 = R8 + R9i

Instructions:
  1. Store the real and imaginary parts of A, B, and C. See the above for the appropriate registers.
  2. Press f A
  3. The real part of Root 1 is displayed. Press R/S.
  4. The imaginary part of Root 1 is displayed. Press R/S.
  5. The real part of Root 2 is displayed. Press R/S.
  6. The imaginary part of Root 2 is displayed.
Example 1:
Numbers:
A = 2 + 3i
B = -3 - 4i
C = 2i

Registers:
R0 = 2
R1 = 3
R2 = -3
R3 = -4
R4 = 0
R5 = 2

Root 1 ≈ 0.2578 + 0.3769i
Root 2 ≈ 1.1268 - 0.4538i

Example 2:
Numbers:
A = -4 + 5i
B = 3
C = 2√2 - 3i

Registers:
R0 = -4
R1 = 5
R2 = 3
R3 = 0
R4 = 2√2 (2 [ENTER] [ √ ] [ × ])
R5 = -3

Root 1 ≈ -0.6500 + 0.1165i
Root 2 ≈ 0.9427+ 0.2493i

Program Resources

Labels

Name Description
 A
 0
 1

Storage Registers

Name Description Name Description
 0 real part of A  5 imaginary part of C
 1 imaginary part of A  6 real part of root 1
 2 real part of B  7 imaginary part root 1
 3 imaginary part of B  8 real part of root 1
 4 real part of C  9 imaginary part root 2

Flags

Number Description
8

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 018 44 9 STO 9 036 43 11 g
001 42,21,11 f LBL A 019 31 R/S 037 40 +
002 43, 4, 8 g SF 8 020 42 30 f Re↔Im 038 11 √x̅
003 32 0 GSB 0 021 43 32 g RTN 039 43 32 g RTN
004 32 1 GSB 1 022 42,21, 0 f LBL 0 040 42,21, 1 f LBL 1
005 44 6 STO 6 023 45 0 RCL 0 041 45 2 RCL 2
006 31 R/S 024 45 1 RCL 1 042 16 CHS
007 42 30 f Re↔Im 025 42 25 f I 043 45 3 RCL 3
008 44 7 STO 7 026 45 4 RCL 4 044 16 CHS
009 31 R/S 027 45 5 RCL 5 045 42 25 f I
010 32 0 GSB 0 028 42 25 f I 046 40 +
011 1 1 029 20 × 047 2 2
012 16 CHS 030 4 4 048 10 ÷
013 20 × 031 16 CHS 049 45 0 RCL 0
014 32 1 GSB 1 032 20 × 050 45 1 RCL 1
015 44 8 STO 8 033 45 2 RCL 2 051 42 25 f I
016 31 R/S 034 45 3 RCL 3 052 10 ÷
017 42 30 f Re↔Im 035 42 25 f I 053 43 32 g RTN