Purpose

Return value

Syntax

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

Using the IMCOS function

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. - 1

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. - 2

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
)

Purpose

Return value

Syntax

=IMCOSH(complex_num)
  • complex_num - The number to get the hyperbolic cosine of.

Using the IMCOSH function

The Excel IMCOSH function returns the hyperbolic cosine of a complex number. Given “1+1.5707963267949i” as input, the function returns “-5.4E-15+1.175201i” as output.

=IMCOSH(COMPLEX(1, PI()/2)) // returns -5.4E-15+1.175201i

When the function’s output is plotted over the complex plane, the real output along the real axis traces the shape of the COSH function.

=IMCOSH(COMPLEX(x, 0)) // returns COSH(x)

The imaginary output along the imaginary axis traces the shape of the COS function.

=IMCOSH(COMPLEX(0, y)) // returns COS(y)

Explanation

The function can be defined using the COSH , COS , SINH , and SIN functions.

The definition of the complex hyperbolic cosine function. - 3