\(\int \frac {\sinh ^2(a+b x^2)}{x^2} \, dx\) [13]

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

Optimal result

Integrand size = 14, antiderivative size = 88 \[ \int \frac {\sinh ^2\left (a+b x^2\right )}{x^2} \, dx=-\frac {1}{2} \sqrt {b} e^{-2 a} \sqrt {\frac {\pi }{2}} \text {erf}\left (\sqrt {2} \sqrt {b} x\right )+\frac {1}{2} \sqrt {b} e^{2 a} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\sqrt {2} \sqrt {b} x\right )-\frac {\sinh ^2\left (a+b x^2\right )}{x} \] Output:

-1/4*b^(1/2)*2^(1/2)*Pi^(1/2)*erf(2^(1/2)*b^(1/2)*x)/exp(2*a)+1/4*b^(1/2)* 
exp(2*a)*2^(1/2)*Pi^(1/2)*erfi(2^(1/2)*b^(1/2)*x)-sinh(b*x^2+a)^2/x
 

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.07 \[ \int \frac {\sinh ^2\left (a+b x^2\right )}{x^2} \, dx=\frac {\sqrt {b} \sqrt {2 \pi } x \text {erf}\left (\sqrt {2} \sqrt {b} x\right ) (-\cosh (2 a)+\sinh (2 a))+\sqrt {b} \sqrt {2 \pi } x \text {erfi}\left (\sqrt {2} \sqrt {b} x\right ) (\cosh (2 a)+\sinh (2 a))-4 \sinh ^2\left (a+b x^2\right )}{4 x} \] Input:

Integrate[Sinh[a + b*x^2]^2/x^2,x]
 

Output:

(Sqrt[b]*Sqrt[2*Pi]*x*Erf[Sqrt[2]*Sqrt[b]*x]*(-Cosh[2*a] + Sinh[2*a]) + Sq 
rt[b]*Sqrt[2*Pi]*x*Erfi[Sqrt[2]*Sqrt[b]*x]*(Cosh[2*a] + Sinh[2*a]) - 4*Sin 
h[a + b*x^2]^2)/(4*x)
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.05, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5853, 6151, 5837, 5821, 2633, 2634}

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 {\sinh ^2\left (a+b x^2\right )}{x^2} \, dx\)

\(\Big \downarrow \) 5853

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

\(\Big \downarrow \) 6151

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

\(\Big \downarrow \) 5837

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

\(\Big \downarrow \) 5821

\(\displaystyle 2 b \left (\frac {1}{2} \int e^{2 b x^2+2 a}dx-\frac {1}{2} \int e^{-2 b x^2-2 a}dx\right )-\frac {\sinh ^2\left (a+b x^2\right )}{x}\)

\(\Big \downarrow \) 2633

\(\displaystyle 2 b \left (\frac {\sqrt {\frac {\pi }{2}} e^{2 a} \text {erfi}\left (\sqrt {2} \sqrt {b} x\right )}{4 \sqrt {b}}-\frac {1}{2} \int e^{-2 b x^2-2 a}dx\right )-\frac {\sinh ^2\left (a+b x^2\right )}{x}\)

\(\Big \downarrow \) 2634

\(\displaystyle 2 b \left (\frac {\sqrt {\frac {\pi }{2}} e^{2 a} \text {erfi}\left (\sqrt {2} \sqrt {b} x\right )}{4 \sqrt {b}}-\frac {\sqrt {\frac {\pi }{2}} e^{-2 a} \text {erf}\left (\sqrt {2} \sqrt {b} x\right )}{4 \sqrt {b}}\right )-\frac {\sinh ^2\left (a+b x^2\right )}{x}\)

Input:

Int[Sinh[a + b*x^2]^2/x^2,x]
 

Output:

2*b*(-1/4*(Sqrt[Pi/2]*Erf[Sqrt[2]*Sqrt[b]*x])/(Sqrt[b]*E^(2*a)) + (E^(2*a) 
*Sqrt[Pi/2]*Erfi[Sqrt[2]*Sqrt[b]*x])/(4*Sqrt[b])) - Sinh[a + b*x^2]^2/x
 

Defintions of rubi rules used

rule 2633
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt 
[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{ 
F, a, b, c, d}, x] && PosQ[b]
 

rule 2634
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt 
[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F], 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; Fr 
eeQ[{F, a, b, c, d}, x] && NegQ[b]
 

rule 5821
Int[Sinh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Simp[1/2   Int[E^(c + d*x^n 
), x], x] - Simp[1/2   Int[E^(-c - d*x^n), x], x] /; FreeQ[{c, d}, x] && IG 
tQ[n, 1]
 

rule 5837
Int[((a_.) + (b_.)*Sinh[u_])^(p_.), x_Symbol] :> Int[(a + b*Sinh[ExpandToSu 
m[u, x]])^p, x] /; FreeQ[{a, b, p}, x] && BinomialQ[u, x] &&  !BinomialMatc 
hQ[u, x]
 

rule 5853
Int[(x_)^(m_.)*Sinh[(a_.) + (b_.)*(x_)^(n_)]^(p_), x_Symbol] :> Simp[-Sinh[ 
a + b*x^n]^p/((n - 1)*x^(n - 1)), x] + Simp[b*n*(p/(n - 1))   Int[Sinh[a + 
b*x^n]^(p - 1)*Cosh[a + b*x^n], x], x] /; FreeQ[{a, b}, x] && IntegersQ[n, 
p] && EqQ[m + n, 0] && GtQ[p, 1] && NeQ[n, 1]
 

rule 6151
Int[Cosh[w_]^(p_.)*(u_.)*Sinh[v_]^(p_.), x_Symbol] :> Simp[1/2^p   Int[u*Si 
nh[2*v]^p, x], x] /; EqQ[w, v] && IntegerQ[p]
 
Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.98

method result size
risch \(\frac {1}{2 x}-\frac {{\mathrm e}^{-2 a} {\mathrm e}^{-2 b \,x^{2}}}{4 x}-\frac {{\mathrm e}^{-2 a} \sqrt {b}\, \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\sqrt {2}\, \sqrt {b}\, x \right )}{4}-\frac {{\mathrm e}^{2 a} {\mathrm e}^{2 b \,x^{2}}}{4 x}+\frac {{\mathrm e}^{2 a} b \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-2 b}\, x \right )}{2 \sqrt {-2 b}}\) \(86\)

Input:

int(sinh(b*x^2+a)^2/x^2,x,method=_RETURNVERBOSE)
 

Output:

1/2/x-1/4*exp(-2*a)/x*exp(-2*b*x^2)-1/4*exp(-2*a)*b^(1/2)*Pi^(1/2)*2^(1/2) 
*erf(2^(1/2)*b^(1/2)*x)-1/4*exp(2*a)/x*exp(2*b*x^2)+1/2*exp(2*a)*b*Pi^(1/2 
)/(-2*b)^(1/2)*erf((-2*b)^(1/2)*x)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 396 vs. \(2 (64) = 128\).

Time = 0.10 (sec) , antiderivative size = 396, normalized size of antiderivative = 4.50 \[ \int \frac {\sinh ^2\left (a+b x^2\right )}{x^2} \, dx=-\frac {\cosh \left (b x^{2} + a\right )^{4} + 4 \, \cosh \left (b x^{2} + a\right ) \sinh \left (b x^{2} + a\right )^{3} + \sinh \left (b x^{2} + a\right )^{4} + \sqrt {2} \sqrt {\pi } {\left (x \cosh \left (b x^{2} + a\right )^{2} \cosh \left (2 \, a\right ) + x \cosh \left (b x^{2} + a\right )^{2} \sinh \left (2 \, a\right ) + {\left (x \cosh \left (2 \, a\right ) + x \sinh \left (2 \, a\right )\right )} \sinh \left (b x^{2} + a\right )^{2} + 2 \, {\left (x \cosh \left (b x^{2} + a\right ) \cosh \left (2 \, a\right ) + x \cosh \left (b x^{2} + a\right ) \sinh \left (2 \, a\right )\right )} \sinh \left (b x^{2} + a\right )\right )} \sqrt {-b} \operatorname {erf}\left (\sqrt {2} \sqrt {-b} x\right ) + \sqrt {2} \sqrt {\pi } {\left (x \cosh \left (b x^{2} + a\right )^{2} \cosh \left (2 \, a\right ) - x \cosh \left (b x^{2} + a\right )^{2} \sinh \left (2 \, a\right ) + {\left (x \cosh \left (2 \, a\right ) - x \sinh \left (2 \, a\right )\right )} \sinh \left (b x^{2} + a\right )^{2} + 2 \, {\left (x \cosh \left (b x^{2} + a\right ) \cosh \left (2 \, a\right ) - x \cosh \left (b x^{2} + a\right ) \sinh \left (2 \, a\right )\right )} \sinh \left (b x^{2} + a\right )\right )} \sqrt {b} \operatorname {erf}\left (\sqrt {2} \sqrt {b} x\right ) + 2 \, {\left (3 \, \cosh \left (b x^{2} + a\right )^{2} - 1\right )} \sinh \left (b x^{2} + a\right )^{2} - 2 \, \cosh \left (b x^{2} + a\right )^{2} + 4 \, {\left (\cosh \left (b x^{2} + a\right )^{3} - \cosh \left (b x^{2} + a\right )\right )} \sinh \left (b x^{2} + a\right ) + 1}{4 \, {\left (x \cosh \left (b x^{2} + a\right )^{2} + 2 \, x \cosh \left (b x^{2} + a\right ) \sinh \left (b x^{2} + a\right ) + x \sinh \left (b x^{2} + a\right )^{2}\right )}} \] Input:

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

Output:

-1/4*(cosh(b*x^2 + a)^4 + 4*cosh(b*x^2 + a)*sinh(b*x^2 + a)^3 + sinh(b*x^2 
 + a)^4 + sqrt(2)*sqrt(pi)*(x*cosh(b*x^2 + a)^2*cosh(2*a) + x*cosh(b*x^2 + 
 a)^2*sinh(2*a) + (x*cosh(2*a) + x*sinh(2*a))*sinh(b*x^2 + a)^2 + 2*(x*cos 
h(b*x^2 + a)*cosh(2*a) + x*cosh(b*x^2 + a)*sinh(2*a))*sinh(b*x^2 + a))*sqr 
t(-b)*erf(sqrt(2)*sqrt(-b)*x) + sqrt(2)*sqrt(pi)*(x*cosh(b*x^2 + a)^2*cosh 
(2*a) - x*cosh(b*x^2 + a)^2*sinh(2*a) + (x*cosh(2*a) - x*sinh(2*a))*sinh(b 
*x^2 + a)^2 + 2*(x*cosh(b*x^2 + a)*cosh(2*a) - x*cosh(b*x^2 + a)*sinh(2*a) 
)*sinh(b*x^2 + a))*sqrt(b)*erf(sqrt(2)*sqrt(b)*x) + 2*(3*cosh(b*x^2 + a)^2 
 - 1)*sinh(b*x^2 + a)^2 - 2*cosh(b*x^2 + a)^2 + 4*(cosh(b*x^2 + a)^3 - cos 
h(b*x^2 + a))*sinh(b*x^2 + a) + 1)/(x*cosh(b*x^2 + a)^2 + 2*x*cosh(b*x^2 + 
 a)*sinh(b*x^2 + a) + x*sinh(b*x^2 + a)^2)
 

Sympy [F]

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

integrate(sinh(b*x**2+a)**2/x**2,x)
 

Output:

Integral(sinh(a + b*x**2)**2/x**2, x)
 

Maxima [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.69 \[ \int \frac {\sinh ^2\left (a+b x^2\right )}{x^2} \, dx=-\frac {\sqrt {2} \sqrt {b x^{2}} e^{\left (-2 \, a\right )} \Gamma \left (-\frac {1}{2}, 2 \, b x^{2}\right )}{8 \, x} - \frac {\sqrt {2} \sqrt {-b x^{2}} e^{\left (2 \, a\right )} \Gamma \left (-\frac {1}{2}, -2 \, b x^{2}\right )}{8 \, x} + \frac {1}{2 \, x} \] Input:

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

Output:

-1/8*sqrt(2)*sqrt(b*x^2)*e^(-2*a)*gamma(-1/2, 2*b*x^2)/x - 1/8*sqrt(2)*sqr 
t(-b*x^2)*e^(2*a)*gamma(-1/2, -2*b*x^2)/x + 1/2/x
 

Giac [F]

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

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

Output:

integrate(sinh(b*x^2 + a)^2/x^2, x)
 

Mupad [F(-1)]

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

int(sinh(a + b*x^2)^2/x^2,x)
 

Output:

int(sinh(a + b*x^2)^2/x^2, x)
                                                                                    
                                                                                    
 

Reduce [F]

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

int(sinh(b*x^2+a)^2/x^2,x)
 

Output:

int(sinh(a + b*x**2)**2/x**2,x)