Contact

IMSEC in Excel: Check Complex Secant with Reciprocal and Square Identities

Engineering Intermediate Microsoft Excel

Calculate complex secant in Excel, verify cosine denominators and compare real-angle restrictions with imaginary-axis attenuation.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: IMSEC(inumber) returns complex secant, the reciprocal of complete complex cosine. For =IMSEC("1+0.5i"), independently expected coefficients are approximately 1.081268323 and 0.778194035.

Availability and version history

  • Introduced: the Microsoft function catalogue marks this identity as an Excel 2013 addition. An exact first build or preview date is not established.
  • Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Checked: October 14, 2026; official IMSEC reference. Documentation and independent models; no native Excel execution or wider platform certification.

Syntax and argument form

=IMSEC(inumber)

Inumber is required and uses x+yi or x+yj text. Microsoft recommends COMPLEX for converting numeric real and imaginary coefficients into that representation.

Secant is not inverse cosine. The former takes a reciprocal; the latter recovers an angle under a chosen inverse convention. These operations require different formulas and are not substitutes for one another.

All worked controls here construct complex arguments explicitly, including real-axis inputs. The dedicated reference is not a complete specification of plain-number, blank or mixed-suffix coercion.

Example 1: preserve input and output coordinates

Enter only the numeric input columns in A2:B5. In C2 use =COMPLEX(A2,B2); in D2 use =IMSEC(C2). Fill down. E and F can extract the numeric coefficients with IMREAL and IMAGINARY.

A, real input B, imaginary input Expected real output Expected imaginary output
1 0.5 1.081268323 0.778194035
1 2 0.151176298 0.226973675
-1 0.5 1.081268323 -0.778194035
0 0.5 0.886818884 0

The output columns are rounded independent expectations, not input data. Retain D’s calculated value when comparing equivalent formulas.

The final value is positive and smaller than one. Real-angle secant restrictions do not prohibit it, because its argument is purely imaginary rather than a real angle.

Example 2: inspect cosine and its reciprocal

For each row, compare the result with:

=IMDIV(COMPLEX(1,0),IMCOS(C2))

IMCOS supplies the full denominator, and IMDIV calculates the complete complex reciprocal.

For the first row, cosine has squared magnitude approximately 0.563466899. If cosine has coefficients r and s, the reciprocal uses r/(r²+s²) and −s/(r²+s²).

This shared denominator explains why dividing only real parts is insufficient. The first row’s cosine has a negative imaginary coefficient, while its reciprocal has a positive one through conjugation.

A multiply-back control, =IMPRODUCT(D2,IMCOS(C2)), has mathematical target one with zero imaginary coefficient. Fill down and test both extracted components.

Advanced example: reconstruct the real-function equation

An independently derived model for secant of a+bi uses denominator COSH(2b)+COS(2a). Its real numerator is 2COS(a)COSH(b), and its imaginary numerator is 2SIN(a)SINH(b).

For the first input, use:

=2*COS(1)*COSH(0.5)/(COSH(1)+COS(2))
=2*SIN(1)*SINH(0.5)/(COSH(1)+COS(2))

The independent targets are 1.081268323 and 0.778194035. The plus in the denominator is important; switching it to minus would correspond to a different reciprocal construction.

This component derivation is a mathematical check, not an equation printed in the dedicated Microsoft article. Use moderate inputs and explicit tolerances rather than assuming every rearrangement has identical floating-point behavior.

Advanced example: verify a complete secant-square identity

For the first row, compare:

=IMSUB(IMPRODUCT(IMSEC(C2),IMSEC(C2)),IMPRODUCT(IMTAN(C2),IMTAN(C2)))

The independent target is one, with zero imaginary coefficient. The secant square has coefficients approximately 0.563555230 and 1.682873119. The tangent square has approximately −0.436444770 and 1.682873119.

Subtracting cancels the imaginary terms and leaves one. IMTAN must be squared as a complete complex quantity using IMPRODUCT. Neither the square of its real coefficient nor the square of its magnitude is the same operation.

Check component differences against an explicit tolerance such as 1E-9 for this fixture. Printed coefficients have been rounded, so do not expect identities evaluated from the rounded table to be exact.

Real-angle, imaginary-axis and symmetry controls

For a real sixty-degree angle, =IMSEC(COMPLEX(RADIANS(60),0)) has mathematical target two with imaginary coefficient zero.

For imaginary inputs i and 2i, the independent real outputs are approximately 0.648054274 and 0.265802229, with imaginary coefficient zero. These are reciprocals of COSH(1) and COSH(2).

Complete input negation leaves secant unchanged. For the first row, test =IMSEC(COMPLEX(-1,-0.5)). Conjugating the first input instead changes only the sign of the output’s imaginary coefficient.

These checks distinguish even symmetry from conjugation and expose a common sign error in manually assembled reciprocals.

Errors and mathematical poles

Microsoft specifies #NUM! for unsupported complex-text format and #VALUE! for logical input. Its =IMSEC("4+3i") example has coefficients approximately −0.0652940278579471 and −0.0752249603027732, consistent with independent division.

Cosine has mathematical zeros at real pi/2 plus integer multiples of pi. The dedicated page does not establish native errors or exact outcomes at floating approximations to those points. Keep these pole cases separate from its explicit malformed-input errors.

Extreme overflow, underflow, mixed suffixes and a full coercion table remain unverified. Numerical component checks are preferable to promises of exact output-string equality.

References and verification

Expected outputs are independently calculated examples or documented rules, not captured native Excel results. Formulas use English function names and comma argument separators. Locale, rendering and boundary restrictions are stated where relevant.