Working with exponential decay, Fourier transforms, transmission line impedances, and acoustic wave equations requires evaluating exponential and logarithmic functions over complex numbers (values consisting of real and imaginary parts, \(z = x + yi\)). In conventional mathematics, taking the logarithm of negative or complex values is undefined on the real number line, causing standard spreadsheet functions like LN or EXP to fail. Microsoft Excel provides four specialised engineering functions to manage these operations: IMEXP, IMLN, IMLOG10, and IMLOG2.
Mathematical Principles of Complex Exponentials and Logarithms
These functions follow Euler’s formula and complex analytical branch definitions:
- IMEXP: Calculates the natural exponential \(e^z\) for complex \(z = x + yi\): \[ e^{x + yi} = e^x (\cos(y) + i\sin(y)) \]
- IMLN: Computes the principal natural logarithm (base \(e\)) of a complex number: \[ \ln(z) = \ln|z| + i \arg(z) \] where \(|z| = \sqrt{x^2 + y^2}\) and \(\arg(z)\) is the phase angle in radians within \((-\pi, \pi]\).
- IMLOG10: Computes the common logarithm (base 10) of a complex number using change-of-base: \[ \log_{10}(z) = \frac{\ln(z)}{\ln(10)} \]
- IMLOG2: Computes the binary logarithm (base 2) of a complex number: \[ \log_2(z) = \frac{\ln(z)}{\ln(2)} \]
Function Syntax and Arguments
Each function takes a single argument:
=IMEXP(inumber)
=IMLN(inumber)
=IMLOG10(inumber)
=IMLOG2(inumber)
- inumber: A complex number entered as text in the format
"x+yi"or"x+yj", or a reference to a cell containing a formatted complex number. Real numbers entered as plain digits are automatically treated as having an imaginary coefficient of zero (\(x + 0i\)).
Practical Examples in Microsoft Excel
1. Calculating Complex Exponentials with IMEXP
Euler’s famous identity states that \(e^{i\pi} = -1\). You can verify this in Excel:
- In cell
A2, construct the imaginary value using theCOMPLEXfunction:
Excel returns=COMPLEX(0, PI())"3.14159265358979i". - In cell
B2, applyIMEXP:
Excel returns=IMEXP(A2)"-1"(with the imaginary component vanishing to zero).
For general numbers, such as \(z = 1 + 2i\):
=IMEXP("1+2i")
Output: -1.13120438375681 + 2.47172667200482i
2. Calculating Natural Logarithms with IMLN
Unlike standard =LN(-5) which returns a #NUM! error, IMLN properly evaluates negative real numbers by mapping them onto the complex plane:
=IMLN("-5")
Output: 1.6094379124341 + 3.14159265358979i (where the imaginary part is exactly \(\pi\)).
For a full complex coordinate like "3+4i":
=IMLN("3+4i")
Because \(|3+4i| = 5\) and \(\arg(3+4i) \approx 0.9273\) radians, the function returns:
1.6094379124341 + 0.927295218001612i
3. Base-10 and Base-2 Logarithms with IMLOG10 and IMLOG2
For telecommunications, decibel scaling, and digital signal information theory:
- To find the base-10 log of
"3+4i":
Output:=IMLOG10("3+4i")0.698970004336019 + 0.402719194901614i - To find the binary logarithm (base-2) of
"3+4i":
Output:=IMLOG2("3+4i")2.32192809488736 + 1.33780421245656i
Extracting Amplitude and Phase for Engineering Diagrams
To plot Nyquist diagrams or Bode plots from the outputs of logarithmic complex calculations, extract the components using companion functions:
| Metric Required | Excel Formula | Application |
|---|---|---|
| Real Magnitude Component | =IMREAL(IMLN(A2)) |
Attenuation in Nepers / Log gain |
| Phase Shift (Angle) | =IMAGINARY(IMLN(A2)) |
Phase displacement in radians |
| Phase in Degrees | =DEGREES(IMAGINARY(IMLN(A2))) |
Bode plot phase angle |
Troubleshooting Common Errors
- #NUM! Error: Occurs when
inumberis"0"or"0+0i"for logarithmic functions (IMLN,IMLOG10,IMLOG2), as the logarithm of zero is mathematically undefined. - #VALUE! Error: Occurs when the complex number string is formatted incorrectly (such as containing unexpected spaces, double signs, or improper letters).