IMCOT in Google Sheets: Check Cotangent Signs across Complex Inputs
Calculate complex cotangent in Google Sheets, compare complete sine and cosine quotients and validate reciprocal and square identities.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: IMCOT(number) calculates complex cotangent. For =IMCOT("0.75+0.25i"), independently expected coefficients are approximately 0.943803190 and −0.493046500.
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 IMCOT reference. Documentation and independent models, with no native Sheets execution or wider client certification.
Syntax and accepted input forms
=IMCOT(number)
Google permits a COMPLEX result, real numeric input interpreted with imaginary part zero, or numeric x+yi text. Its real-number example is a documented input form, rather than an inferred coercion from another product.
Cotangent is mathematically cosine divided by sine. It is not inverse tangent, and it is distinct from IMCOTH, which divides the corresponding hyperbolic functions.
Invalid complex input produces a documented error. The dedicated page leaves the error code and a complete blank/logical/mixed-representation matrix unspecified.
Example 1: build a signed input table
Enter only the first two numeric columns in A2:B5. Put =COMPLEX(A2,B2) in C2 and =IMCOT(C2) in D2, filling down. Extract with IMREAL and IMAGINARY into E and F.
| A, real input | B, imaginary input | Expected real output | Expected imaginary output |
|---|---|---|---|
| 0.75 | 0.25 | 0.943803190 | -0.493046500 |
| 0.75 | 1.5 | 0.099780183 | -1.002095658 |
| -0.75 | 0.25 | -0.943803190 | -0.493046500 |
| 0 | 0.25 | 0 | -4.082988165 |
The final columns are explanatory nine-decimal expectations, not extra worksheet inputs. Keep the calculated complex D values for later checks.
The purely imaginary final input produces a negative imaginary result. Taking ordinary COT of the input magnitude would lose this direction and sign.
Example 2: divide complete cosine by sine
For the same rows, compare:
=IMDIV(IMCOS(C2),IMSIN(C2))
The independently expected quantities match D. IMCOS and IMSIN give complete complex values, and IMDIV combines both coordinates during division.
For the first input, cosine has coefficients approximately 0.754673484−0.172190346i, while sine has approximately 0.703051146+0.184833620i. Their quotient requires the denominator’s squared magnitude and cross terms.
Compare both extracted components within a stated tolerance, such as 1E-9 for this moderate fixture. A ratio using only the real coordinates does not test the same function.
Advanced example: reconstruct the double-angle model
An independent expression for cotangent of a+bi uses denominator COSH(2b)−COS(2a). Its real numerator is SIN(2a), while its imaginary numerator is negative SINH(2b).
For the first row, calculate:
=SIN(1.5)/(COSH(0.5)-COS(1.5))
=-SINH(0.5)/(COSH(0.5)-COS(1.5))
Expected coefficients are 0.943803190 and −0.493046500. This is an independently derived equation, not a formula printed by the dedicated Google reference.
The imaginary minus sign and the subtraction in the denominator are essential. Replacing them with a tangent or hyperbolic-cotangent expression calculates a different quantity.
Advanced example: test reciprocal recovery
Multiply IMCOT(C2) by IMTAN(C2) using IMPRODUCT. For each selected nonsingular row, the independent target is one with zero imaginary coefficient.
A second check compares one plus the complete cotangent square with the complete IMCSC square:
=IMSUM(IMPRODUCT(IMCOT(C2),IMCOT(C2)),COMPLEX(1,0))
=IMPRODUCT(IMCSC(C2),IMCSC(C2))
For the first row, both quantities have coefficients approximately 1.647669611−0.930677719i. Before adding one, the cotangent square is approximately 0.647669611−0.930677719i.
Use complete complex products rather than squares of magnitudes. Rounding intermediate coefficients before multiplying also weakens the check.
Real and imaginary axes
Numeric =IMCOT(0.5) has independent target approximately 1.830487722, representing a half-radian real angle. An imaginary input 0.25i instead gives approximately −4.082988165i, following cot(bi)=−i/TANH(b).
For comparison, hyperbolic cotangent at 0.25i has imaginary coefficient approximately −3.916317365. These are distinct functions even though the values are nearby.
Complete negation negates cotangent; conjugation conjugates its result. Adding PI() to the real coordinate preserves the mathematical function, but numerical tests should compare coefficients within a tolerance rather than demand identical display strings.
Poles and official controls
Google’s =IMCOT(3.5) example is approximately 2.66961648496887, and its constructed 4+i example has coefficients approximately 0.253182007063936−0.928132757303418i. Independent complete division agrees.
The mathematical poles are real integer multiples of pi where sine is zero. The dedicated page does not specify exact native zero-input errors or finite-PI boundary behavior. Those cases, extreme numerical limits and undocumented coercions remain unverified; the general invalid-input error statement does not supply a universal error code.
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.