\(\int \frac {\cosh (c+d x)}{x^2 (a+b x^2)} \, dx\) [63]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 19, antiderivative size = 249 \[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=-\frac {\cosh (c+d x)}{a x}+\frac {\sqrt {b} \cosh \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Chi}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 (-a)^{3/2}}-\frac {\sqrt {b} \cosh \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Chi}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 (-a)^{3/2}}+\frac {d \text {Chi}(d x) \sinh (c)}{a}+\frac {d \cosh (c) \text {Shi}(d x)}{a}-\frac {\sqrt {b} \sinh \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Shi}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 (-a)^{3/2}}-\frac {\sqrt {b} \sinh \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Shi}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 (-a)^{3/2}} \] Output:

-cosh(d*x+c)/a/x+1/2*b^(1/2)*cosh(c+(-a)^(1/2)*d/b^(1/2))*Chi((-a)^(1/2)*d 
/b^(1/2)-d*x)/(-a)^(3/2)-1/2*b^(1/2)*cosh(c-(-a)^(1/2)*d/b^(1/2))*Chi((-a) 
^(1/2)*d/b^(1/2)+d*x)/(-a)^(3/2)+d*Chi(d*x)*sinh(c)/a+d*cosh(c)*Shi(d*x)/a 
+1/2*b^(1/2)*sinh(c+(-a)^(1/2)*d/b^(1/2))*Shi(-(-a)^(1/2)*d/b^(1/2)+d*x)/( 
-a)^(3/2)-1/2*b^(1/2)*sinh(c-(-a)^(1/2)*d/b^(1/2))*Shi((-a)^(1/2)*d/b^(1/2 
)+d*x)/(-a)^(3/2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.59 (sec) , antiderivative size = 243, normalized size of antiderivative = 0.98 \[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=-\frac {\cosh (c) \cosh (d x)}{a x}+\frac {i \sqrt {b} e^{c-\frac {i \sqrt {a} d}{\sqrt {b}}} \left (e^{\frac {2 i \sqrt {a} d}{\sqrt {b}}} \operatorname {ExpIntegralEi}\left (d \left (-\frac {i \sqrt {a}}{\sqrt {b}}+x\right )\right )-\operatorname {ExpIntegralEi}\left (d \left (\frac {i \sqrt {a}}{\sqrt {b}}+x\right )\right )\right )}{4 a^{3/2}}-\frac {i \sqrt {b} e^{-c-\frac {i \sqrt {a} d}{\sqrt {b}}} \left (e^{\frac {2 i \sqrt {a} d}{\sqrt {b}}} \operatorname {ExpIntegralEi}\left (-\frac {i \sqrt {a} d}{\sqrt {b}}-d x\right )-\operatorname {ExpIntegralEi}\left (\frac {i \sqrt {a} d}{\sqrt {b}}-d x\right )\right )}{4 a^{3/2}}-\frac {\sinh (c) \sinh (d x)}{a x}+\frac {d (\text {Chi}(d x) \sinh (c)+\cosh (c) \text {Shi}(d x))}{a} \] Input:

Integrate[Cosh[c + d*x]/(x^2*(a + b*x^2)),x]
 

Output:

-((Cosh[c]*Cosh[d*x])/(a*x)) + ((I/4)*Sqrt[b]*E^(c - (I*Sqrt[a]*d)/Sqrt[b] 
)*(E^(((2*I)*Sqrt[a]*d)/Sqrt[b])*ExpIntegralEi[d*(((-I)*Sqrt[a])/Sqrt[b] + 
 x)] - ExpIntegralEi[d*((I*Sqrt[a])/Sqrt[b] + x)]))/a^(3/2) - ((I/4)*Sqrt[ 
b]*E^(-c - (I*Sqrt[a]*d)/Sqrt[b])*(E^(((2*I)*Sqrt[a]*d)/Sqrt[b])*ExpIntegr 
alEi[((-I)*Sqrt[a]*d)/Sqrt[b] - d*x] - ExpIntegralEi[(I*Sqrt[a]*d)/Sqrt[b] 
 - d*x]))/a^(3/2) - (Sinh[c]*Sinh[d*x])/(a*x) + (d*(CoshIntegral[d*x]*Sinh 
[c] + Cosh[c]*SinhIntegral[d*x]))/a
 

Rubi [A] (verified)

Time = 0.84 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {5816, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx\)

\(\Big \downarrow \) 5816

\(\displaystyle \int \left (\frac {\cosh (c+d x)}{a x^2}-\frac {b \cosh (c+d x)}{a \left (a+b x^2\right )}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sqrt {b} \cosh \left (\frac {\sqrt {-a} d}{\sqrt {b}}+c\right ) \text {Chi}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 (-a)^{3/2}}-\frac {\sqrt {b} \cosh \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Chi}\left (x d+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 (-a)^{3/2}}-\frac {\sqrt {b} \sinh \left (\frac {\sqrt {-a} d}{\sqrt {b}}+c\right ) \text {Shi}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 (-a)^{3/2}}-\frac {\sqrt {b} \sinh \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Shi}\left (x d+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 (-a)^{3/2}}+\frac {d \sinh (c) \text {Chi}(d x)}{a}+\frac {d \cosh (c) \text {Shi}(d x)}{a}-\frac {\cosh (c+d x)}{a x}\)

Input:

Int[Cosh[c + d*x]/(x^2*(a + b*x^2)),x]
 

Output:

-(Cosh[c + d*x]/(a*x)) + (Sqrt[b]*Cosh[c + (Sqrt[-a]*d)/Sqrt[b]]*CoshInteg 
ral[(Sqrt[-a]*d)/Sqrt[b] - d*x])/(2*(-a)^(3/2)) - (Sqrt[b]*Cosh[c - (Sqrt[ 
-a]*d)/Sqrt[b]]*CoshIntegral[(Sqrt[-a]*d)/Sqrt[b] + d*x])/(2*(-a)^(3/2)) + 
 (d*CoshIntegral[d*x]*Sinh[c])/a + (d*Cosh[c]*SinhIntegral[d*x])/a - (Sqrt 
[b]*Sinh[c + (Sqrt[-a]*d)/Sqrt[b]]*SinhIntegral[(Sqrt[-a]*d)/Sqrt[b] - d*x 
])/(2*(-a)^(3/2)) - (Sqrt[b]*Sinh[c - (Sqrt[-a]*d)/Sqrt[b]]*SinhIntegral[( 
Sqrt[-a]*d)/Sqrt[b] + d*x])/(2*(-a)^(3/2))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5816
Int[Cosh[(c_.) + (d_.)*(x_)]*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Sy 
mbol] :> Int[ExpandIntegrand[Cosh[c + d*x], x^m*(a + b*x^n)^p, x], x] /; Fr 
eeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[m] && IGtQ[n, 0] && (EqQ[n, 
2] || EqQ[p, -1])
 
Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 288, normalized size of antiderivative = 1.16

method result size
risch \(-\frac {{\mathrm e}^{-d x -c}}{2 a x}+\frac {d \,{\mathrm e}^{-c} \operatorname {expIntegral}_{1}\left (d x \right )}{2 a}+\frac {b \,{\mathrm e}^{-\frac {d \sqrt {-a b}+c b}{b}} \operatorname {expIntegral}_{1}\left (-\frac {d \sqrt {-a b}-b \left (d x +c \right )+c b}{b}\right )}{4 a \sqrt {-a b}}-\frac {b \,{\mathrm e}^{-\frac {-d \sqrt {-a b}+c b}{b}} \operatorname {expIntegral}_{1}\left (\frac {d \sqrt {-a b}+b \left (d x +c \right )-c b}{b}\right )}{4 a \sqrt {-a b}}-\frac {{\mathrm e}^{d x +c}}{2 a x}-\frac {d \,{\mathrm e}^{c} \operatorname {expIntegral}_{1}\left (-d x \right )}{2 a}+\frac {b \,{\mathrm e}^{\frac {d \sqrt {-a b}+c b}{b}} \operatorname {expIntegral}_{1}\left (\frac {d \sqrt {-a b}-b \left (d x +c \right )+c b}{b}\right )}{4 a \sqrt {-a b}}-\frac {b \,{\mathrm e}^{\frac {-d \sqrt {-a b}+c b}{b}} \operatorname {expIntegral}_{1}\left (-\frac {d \sqrt {-a b}+b \left (d x +c \right )-c b}{b}\right )}{4 a \sqrt {-a b}}\) \(288\)

Input:

int(cosh(d*x+c)/x^2/(b*x^2+a),x,method=_RETURNVERBOSE)
 

Output:

-1/2*exp(-d*x-c)/a/x+1/2*d/a*exp(-c)*Ei(1,d*x)+1/4*b/a/(-a*b)^(1/2)*exp(-( 
d*(-a*b)^(1/2)+c*b)/b)*Ei(1,-(d*(-a*b)^(1/2)-b*(d*x+c)+c*b)/b)-1/4*b/a/(-a 
*b)^(1/2)*exp(-(-d*(-a*b)^(1/2)+c*b)/b)*Ei(1,(d*(-a*b)^(1/2)+b*(d*x+c)-c*b 
)/b)-1/2*exp(d*x+c)/a/x-1/2*d/a*exp(c)*Ei(1,-d*x)+1/4*b/a/(-a*b)^(1/2)*exp 
((d*(-a*b)^(1/2)+c*b)/b)*Ei(1,(d*(-a*b)^(1/2)-b*(d*x+c)+c*b)/b)-1/4*b/a/(- 
a*b)^(1/2)*exp((-d*(-a*b)^(1/2)+c*b)/b)*Ei(1,-(d*(-a*b)^(1/2)+b*(d*x+c)-c* 
b)/b)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 599 vs. \(2 (193) = 386\).

Time = 0.11 (sec) , antiderivative size = 599, normalized size of antiderivative = 2.41 \[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=-\frac {4 \, a d \cosh \left (d x + c\right ) - {\left ({\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (d x - \sqrt {-\frac {a d^{2}}{b}}\right ) + {\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (-d x + \sqrt {-\frac {a d^{2}}{b}}\right )\right )} \cosh \left (c + \sqrt {-\frac {a d^{2}}{b}}\right ) - 2 \, {\left (a d^{2} x {\rm Ei}\left (d x\right ) - a d^{2} x {\rm Ei}\left (-d x\right )\right )} \cosh \left (c\right ) + {\left ({\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (d x + \sqrt {-\frac {a d^{2}}{b}}\right ) + {\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (-d x - \sqrt {-\frac {a d^{2}}{b}}\right )\right )} \cosh \left (-c + \sqrt {-\frac {a d^{2}}{b}}\right ) - {\left ({\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (d x - \sqrt {-\frac {a d^{2}}{b}}\right ) - {\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (-d x + \sqrt {-\frac {a d^{2}}{b}}\right )\right )} \sinh \left (c + \sqrt {-\frac {a d^{2}}{b}}\right ) - 2 \, {\left (a d^{2} x {\rm Ei}\left (d x\right ) + a d^{2} x {\rm Ei}\left (-d x\right )\right )} \sinh \left (c\right ) - {\left ({\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (d x + \sqrt {-\frac {a d^{2}}{b}}\right ) - {\left (b x \cosh \left (d x + c\right )^{2} - b x \sinh \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a d^{2}}{b}} {\rm Ei}\left (-d x - \sqrt {-\frac {a d^{2}}{b}}\right )\right )} \sinh \left (-c + \sqrt {-\frac {a d^{2}}{b}}\right )}{4 \, {\left (a^{2} d x \cosh \left (d x + c\right )^{2} - a^{2} d x \sinh \left (d x + c\right )^{2}\right )}} \] Input:

integrate(cosh(d*x+c)/x^2/(b*x^2+a),x, algorithm="fricas")
 

Output:

-1/4*(4*a*d*cosh(d*x + c) - ((b*x*cosh(d*x + c)^2 - b*x*sinh(d*x + c)^2)*s 
qrt(-a*d^2/b)*Ei(d*x - sqrt(-a*d^2/b)) + (b*x*cosh(d*x + c)^2 - b*x*sinh(d 
*x + c)^2)*sqrt(-a*d^2/b)*Ei(-d*x + sqrt(-a*d^2/b)))*cosh(c + sqrt(-a*d^2/ 
b)) - 2*(a*d^2*x*Ei(d*x) - a*d^2*x*Ei(-d*x))*cosh(c) + ((b*x*cosh(d*x + c) 
^2 - b*x*sinh(d*x + c)^2)*sqrt(-a*d^2/b)*Ei(d*x + sqrt(-a*d^2/b)) + (b*x*c 
osh(d*x + c)^2 - b*x*sinh(d*x + c)^2)*sqrt(-a*d^2/b)*Ei(-d*x - sqrt(-a*d^2 
/b)))*cosh(-c + sqrt(-a*d^2/b)) - ((b*x*cosh(d*x + c)^2 - b*x*sinh(d*x + c 
)^2)*sqrt(-a*d^2/b)*Ei(d*x - sqrt(-a*d^2/b)) - (b*x*cosh(d*x + c)^2 - b*x* 
sinh(d*x + c)^2)*sqrt(-a*d^2/b)*Ei(-d*x + sqrt(-a*d^2/b)))*sinh(c + sqrt(- 
a*d^2/b)) - 2*(a*d^2*x*Ei(d*x) + a*d^2*x*Ei(-d*x))*sinh(c) - ((b*x*cosh(d* 
x + c)^2 - b*x*sinh(d*x + c)^2)*sqrt(-a*d^2/b)*Ei(d*x + sqrt(-a*d^2/b)) - 
(b*x*cosh(d*x + c)^2 - b*x*sinh(d*x + c)^2)*sqrt(-a*d^2/b)*Ei(-d*x - sqrt( 
-a*d^2/b)))*sinh(-c + sqrt(-a*d^2/b)))/(a^2*d*x*cosh(d*x + c)^2 - a^2*d*x* 
sinh(d*x + c)^2)
 

Sympy [F]

\[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=\int \frac {\cosh {\left (c + d x \right )}}{x^{2} \left (a + b x^{2}\right )}\, dx \] Input:

integrate(cosh(d*x+c)/x**2/(b*x**2+a),x)
 

Output:

Integral(cosh(c + d*x)/(x**2*(a + b*x**2)), x)
 

Maxima [F]

\[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=\int { \frac {\cosh \left (d x + c\right )}{{\left (b x^{2} + a\right )} x^{2}} \,d x } \] Input:

integrate(cosh(d*x+c)/x^2/(b*x^2+a),x, algorithm="maxima")
 

Output:

integrate(cosh(d*x + c)/((b*x^2 + a)*x^2), x)
 

Giac [F]

\[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=\int { \frac {\cosh \left (d x + c\right )}{{\left (b x^{2} + a\right )} x^{2}} \,d x } \] Input:

integrate(cosh(d*x+c)/x^2/(b*x^2+a),x, algorithm="giac")
 

Output:

integrate(cosh(d*x + c)/((b*x^2 + a)*x^2), x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=\int \frac {\mathrm {cosh}\left (c+d\,x\right )}{x^2\,\left (b\,x^2+a\right )} \,d x \] Input:

int(cosh(c + d*x)/(x^2*(a + b*x^2)),x)
 

Output:

int(cosh(c + d*x)/(x^2*(a + b*x^2)), x)
 

Reduce [F]

\[ \int \frac {\cosh (c+d x)}{x^2 \left (a+b x^2\right )} \, dx=\int \frac {\cosh \left (d x +c \right )}{b \,x^{4}+a \,x^{2}}d x \] Input:

int(cosh(d*x+c)/x^2/(b*x^2+a),x)
 

Output:

int(cosh(c + d*x)/(a*x**2 + b*x**4),x)