\(\int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx\) [167]

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

Optimal result

Integrand size = 20, antiderivative size = 183 \[ \int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx=-\frac {a^2}{d (c+d x)}+\frac {2 a b f \cosh \left (e-\frac {c f}{d}\right ) \text {Chi}\left (\frac {c f}{d}+f x\right )}{d^2}+\frac {b^2 f \text {Chi}\left (\frac {2 c f}{d}+2 f x\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )}{d^2}-\frac {2 a b \sinh (e+f x)}{d (c+d x)}-\frac {b^2 \sinh ^2(e+f x)}{d (c+d x)}+\frac {2 a b f \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d^2}+\frac {b^2 f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{d^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.43 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.27 \[ \int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx=\frac {-2 a^2 d+b^2 d-b^2 d \cosh (2 (e+f x))+4 a b f (c+d x) \cosh \left (e-\frac {c f}{d}\right ) \text {Chi}\left (f \left (\frac {c}{d}+x\right )\right )+2 b^2 f (c+d x) \text {Chi}\left (\frac {2 f (c+d x)}{d}\right ) \sinh \left (2 e-\frac {2 c f}{d}\right )-4 a b d \sinh (e+f x)+4 a b c f \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )+4 a b d f x \sinh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )+2 b^2 c f \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )+2 b^2 d f x \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )}{2 d^2 (c+d x)} \] Input:

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

Output:

(-2*a^2*d + b^2*d - b^2*d*Cosh[2*(e + f*x)] + 4*a*b*f*(c + d*x)*Cosh[e - ( 
c*f)/d]*CoshIntegral[f*(c/d + x)] + 2*b^2*f*(c + d*x)*CoshIntegral[(2*f*(c 
 + d*x))/d]*Sinh[2*e - (2*c*f)/d] - 4*a*b*d*Sinh[e + f*x] + 4*a*b*c*f*Sinh 
[e - (c*f)/d]*SinhIntegral[f*(c/d + x)] + 4*a*b*d*f*x*Sinh[e - (c*f)/d]*Si 
nhIntegral[f*(c/d + x)] + 2*b^2*c*f*Cosh[2*e - (2*c*f)/d]*SinhIntegral[(2* 
f*(c + d*x))/d] + 2*b^2*d*f*x*Cosh[2*e - (2*c*f)/d]*SinhIntegral[(2*f*(c + 
 d*x))/d])/(2*d^2*(c + d*x))
 

Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 3798, 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 {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a-i b \sin (i e+i f x))^2}{(c+d x)^2}dx\)

\(\Big \downarrow \) 3798

\(\displaystyle \int \left (\frac {a^2}{(c+d x)^2}+\frac {2 a b \sinh (e+f x)}{(c+d x)^2}+\frac {b^2 \sinh ^2(e+f x)}{(c+d x)^2}\right )dx\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

-(a^2/(d*(c + d*x))) + (2*a*b*f*Cosh[e - (c*f)/d]*CoshIntegral[(c*f)/d + f 
*x])/d^2 + (b^2*f*CoshIntegral[(2*c*f)/d + 2*f*x]*Sinh[2*e - (2*c*f)/d])/d 
^2 - (2*a*b*Sinh[e + f*x])/(d*(c + d*x)) - (b^2*Sinh[e + f*x]^2)/(d*(c + d 
*x)) + (2*a*b*f*Sinh[e - (c*f)/d]*SinhIntegral[(c*f)/d + f*x])/d^2 + (b^2* 
f*Cosh[2*e - (2*c*f)/d]*SinhIntegral[(2*c*f)/d + 2*f*x])/d^2
 

Defintions of rubi rules used

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3798
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] || IGtQ[ 
m, 0] || NeQ[a^2 - b^2, 0])
 
Maple [A] (verified)

Time = 1.06 (sec) , antiderivative size = 319, normalized size of antiderivative = 1.74

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 357, normalized size of antiderivative = 1.95 \[ \int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx=-\frac {b^{2} d \cosh \left (f x + e\right )^{2} + b^{2} d \sinh \left (f x + e\right )^{2} + 4 \, a b d \sinh \left (f x + e\right ) + {\left (2 \, a^{2} - b^{2}\right )} d - 2 \, {\left ({\left (a b d f x + a b c f\right )} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) + {\left (a b d f x + a b c f\right )} {\rm Ei}\left (-\frac {d f x + c f}{d}\right )\right )} \cosh \left (-\frac {d e - c f}{d}\right ) - {\left ({\left (b^{2} d f x + b^{2} c f\right )} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - {\left (b^{2} d f x + b^{2} c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right )\right )} \cosh \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) + 2 \, {\left ({\left (a b d f x + a b c f\right )} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) - {\left (a b d f x + a b c f\right )} {\rm Ei}\left (-\frac {d f x + c f}{d}\right )\right )} \sinh \left (-\frac {d e - c f}{d}\right ) + {\left ({\left (b^{2} d f x + b^{2} c f\right )} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + {\left (b^{2} d f x + b^{2} c f\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right )\right )} \sinh \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )}{2 \, {\left (d^{3} x + c d^{2}\right )}} \] Input:

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

Output:

-1/2*(b^2*d*cosh(f*x + e)^2 + b^2*d*sinh(f*x + e)^2 + 4*a*b*d*sinh(f*x + e 
) + (2*a^2 - b^2)*d - 2*((a*b*d*f*x + a*b*c*f)*Ei((d*f*x + c*f)/d) + (a*b* 
d*f*x + a*b*c*f)*Ei(-(d*f*x + c*f)/d))*cosh(-(d*e - c*f)/d) - ((b^2*d*f*x 
+ b^2*c*f)*Ei(2*(d*f*x + c*f)/d) - (b^2*d*f*x + b^2*c*f)*Ei(-2*(d*f*x + c* 
f)/d))*cosh(-2*(d*e - c*f)/d) + 2*((a*b*d*f*x + a*b*c*f)*Ei((d*f*x + c*f)/ 
d) - (a*b*d*f*x + a*b*c*f)*Ei(-(d*f*x + c*f)/d))*sinh(-(d*e - c*f)/d) + (( 
b^2*d*f*x + b^2*c*f)*Ei(2*(d*f*x + c*f)/d) + (b^2*d*f*x + b^2*c*f)*Ei(-2*( 
d*f*x + c*f)/d))*sinh(-2*(d*e - c*f)/d))/(d^3*x + c*d^2)
 

Sympy [F]

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

integrate((a+b*sinh(f*x+e))**2/(d*x+c)**2,x)
 

Output:

Integral((a + b*sinh(e + f*x))**2/(c + d*x)**2, x)
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 181, normalized size of antiderivative = 0.99 \[ \int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx=-\frac {1}{4} \, b^{2} {\left (\frac {e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} E_{2}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} + \frac {e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} E_{2}\left (-\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} - \frac {2}{d^{2} x + c d}\right )} + a b {\left (\frac {e^{\left (-e + \frac {c f}{d}\right )} E_{2}\left (\frac {{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} - \frac {e^{\left (e - \frac {c f}{d}\right )} E_{2}\left (-\frac {{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d}\right )} - \frac {a^{2}}{d^{2} x + c d} \] Input:

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

Output:

-1/4*b^2*(e^(-2*e + 2*c*f/d)*exp_integral_e(2, 2*(d*x + c)*f/d)/((d*x + c) 
*d) + e^(2*e - 2*c*f/d)*exp_integral_e(2, -2*(d*x + c)*f/d)/((d*x + c)*d) 
- 2/(d^2*x + c*d)) + a*b*(e^(-e + c*f/d)*exp_integral_e(2, (d*x + c)*f/d)/ 
((d*x + c)*d) - e^(e - c*f/d)*exp_integral_e(2, -(d*x + c)*f/d)/((d*x + c) 
*d)) - a^2/(d^2*x + c*d)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1135 vs. \(2 (186) = 372\).

Time = 0.19 (sec) , antiderivative size = 1135, normalized size of antiderivative = 6.20 \[ \int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx=\text {Too large to display} \] Input:

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

Output:

1/4*(2*(d*x + c)*b^2*(d*e/(d*x + c) - c*f/(d*x + c) + f)*f^2*Ei(2*((d*x + 
c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^(2*(d*e - c*f)/d) 
 - 2*b^2*d*e*f^2*Ei(2*((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e 
 + c*f)/d)*e^(2*(d*e - c*f)/d) + 2*b^2*c*f^3*Ei(2*((d*x + c)*(d*e/(d*x + c 
) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^(2*(d*e - c*f)/d) + 4*(d*x + c)*a 
*b*(d*e/(d*x + c) - c*f/(d*x + c) + f)*f^2*Ei(((d*x + c)*(d*e/(d*x + c) - 
c*f/(d*x + c) + f) - d*e + c*f)/d)*e^((d*e - c*f)/d) - 4*a*b*d*e*f^2*Ei((( 
d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^((d*e - c*f 
)/d) + 4*a*b*c*f^3*Ei(((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e 
 + c*f)/d)*e^((d*e - c*f)/d) + 4*(d*x + c)*a*b*(d*e/(d*x + c) - c*f/(d*x + 
 c) + f)*f^2*Ei(-((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c* 
f)/d)*e^(-(d*e - c*f)/d) - 4*a*b*d*e*f^2*Ei(-((d*x + c)*(d*e/(d*x + c) - c 
*f/(d*x + c) + f) - d*e + c*f)/d)*e^(-(d*e - c*f)/d) + 4*a*b*c*f^3*Ei(-((d 
*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^(-(d*e - c*f 
)/d) - 2*(d*x + c)*b^2*(d*e/(d*x + c) - c*f/(d*x + c) + f)*f^2*Ei(-2*((d*x 
 + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^(-2*(d*e - c*f 
)/d) + 2*b^2*d*e*f^2*Ei(-2*((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) 
- d*e + c*f)/d)*e^(-2*(d*e - c*f)/d) - 2*b^2*c*f^3*Ei(-2*((d*x + c)*(d*e/( 
d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d)*e^(-2*(d*e - c*f)/d) - b^2*d 
*f^2*e^(2*(d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f)/d) - 4*a*b*d*f^...
 

Mupad [F(-1)]

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

int((a + b*sinh(e + f*x))^2/(c + d*x)^2,x)
 

Output:

int((a + b*sinh(e + f*x))^2/(c + d*x)^2, x)
 

Reduce [F]

\[ \int \frac {(a+b \sinh (e+f x))^2}{(c+d x)^2} \, dx=\frac {e^{3 e} \left (\int \frac {e^{2 f x}}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b^{2} c^{2}+e^{3 e} \left (\int \frac {e^{2 f x}}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b^{2} c d x +4 e^{2 e} \left (\int \frac {e^{f x}}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) a b \,c^{2}+4 e^{2 e} \left (\int \frac {e^{f x}}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) a b c d x +e^{e} \left (\int \frac {1}{e^{2 f x +2 e} c^{2}+2 e^{2 f x +2 e} c d x +e^{2 f x +2 e} d^{2} x^{2}}d x \right ) b^{2} c^{2}+e^{e} \left (\int \frac {1}{e^{2 f x +2 e} c^{2}+2 e^{2 f x +2 e} c d x +e^{2 f x +2 e} d^{2} x^{2}}d x \right ) b^{2} c d x +4 e^{e} a^{2} x -2 e^{e} b^{2} x -4 \left (\int \frac {1}{e^{f x} c^{2}+2 e^{f x} c d x +e^{f x} d^{2} x^{2}}d x \right ) a b \,c^{2}-4 \left (\int \frac {1}{e^{f x} c^{2}+2 e^{f x} c d x +e^{f x} d^{2} x^{2}}d x \right ) a b c d x}{4 e^{e} c \left (d x +c \right )} \] Input:

int((a+b*sinh(f*x+e))^2/(d*x+c)^2,x)
 

Output:

(e**(3*e)*int(e**(2*f*x)/(c**2 + 2*c*d*x + d**2*x**2),x)*b**2*c**2 + e**(3 
*e)*int(e**(2*f*x)/(c**2 + 2*c*d*x + d**2*x**2),x)*b**2*c*d*x + 4*e**(2*e) 
*int(e**(f*x)/(c**2 + 2*c*d*x + d**2*x**2),x)*a*b*c**2 + 4*e**(2*e)*int(e* 
*(f*x)/(c**2 + 2*c*d*x + d**2*x**2),x)*a*b*c*d*x + e**e*int(1/(e**(2*e + 2 
*f*x)*c**2 + 2*e**(2*e + 2*f*x)*c*d*x + e**(2*e + 2*f*x)*d**2*x**2),x)*b** 
2*c**2 + e**e*int(1/(e**(2*e + 2*f*x)*c**2 + 2*e**(2*e + 2*f*x)*c*d*x + e* 
*(2*e + 2*f*x)*d**2*x**2),x)*b**2*c*d*x + 4*e**e*a**2*x - 2*e**e*b**2*x - 
4*int(1/(e**(f*x)*c**2 + 2*e**(f*x)*c*d*x + e**(f*x)*d**2*x**2),x)*a*b*c** 
2 - 4*int(1/(e**(f*x)*c**2 + 2*e**(f*x)*c*d*x + e**(f*x)*d**2*x**2),x)*a*b 
*c*d*x)/(4*e**e*c*(c + d*x))