The IMCOSH function in Google Sheets returns the hyperbolic cosine of a complex number. For example, =IMCOSH("1+2i") returns -0.64214812471552+1.06860742138278i. This function is part of the Engineering category and is useful for advanced mathematical, physics, or engineering calculations involving complex numbers.
What Is IMCOSH?
IMCOSH is a built-in Google Sheets function that computes the hyperbolic cosine of a complex number. The hyperbolic cosine is a mathematical function defined as cosh(z) = (e^z + e^(-z)) / 2, where z is a complex number. In Google Sheets, the function takes a single argument, number, which must be a complex number in the form a+bi or a+bj (either i or j is accepted as the imaginary unit). The result is also a complex number, expressed in the same format.
How to Use IMCOSH in Google Sheets
Using IMCOSH is straightforward:
- Click on a cell where you want the result.
- Type
=IMCOSH(. - Enter a complex number as a string in quotes, or reference a cell that contains a complex number as text.
- Close the parenthesis and press Enter.
For example, if cell A1 contains 2+3i, the formula =IMCOSH(A1) returns -3.72454550491532+0.511822569987385i. If you type the number directly, use quotes: =IMCOSH("2+3i").
IMCOSH Syntax and Arguments
The syntax is: IMCOSH(number)
- number (required): The complex number for which you want the hyperbolic cosine. It must be a valid complex number string like
"3+4i"or a reference to a cell containing such a string.
If the number is not a valid complex number, Google Sheets returns a #NUM! error. If the argument is a real number (e.g., 2), it is treated as a complex number with zero imaginary part, so =IMCOSH(2) returns 3.76219569108363 (as a real number, but formatted as a complex number without the imaginary part).
How IMCOSH Works: The Math Behind It
For a complex number z = x + yi, the hyperbolic cosine is defined as:
cosh(z) = cosh(x)cos(y) + i sinh(x)sin(y)
This formula uses the real hyperbolic cosine and sine, and the real cosine and sine. Google Sheets implements this internally, so you don’t need to manually break down the complex number. The result is returned as a complex number string. For instance, for 1+2i, the calculation yields approximately -0.6421 + 1.0686i, matching the example above.
Common Errors and Troubleshooting
- #NUM! error: Occurs if the argument is not a valid complex number. Check that you have used quotes around a direct entry, or that the referenced cell contains a valid complex string like
2+3i(no spaces). - #VALUE! error: Occurs if the argument is a cell reference that is empty or contains non-text data that can’t be interpreted as a complex number.
- Using lowercase i or j: Both are accepted, but be consistent. If you use
j, the output will also usej.
IMCOSH vs. Other Complex Functions
Google Sheets offers a suite of complex number functions under the Engineering category. IMCOSH is specifically for hyperbolic cosine. Related functions include:
IMSINH: hyperbolic sineIMTANH: hyperbolic tangentIMCOS: cosine (not hyperbolic)IMSIN: sineIMEXP: exponential
These functions all take a complex number and return a complex number. They are useful for solving AC circuit problems, signal processing, and other engineering applications.
Real-World Applications of IMCOSH
Hyperbolic functions of complex numbers appear in many technical fields:
- Electrical engineering: Analyzing transmission lines, impedance, and AC circuits using complex impedance.
- Physics: Solving wave equations and quantum mechanics problems.
- Control systems: Stability analysis using complex frequency domain.
- Fluid dynamics: Potential flow calculations.
For example, if you are calculating the propagation constant of a transmission line, you might need cosh(γl) where γ is complex. IMCOSH lets you do this directly in a spreadsheet.
Frequently Asked Questions
Can I use IMCOSH with a real number?
Yes. If you supply a real number like 2, Google Sheets treats it as a complex number with zero imaginary part. The result will be the real hyperbolic cosine of 2, approximately 3.76219569108363.
What is the difference between IMCOSH and COSH?
COSH works only with real numbers and returns a real number. IMCOSH accepts complex numbers and returns a complex result. If you have a real number, you can use either, but COSH is simpler and faster.
Why does my IMCOSH return a #NUM! error?
This usually means the argument is not a valid complex number. Ensure you have no spaces, and if typing directly, enclose the number in quotes. For example, =IMCOSH("1+2i") works, but =IMCOSH(1+2i) will be interpreted as a formula and fail.
Can I use IMCOSH in Excel?
Yes, Excel has the same function with the same syntax. However, in Excel, you must also use quotes around the complex number. The function is available in Excel 2013 and later.
How do I convert the result to a decimal number?
The result is already a decimal number, but it is displayed as a complex number string. To extract the real part, you can use =IMREAL(IMCOSH("1+2i")), and for the imaginary part, use =IMAGINARY(IMCOSH("1+2i")).
Does IMCOSH accept uppercase I or J?
Yes, Google Sheets accepts both uppercase and lowercase i and j. The output will use the same letter you used in the input.
Related
- Random 15 Digit Number: How to Generate One
- Data Entry Jobs Online From Home for Students
- Group and Ungroup in Excel: Rows, Columns & Sheets
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Balance Sheet Components: Assets, Liabilities, EquityThe balance sheet has three core components: assets, liabilities, and shareholders’ equity. These three sections always balance according…
- Conditional Formatting in Excel With ColorsIn Excel for Microsoft 365 on Windows, select the cells, then choose Home > Conditional Formatting and pick…
- Microsoft Excel Debt Payoff Template: Build a Reliable PlanA Microsoft Excel debt payoff template can track each balance, interest rate, minimum payment, and planned payment, then…
- Excel Group/Ungroup Shortcut: Keys, Steps, and FixesIn Excel for Microsoft 365 on Windows, select the rows or columns and press Alt+Shift+Right Arrow to group…
- How to Schedule an Email Invite in Outlook for LaterTo schedule a meeting invitation in Outlook, create a calendar event, set its date and time, add attendees,…
- How to Create Address Labels in WordIn Microsoft Word for Microsoft 365 on Windows, go to Mailings > Start Mail Merge > Labels, choose…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.