Hyperbolic cosine integral function
coshint(
returns
the hyperbolic
cosine integral function of X
)X
.
Depending on its arguments, coshint
returns
floating-point or exact symbolic results.
Compute the hyperbolic cosine integral function for these numbers.
Because these numbers are not symbolic objects, coshint
returns
floating-point results.
A = coshint([-1, 0, 1/2, 1, pi/2, pi])
A = 0.8379 + 3.1416i -Inf + 0.0000i -0.0528 + 0.0000i 0.8379... + 0.0000i 1.7127 + 0.0000i 5.4587 + 0.0000i
Compute the hyperbolic cosine integral function for the numbers
converted to symbolic objects. For many symbolic (exact) numbers, coshint
returns
unresolved symbolic calls.
symA = coshint(sym([-1, 0, 1/2, 1, pi/2, pi]))
symA = [ coshint(1) + pi*1i, -Inf, coshint(1/2), coshint(1), coshint(pi/2), coshint(pi)]
Use vpa
to approximate symbolic results
with floating-point numbers:
vpa(symA)
ans = [ 0.83786694098020824089467857943576... + 3.1415926535897932384626433832795i,... -Inf,... -0.052776844956493615913136063326141,... 0.83786694098020824089467857943576,... 1.7126607364844281079951569897796,... 5.4587340442160681980014878977798]
Plot the hyperbolic cosine integral function on the interval from 0 to 2*pi
.
syms x fplot(coshint(x),[0 2*pi]) grid on
Many functions, such as diff
and int
,
can handle expressions containing coshint
.
Find the first and second derivatives of the hyperbolic cosine integral function:
syms x diff(coshint(x), x) diff(coshint(x), x, x)
ans = cosh(x)/x ans = sinh(x)/x - cosh(x)/x^2
Find the indefinite integral of the hyperbolic cosine integral function:
int(coshint(x), x)
ans = x*coshint(x) - sinh(x)
[1] Cautschi, W. and W. F. Cahill. “Exponential Integral and Related Functions.” Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.