f(z) Complex Numbers and Functions Tech Note Complex Hyperbolic Functions

This page shows how to compute several complex hyperbolic functions, including hyperbolic cosine, hyperbolic sine, hyperbolic tangent, hyperbolic secant, hyperbolic cosecant, and hyperbolic cotangent.

CCosh:  Complex hyperbolic cosine

CCosh function

 // z   = cosh(a) FUNCTION CCosh (CONST a:  TComplex):  TComplex;   VAR     aTemp:  TComplex; BEGIN  // Abramowitz formula 4.5.50 on p. 84   aTemp := CConvert (a,cfRectangular);   RESULT := CSet(COSH(aTemp.x)*COS(aTemp.y),                  SINH(aTemp.x)*SIN(aTemp.y)) END {CCosh};

Examples

 Complex hyperbolic cosine:  CCosh = Cosh(z)                                COSH(z)                          COSH(z)           z                rectangular                        polar      ------------  ----------------------------   --------------------------------  1    0.0 +  0.0i   1.000000000 +  0.000000000i   1.000000000 * CIS(  0.000000000)  2    0.5 +  0.5i   0.989584883 +  0.249826398i   1.020632877 * CIS(  0.247288622)  3   -0.5 +  0.5i   0.989584883 -  0.249826398i   1.020632877 * CIS( -0.247288622)  4   -0.5 -  0.5i   0.989584883 +  0.249826398i   1.020632877 * CIS(  0.247288622)  5    0.5 -  0.5i   0.989584883 -  0.249826398i   1.020632877 * CIS( -0.247288622)  6    1.0 +  0.0i   1.543080635 +  0.000000000i   1.543080635 * CIS(  0.000000000)  7    1.0 +  1.0i   0.833730025 +  0.988897706i   1.293454455 * CIS(  0.870327425)  8    0.0 +  1.0i   0.540302306 +  0.000000000i   0.540302306 * CIS(  0.000000000)  9   -1.0 +  1.0i   0.833730025 -  0.988897706i   1.293454455 * CIS( -0.870327425) 10   -1.0 +  0.0i   1.543080635 -  0.000000000i   1.543080635 * CIS(  0.000000000) 11   -1.0 -  1.0i   0.833730025 +  0.988897706i   1.293454455 * CIS(  0.870327425) 12    0.0 -  1.0i   0.540302306 +  0.000000000i   0.540302306 * CIS(  0.000000000) 13    1.0 -  1.0i   0.833730025 -  0.988897706i   1.293454455 * CIS( -0.870327425) 14    5.0 +  0.0i  74.209948525 +  0.000000000i  74.209948525 * CIS(  0.000000000) 15    5.0 +  3.0i -73.467292213 + 10.471557675i  74.209814346 * CIS(  3.000012685) 16    0.0 +  3.0i  -0.989992497 +  0.000000000i   0.989992497 * CIS(  3.141592654) 17   -5.0 +  3.0i -73.467292213 - 10.471557675i  74.209814346 * CIS( -3.000012685) 18   -5.0 +  0.0i  74.209948525 -  0.000000000i  74.209948525 * CIS(  0.000000000) 19   -5.0 -  3.0i -73.467292213 + 10.471557675i  74.209814346 * CIS(  3.000012685) 20    0.0 -  3.0i  -0.989992497 +  0.000000000i   0.989992497 * CIS( -3.141592654) 21   -5.0 -  3.0i -73.467292213 + 10.471557675i  74.209814346 * CIS(  3.000012685)

CSinh: Complex hyperbolic sine

CSinh function

 // z   = sinh(a) FUNCTION CSinh (CONST a:  TComplex):  TComplex;   VAR     aTemp:  TComplex; BEGIN  // Abramowitz formula 4.5.49 on p.84   aTemp := CConvert (a,cfRectangular);   RESULT := CSet(SINH(aTemp.x)*COS(aTemp.y),                  COSH(aTemp.x)*SIN(aTemp.y)) END {CSinh};

The table below, in addition to showing the complex sinh function, also shows the results of the computation, cosh2(z) - sinh2(z), which is from the mathematical identity cosh2(z) - sinh2(z) = 1.

Examples

 Complex hyperbolic sine:  CSinh = Sinh(z)                                SINH(z)               COSH^2(z) + SINH^2(z) = 1           z                rectangular                    rectangular      ------------  ----------------------------   ---------------------------  1    0.0 +  0.0i   0.000000000 +  0.000000000i   1.000000000 +  0.000000000i  2    0.5 +  0.5i   0.457304153 +  0.540612686i   1.000000000 +  0.000000000i  3   -0.5 +  0.5i  -0.457304153 +  0.540612686i   1.000000000 +  0.000000000i  4   -0.5 -  0.5i  -0.457304153 -  0.540612686i   1.000000000 +  0.000000000i  5    0.5 -  0.5i   0.457304153 -  0.540612686i   1.000000000 +  0.000000000i  6    1.0 +  0.0i   1.175201194 +  0.000000000i   1.000000000 +  0.000000000i  7    1.0 +  1.0i   0.634963915 +  1.298457581i   1.000000000 +  0.000000000i  8    0.0 +  1.0i   0.000000000 +  0.841470985i   1.000000000 +  0.000000000i  9   -1.0 +  1.0i  -0.634963915 +  1.298457581i   1.000000000 +  0.000000000i 10   -1.0 +  0.0i  -1.175201194 +  0.000000000i   1.000000000 +  0.000000000i 11   -1.0 -  1.0i  -0.634963915 -  1.298457581i   1.000000000 +  0.000000000i 12    0.0 -  1.0i   0.000000000 -  0.841470985i   1.000000000 +  0.000000000i 13    1.0 -  1.0i   0.634963915 -  1.298457581i   1.000000000 +  0.000000000i 14    5.0 +  0.0i  74.203210578 +  0.000000000i   1.000000000 +  0.000000000i 15    5.0 +  3.0i -73.460621696 + 10.472508534i   1.000000000 +  0.000000000i 16    0.0 +  3.0i   0.000000000 +  0.141120008i   1.000000000 +  0.000000000i 17   -5.0 +  3.0i  73.460621696 + 10.472508534i   1.000000000 +  0.000000000i 18   -5.0 +  0.0i -74.203210578 +  0.000000000i   1.000000000 +  0.000000000i 19   -5.0 -  3.0i  73.460621696 - 10.472508534i   1.000000000 +  0.000000000i 20    0.0 -  3.0i   0.000000000 -  0.141120008i   1.000000000 +  0.000000000i 21   -5.0 -  3.0i  73.460621696 - 10.472508534i   1.000000000 +  0.000000000i

CTanh:  Complex hyperbolic tangent

CTanh function

 // z   = tanh(a) FUNCTION CTanh (CONST a:  TComplex):  TComplex;   VAR     aTemp:  TComplex;     temp :  TReal; BEGIN  // Abramowitz formula 4.5.51 on p. 84   aTemp := CConvert (a,cfRectangular);   temp := COSH(2.0*aTemp.x) + COS(2.0*aTemp.y);   TRY     RESULT := CSet(SINH(2.0*aTemp.x)/temp,                    SIN(2.0*aTemp.y) /temp)   EXCEPT     RESULT := CSet( SignedInfinity(SINH(2.0*aTemp.x)),                     SignedInfinity(SIN(2.0*aTemp.y)) );   END END {CTanh};

The table below show the computation of tanh(z) directly and via calculation as sinh(z)/cosh(z).

Examples

 Complex hyperbolic tangent:  CTanh = Tanh(z) = Sinh(z)/Cosh(z)                                TANH(z)                   SINH(z) / COSH(z)           z                rectangular                   rectangular      ------------  ----------------------------   ---------------------------  1    0.0 +  0.0i   0.000000000 +  0.000000000i   0.000000000 +  0.000000000i  2    0.5 +  0.5i   0.564083141 +  0.403896455i   0.564083141 +  0.403896455i  3   -0.5 +  0.5i  -0.564083141 +  0.403896455i  -0.564083141 +  0.403896455i  4   -0.5 -  0.5i  -0.564083141 -  0.403896455i  -0.564083141 -  0.403896455i  5    0.5 -  0.5i   0.564083141 -  0.403896455i   0.564083141 -  0.403896455i  6    1.0 +  0.0i   0.761594156 +  0.000000000i   0.761594156 +  0.000000000i  7    1.0 +  1.0i   1.083923327 +  0.271752585i   1.083923327 +  0.271752585i  8    0.0 +  1.0i   0.000000000 +  1.557407725i   0.000000000 +  1.557407725i  9   -1.0 +  1.0i  -1.083923327 +  0.271752585i  -1.083923327 +  0.271752585i 10   -1.0 +  0.0i  -0.761594156 +  0.000000000i  -0.761594156 +  0.000000000i 11   -1.0 -  1.0i  -1.083923327 -  0.271752585i  -1.083923327 -  0.271752585i 12    0.0 -  1.0i   0.000000000 -  1.557407725i   0.000000000 -  1.557407725i 13    1.0 -  1.0i   1.083923327 -  0.271752585i   1.083923327 -  0.271752585i 14    5.0 +  0.0i   0.999909204 +  0.000000000i   0.999909204 +  0.000000000i 15    5.0 +  3.0i   0.999912820 -  0.000025369i   0.999912820 -  0.000025369i 16    0.0 +  3.0i   0.000000000 -  0.142546543i   0.000000000 -  0.142546543i 17   -5.0 +  3.0i  -0.999912820 -  0.000025369i  -0.999912820 -  0.000025369i 18   -5.0 +  0.0i  -0.999909204 +  0.000000000i  -0.999909204 +  0.000000000i 19   -5.0 -  3.0i  -0.999912820 +  0.000025369i  -0.999912820 +  0.000025369i 20    0.0 -  3.0i   0.000000000 +  0.142546543i   0.000000000 +  0.142546543i 21   -5.0 -  3.0i  -0.999912820 +  0.000025369i  -0.999912820 +  0.000025369i

CSech: Complex hyperbolic secant

CSech function

 // z   = sech(a) FUNCTION CSech (CONST a:  TComplex):  TComplex;   VAR     aTemp:  TComplex; BEGIN  // Abramowitz formula 4.5.5 on p. 83   aTemp := CCosh(a);   TRY     RESULT := CDiv(ComplexOne, aTemp)   EXCEPT     ON EComplexZeroDivide DO        RESULT := CSet(PositiveInfinity, PositiveInfinity);     ON EComplexInvalidOp DO        RESULT := CSet(PositiveInfinity, PositiveInfinity);   END END {CSech};

The table below, in addition to showing the complex secant function, also shows the results of the mathematical identity tanh2(z) + sech2(z) = 1. [This identity is just another version of the more-recognized identity, cosh2(z) - sinh2(z) = 1. Dividing all the terms in this identity by cosh2(z), and rearranging the terms, results in the identity used below.]

Examples

 Complex hyperbolic secant:  CSech = Sech(z)                                SECH(z)               TANH^2(z) + SECH^2(z) = 1           z                rectangular                    rectangular      ------------  ----------------------------   ---------------------------  1    0.0 +  0.0i   1.000000000 +  0.000000000i   1.000000000 +  0.000000000i  2    0.5 +  0.5i   0.949978868 -  0.239827631i   1.000000000 +  0.000000000i  3   -0.5 +  0.5i   0.949978868 +  0.239827631i   1.000000000 +  0.000000000i  4   -0.5 -  0.5i   0.949978868 -  0.239827631i   1.000000000 +  0.000000000i  5    0.5 -  0.5i   0.949978868 +  0.239827631i   1.000000000 +  0.000000000i  6    1.0 +  0.0i   0.648054274 +  0.000000000i   1.000000000 +  0.000000000i  7    1.0 +  1.0i   0.498337031 -  0.591083842i   1.000000000 +  0.000000000i  8    0.0 +  1.0i   1.850815718 +  0.000000000i   1.000000000 +  0.000000000i  9   -1.0 +  1.0i   0.498337031 +  0.591083842i   1.000000000 +  0.000000000i 10   -1.0 +  0.0i   0.648054274 +  0.000000000i   1.000000000 +  0.000000000i 11   -1.0 -  1.0i   0.498337031 -  0.591083842i   1.000000000 +  0.000000000i 12    0.0 -  1.0i   1.850815718 +  0.000000000i   1.000000000 +  0.000000000i 13    1.0 -  1.0i   0.498337031 +  0.591083842i   1.000000000 +  0.000000000i 14    5.0 +  0.0i   0.013475282 +  0.000000000i   1.000000000 +  0.000000000i 15    5.0 +  3.0i  -0.013340477 -  0.001901466i   1.000000000 +  0.000000000i 16    0.0 +  3.0i  -1.010108666 +  0.000000000i   1.000000000 +  0.000000000i 17   -5.0 +  3.0i  -0.013340477 +  0.001901466i   1.000000000 +  0.000000000i 18   -5.0 +  0.0i   0.013475282 +  0.000000000i   1.000000000 +  0.000000000i 19   -5.0 -  3.0i  -0.013340477 -  0.001901466i   1.000000000 +  0.000000000i 20    0.0 -  3.0i  -1.010108666 +  0.000000000i   1.000000000 +  0.000000000i 21   -5.0 -  3.0i  -0.013340477 -  0.001901466i   1.000000000 +  0.000000000i

CCsch: Complex hyperbolic cosecant

CCsch function

 // z   = csch(a) FUNCTION CCsch (CONST a:  TComplex):  TComplex;   VAR     temp:  TComplex; BEGIN  // Abramowitz formula 4.5.4 on p. 83   temp := CSinh(a);   TRY     RESULT := CDiv(ComplexOne, temp)   EXCEPT     ON EComplexZeroDivide DO        RESULT := CSet(PositiveInfinity, PositiveInfinity);     ON EComplexInvalidOp DO        RESULT := CSet(PositiveInfinity, PositiveInfinity);   END END {CCsch};

The table below, in addition to showing the complex cosecant function, also shows the results of the mathematical identity coth2(z) - csch2(z) = 1. [This identity is just another version of the more-recognized identity, cosh2(z) - sinh2(z) = 1. Dividing all the terms in this identity by sinh2(z), and rearranging the terms, results in the identity used below.]

Examples

 Complex hyperbolic cosecant:  CCsch = Csch(z)                                CSCH(z)               COTH^2(z) - CSCH^2(z) = 1           z                rectangular                     rectangular      ------------  ----------------------------   ---------------------------  1    0.0 +  0.0i           INF +          INFi  2    0.5 +  0.5i   0.912074264 -  1.078229695i   1.000000000 +  0.000000000i  3   -0.5 +  0.5i  -0.912074264 -  1.078229695i   1.000000000 +  0.000000000i  4   -0.5 -  0.5i  -0.912074264 +  1.078229695i   1.000000000 +  0.000000000i  5    0.5 -  0.5i   0.912074264 +  1.078229695i   1.000000000 +  0.000000000i  6    1.0 +  0.0i   0.850918128 +  0.000000000i   1.000000000 +  0.000000000i  7    1.0 +  1.0i   0.303931002 -  0.621518017i   1.000000000 +  0.000000000i  8    0.0 +  1.0i   0.000000000 -  1.188395106i   1.000000000 +  0.000000000i  9   -1.0 +  1.0i  -0.303931002 -  0.621518017i   1.000000000 +  0.000000000i 10   -1.0 +  0.0i  -0.850918128 +  0.000000000i   1.000000000 +  0.000000000i 11   -1.0 -  1.0i  -0.303931002 +  0.621518017i   1.000000000 +  0.000000000i 12    0.0 -  1.0i   0.000000000 +  1.188395106i   1.000000000 +  0.000000000i 13    1.0 -  1.0i   0.303931002 +  0.621518017i   1.000000000 +  0.000000000i 14    5.0 +  0.0i   0.013476506 +  0.000000000i   1.000000000 +  0.000000000i 15    5.0 +  3.0i  -0.013341591 -  0.001901970i   1.000000000 +  0.000000000i 16    0.0 +  3.0i   0.000000000 -  7.086167396i   1.000000000 +  0.000000000i 17   -5.0 +  3.0i   0.013341591 -  0.001901970i   1.000000000 +  0.000000000i 18   -5.0 +  0.0i  -0.013476506 +  0.000000000i   1.000000000 +  0.000000000i 19   -5.0 -  3.0i   0.013341591 +  0.001901970i   1.000000000 +  0.000000000i 20    0.0 -  3.0i   0.000000000 +  7.086167396i   1.000000000 +  0.000000000i 21   -5.0 -  3.0i   0.013341591 +  0.001901970i   1.000000000 +  0.000000000i

CCoth:  Complex hyperbolic cotangent

CCoth function

 // z   = coth(a) FUNCTION CCoth (CONST a:  TComplex):  TComplex;   VAR     aTemp:  TComplex;     temp :  TReal; BEGIN  // Abramowitz formula 4.5.52 on p. 84   aTemp := CConvert (a, cfRectangular);   temp := COSH(2.0*aTemp.x) - COS(2.0*aTemp.y);   TRY     RESULT := CSet(SINH(2.0*aTemp.x)/temp,                   -SIN(2.0*aTemp.y)/temp)   EXCEPT     ON EZeroDivide DO        RESULT := CSet( SignedInfinity(SINH(2.0*aTemp.x)),                        SignedInfinity(-SIN(2.0*aTemp.y)) );     ON EInvalidOp DO        RESULT := CSet(PositiveInfinity, PositiveInfinity);   END END {CCoth};

The table below shows the computation of coth(z) directly and via calculation as cosh(z)/sinh(z).

Examples

 Complex hyperbolic cotangent:  CCoth = Coth(z) = Cosh(z)/Sinh(z)                                COTH(z)                  COSH(z) / SINH(z)           z                rectangular                  rectangular      ------------  ----------------------------   ---------------------------  1    0.0 +  0.0i           INF +          INFi           INF +          INFi  2    0.5 +  0.5i   1.171945145 -  0.839139579i   1.171945145 -  0.839139579i  3   -0.5 +  0.5i  -1.171945145 -  0.839139579i  -1.171945145 -  0.839139579i  4   -0.5 -  0.5i  -1.171945145 +  0.839139579i  -1.171945145 +  0.839139579i  5    0.5 -  0.5i   1.171945145 +  0.839139579i   1.171945145 +  0.839139579i  6    1.0 +  0.0i   1.313035285 +  0.000000000i   1.313035285 +  0.000000000i  7    1.0 +  1.0i   0.868014143 -  0.217621562i   0.868014143 -  0.217621562i  8    0.0 +  1.0i   0.000000000 -  0.642092616i   0.000000000 -  0.642092616i  9   -1.0 +  1.0i  -0.868014143 -  0.217621562i  -0.868014143 -  0.217621562i 10   -1.0 +  0.0i  -1.313035285 +  0.000000000i  -1.313035285 +  0.000000000i 11   -1.0 -  1.0i  -0.868014143 +  0.217621562i  -0.868014143 +  0.217621562i 12    0.0 -  1.0i   0.000000000 +  0.642092616i   0.000000000 +  0.642092616i 13    1.0 -  1.0i   0.868014143 +  0.217621562i   0.868014143 +  0.217621562i 14    5.0 +  0.0i   1.000090804 +  0.000000000i   1.000090804 +  0.000000000i 15    5.0 +  3.0i   1.000087187 +  0.000025373i   1.000087187 +  0.000025373i 16    0.0 +  3.0i   0.000000000 +  7.015252551i   0.000000000 +  7.015252551i 17   -5.0 +  3.0i  -1.000087187 +  0.000025373i  -1.000087187 +  0.000025373i 18   -5.0 +  0.0i  -1.000090804 +  0.000000000i  -1.000090804 +  0.000000000i 19   -5.0 -  3.0i  -1.000087187 -  0.000025373i  -1.000087187 -  0.000025373i 20    0.0 -  3.0i   0.000000000 -  7.015252551i   0.000000000 -  7.015252551i 21   -5.0 -  3.0i  -1.000087187 -  0.000025373i  -1.000087187 -  0.000025373i