coth
Symbolic hyperbolic cotangent function
Syntax
Description
Examples
Hyperbolic Cotangent Function for Numeric and Symbolic Arguments
Depending on its arguments, coth returns
floating-point or exact symbolic results.
Compute the hyperbolic cotangent function for these numbers. Because these numbers are
not symbolic objects, coth returns floating-point results.
A = coth([-2, -pi*i/3, pi*i/6, 5*pi*i/7, 3*pi*i/2])
A = -1.0373 + 0.0000i 0.0000 + 0.5774i 0.0000 - 1.7321i... 0.0000 + 0.7975i 0.0000 - 0.0000i
Compute the hyperbolic cotangent function for the numbers converted to symbolic objects.
For many symbolic (exact) numbers, coth returns unresolved symbolic
calls.
symA = coth(sym([-2, -pi*i/3, pi*i/6, 5*pi*i/7, 3*pi*i/2]))
symA = [ -coth(2), (3^(1/2)*1i)/3, -3^(1/2)*1i, -coth((pi*2i)/7), 0]
Use vpa to approximate symbolic results with floating-point
numbers:
vpa(symA)
ans = [ -1.0373147207275480958778097647678,... 0.57735026918962576450914878050196i,... -1.7320508075688772935274463415059i,... 0.79747338888240396141568825421443i,... 0]
Plot Hyperbolic Cotangent Function
Plot the hyperbolic cotangent function on the interval from -10 to 10.
syms x fplot(coth(x),[-10 10]) grid on

Handle Expressions Containing Hyperbolic Cotangent Function
Many functions, such as diff,
int, taylor, and rewrite,
can handle expressions containing coth.
Find the first and second derivatives of the hyperbolic cotangent function:
syms x diff(coth(x), x) diff(coth(x), x, x)
ans = 1 - coth(x)^2 ans = 2*coth(x)*(coth(x)^2 - 1)
Find the indefinite integral of the hyperbolic cotangent function:
int(coth(x), x)
ans = log(sinh(x))
Find the Taylor series expansion of coth(x) around x =
pi*i/2:
taylor(coth(x), x, pi*i/2)
ans = x - (pi*1i)/2 - (x - (pi*1i)/2)^3/3 + (2*(x - (pi*1i)/2)^5)/15
Rewrite the hyperbolic cotangent function in terms of the exponential function:
rewrite(coth(x), 'exp')
ans = (exp(2*x) + 1)/(exp(2*x) - 1)
Input Arguments
Version History
Introduced before R2006a