Summary

The Excel IMCOS function returns the cosine of a complex number.

Purpose 

Get cosine of complex number.

Return value 

Returns the cosine of the complex number.

Syntax

=IMCOS(complex_num)
  • complex_num - The complex number in the form "x+yi".

How to use 

The Excel IMCOS function returns the cosine of a complex number. For instance, given “1 + 1i” as input, the function returns a complex number equal to the cosine of the input.

=IMCOS(COMPLEX(1,1)) // returns 0.833730025131149-0.988897705762865i

Given real number input, the function behaves like the cosine function. For instance, when π/2 + 0i is provided as input, the function returns -3.49148133884313E-15 (approximately zero). The cosine of π/2 is zero, but due to floating-point precision, it returns a very small number close to zero.

=IMCOS(COMPLEX(PI()/2,0)) // returns approximately 0

Explanation

Mathematically, the cosine of a complex number can be represented using a combination of the standard and hyperbolic trigonometric functions.

Cosine of a complex number.

If B6 contains a complex number in the form "x+yi", this is equivalent to the following formula.

=COMPLEX(
    COS(IMREAL(B6))*COSH(IMAGINARY(B6)),
    -SIN(IMREAL(B6))*SINH(IMAGINARY(B6))
)

Alternatively, the cosine of a complex number can also be represented using the exponential function, where "z=x+yi."

Equivalent form of cosine of a complex number using the exponential function.

If B6 contains a complex number in the form "x+yi", this is equivalent to the following formula.

=IMDIV(
    IMSUM(
        IMEXP(IMPRODUCT(COMPLEX(0,1), B6)), 
        IMEXP(IMPRODUCT(COMPLEX(0,-1), B6))
    ),
    2
)

 

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.