Contact

IMSEC in Google Sheets: Inspect Complex Secant through Cosine Reciprocals

Engineering Intermediate Google Sheets

Calculate complex secant in Google Sheets, inspect sign changes in its reciprocal and verify component and complete-square models.

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

Quick answer: IMSEC(number) returns complex secant. =IMSEC("0.75+0.25i") has independently expected coefficients approximately 1.259507143 and 0.287375899.

Availability and version history

  • Introduced: first introduction date is not established by the reviewed official history; no desktop release number is inferred.
  • Availability: documented in the rolling Google Sheets service; these examples use the web worksheet workflow.
  • Checked: October 14, 2026; official IMSEC reference. Documentation and independent models, with no native Sheets execution or wider client certification.

Syntax and the reciprocal meaning

=IMSEC(number)

Google permits a real numeric value, a COMPLEX result or numeric x+yi text. The imaginary coefficient of a real numeric value is zero. A complex result that looks scalar does not establish a native TYPE classification here.

Secant is the reciprocal of complete cosine, not inverse cosine. It is also distinct from IMSECH, which uses hyperbolic cosine.

The source says invalid complex input produces an error but does not identify the code or cover every text, logical and blank conversion.

Example 1: calculate signed output coordinates

Enter the first two numeric columns in A2:B5. Use =COMPLEX(A2,B2) in C2 and =IMSEC(C2) in D2, filling down. Extract the real and imaginary output coefficients into E:F with IMREAL and IMAGINARY.

A, real input B, imaginary input Expected real output Expected imaginary output
0.75 0.25 1.259507143 0.287375899
0.75 1.5 0.339547082 0.286317273
-0.75 0.25 1.259507143 -0.287375899
0 0.25 0.969543629 0

The expected columns are rounded independent calculations, not input data to paste into A:B. Preserve calculated D values for the following controls.

The final purely imaginary input gives a real result below one. Restrictions for secant of a real angle do not apply to arbitrary complex inputs.

Example 2: inspect cosine before division

Compare the calculated secant with:

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

The independent expected quantities match D for all selected rows. IMCOS produces the first denominator, approximately 0.754673484−0.172190346i for C2.

Its squared magnitude is approximately 0.599181583. The reciprocal divides the conjugate coefficients by that shared value, giving the positive imaginary coefficient in the first secant result.

Dividing only real parts would lose the imaginary contribution to the denominator. Use IMDIV for the complete operation.

Advanced example: rebuild coefficients with real functions

An independent component expression uses denominator COSH(2b)+COS(2a), real numerator 2COS(a)COSH(b), and imaginary numerator 2SIN(a)SINH(b).

For the first row:

=2*COS(0.75)*COSH(0.25)/(COSH(0.5)+COS(1.5))
=2*SIN(0.75)*SINH(0.25)/(COSH(0.5)+COS(1.5))

Expected coefficients are 1.259507143 and 0.287375899. This equation is independently derived; the dedicated Google source names the function and shows controls rather than displaying this expansion.

The denominator has a plus, and the imaginary numerator is positive. Small sign changes produce a different reciprocal. Check both component differences within a stated tolerance such as 1E-9 for this moderate dataset.

Advanced example: multiply back and retain complete squares

For every primary row, =IMPRODUCT(D2,IMCOS(C2)) has mathematical target one with imaginary coefficient zero.

Another control compares complete secant squared minus complete IMTAN squared:

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

The same independent target is one. For the first input, secant squared has coefficients approximately 1.503773336+0.723903996i; tangent squared has approximately 0.503773336+0.723903996i.

The imaginary terms cancel. Squaring only IMABS of each quantity is not this identity, because it discards phase and the imaginary cross terms.

Real-angle and imaginary-axis controls

Google’s numeric-input support permits =IMSEC(RADIANS(60)). The mathematical target is two. Convert degree measurements before passing them as real radian angles.

For imaginary input 0.25i, the expected real result is approximately 0.969543629. At 2i it is approximately 0.265802229. These are reciprocals of COSH(0.25) and COSH(2), explaining the values below one.

Complete input negation leaves secant unchanged. Conjugating an input instead conjugates the output. Comparing those two transformations helps detect a mistaken conjugate in a manual reciprocal calculation.

Poles and official source controls

The documented numeric =IMSEC(3.5) control is approximately −1.06785504719181. Its 3+2i control has coefficients approximately −0.263512975158389+0.0362116365587685i, corroborated independently.

Mathematical cosine zeros occur at real pi/2 plus integer multiples of pi, where secant is undefined. The dedicated page does not assign a native pole error or establish the result of finite PI()-based approximations.

Mixed representations, blank or logical coercion, extreme overflow and underflow remain unverified. Use explicit component tolerances for the worked cases rather than promising exact native output-string equality.

References and verification

Examples use fictional data, English function names and comma separators. Expected outputs are independent mathematical calculations or explicitly documented rules, not native Sheets captures. Check the spreadsheet locale when reproducing punctuation-sensitive formulas.