ID EN
#Engineering

IMCOS

Excel Functions

Get cosine of complex number.

Syntax

EXCEL
=IMCOS(complex_num)

Arguments

Parameter Description
complex_num The complex number in the form "x+yi".

Return Value

Returns the cosine of the complex number.

Details

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. 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. Mathematically, the cosine of a complex number can be represented using a combination of the standard and hyperbolic trigonometric functions. If B6 contains a complex number in the form "x+yi", this is equivalent to the following formula. Alternatively, the cosine of a complex number can also be represented using the exponent

Examples

Example 1

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

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

Given real number input, the function behaves like the cosine function. For instance, when π/2 + 0i is provided as input, the function returns -3.4914

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

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

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

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

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

See Also

IMSIN COMPLEX IMREAL IMAGINARY COS