## How to use the IMSEC function

**What is the IMSEC function?**

The IMSEC function calculates the secant of a complex number in x + yi or x + yj text format.

The letter j is used in electrical engineering to distinguish between the imaginary value and the electric current.

**What is a complex number?**

**What is a secant?**

The trigonometric secant is a function that defines an angle of a right-angled triangle to the ratio of the hypotenuse to the adjacent side. It is also the inverse of the cosine, sec(Î¸) = 1/cos(Î¸).

**What is the difference between a secant and a complex secant?**

The difference between secant and secant for complex numbers is that the former is defined for real numbers, while the latter is defined for complex numbers.

The secant of a real number x is defined as sec(Î¸) = 2/(e^{Î¸} + e^{-Î¸})

Natural number e is the base of the natural logarithm.

The secant of a complex number z = x + yi is defined as sec(x + yi) = (cos x cos y + isin x sinh y) / (cos^{2} x cosh^{2} y+ sin^{2} x sinh^{2} y)

Complex numbers has i as the imaginary unit.

### Table of Contents

## 1. IMSEC Function Syntax

IMSEC(*inumber*)

## 2. IMSEC Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

## 3. IMSEC function example

The image above shows a formula in cell B28 that calculates the cotangent of a complex number specified in cell B25.

Cell C28 calculates the real number from the complex number in cell B28. Cell D28 extracts the imaginary number from the complex number specified in cell B28.

The real and imaginary numbers separated in a cell each allow us to graph the complex number on the complex plane.

Formula in cell B28:

The chart above shows the complex plane, the y-axis is the imaginary axis and the x-axis is the real axis.

Complex number 2+i is the light blue line in the first quadrant. The complex secant of 2+i is the green line located in the second quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSEC(*inumber*)

becomes

IMSEC(B25)

#### Step 2 - Evaluate the IMSEC function

IMSEC(B25)

becomes

IMSEC("1+2i")

and returns

-0.41314934426694+0.687527438655479i

## 4. How is the IMSEC function calculated in detail?

The secant of a complex number is calculated like this:

C = x + yi

IMSEC(C) = (cos x cosh y + isin x sinh y) / (cos^{2} x cosh^{2} y+ sin^{2} x sinh^{2} y)

For example, C=2+i

IMSEC(2+i) = (cos 2 cosh 1 + isin 2 sinh 1) / (cos^{2} 2 cosh^{2} 1+ sin^{2} 2 sinh^{2} 1)

becomes

IMSEC(2+i) = (-0.416146836547142*1.54308063481524 + i0.909297426825682*1.1752011936438) / (0.173178189568194*2.38109784554182+ 0.826821810431806*1.38109784554182)

becomes

IMSEC(2+i) = (-0.64214812471552 + i1.06860742138278) / (0.412354214075659+ 1.14192182103435)

equals

IMSEC(2+i) = -0.41314934426694+0.687527438655479i

## 5. IMSEC function not working - #NUM error

The IMSEC function returns a #NUM error if the provided argument is not a valid complex number.

### Useful links

IMSEC function - Microsoft

Secant of Complex Number

Complex number - Wikipedia

### Functions in 'Engineering' category

The IMSEC function function is one of many functions in the 'Engineering' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form