\(\int \frac {(a+b \sin (c+d x^2))^2}{x^5} \, dx\) [17]

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

Optimal result

Integrand size = 18, antiderivative size = 169 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx=-\frac {2 a^2+b^2}{8 x^4}-\frac {a b d \cos \left (c+d x^2\right )}{2 x^2}+\frac {b^2 \cos \left (2 \left (c+d x^2\right )\right )}{8 x^4}+\frac {1}{2} b^2 d^2 \cos (2 c) \operatorname {CosIntegral}\left (2 d x^2\right )-\frac {1}{2} a b d^2 \operatorname {CosIntegral}\left (d x^2\right ) \sin (c)-\frac {a b \sin \left (c+d x^2\right )}{2 x^4}-\frac {b^2 d \sin \left (2 \left (c+d x^2\right )\right )}{4 x^2}-\frac {1}{2} a b d^2 \cos (c) \text {Si}\left (d x^2\right )-\frac {1}{2} b^2 d^2 \sin (2 c) \text {Si}\left (2 d x^2\right ) \] Output:

-1/8*(2*a^2+b^2)/x^4-1/2*a*b*d*cos(d*x^2+c)/x^2+1/8*b^2*cos(2*d*x^2+2*c)/x 
^4+1/2*b^2*d^2*cos(2*c)*Ci(2*d*x^2)-1/2*a*b*d^2*Ci(d*x^2)*sin(c)-1/2*a*b*s 
in(d*x^2+c)/x^4-1/4*b^2*d*sin(2*d*x^2+2*c)/x^2-1/2*a*b*d^2*cos(c)*Si(d*x^2 
)-1/2*b^2*d^2*sin(2*c)*Si(2*d*x^2)
 

Mathematica [A] (verified)

Time = 0.50 (sec) , antiderivative size = 158, normalized size of antiderivative = 0.93 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx=-\frac {2 a^2+b^2+4 a b d x^2 \cos \left (c+d x^2\right )-b^2 \cos \left (2 \left (c+d x^2\right )\right )-4 b^2 d^2 x^4 \cos (2 c) \operatorname {CosIntegral}\left (2 d x^2\right )+4 a b d^2 x^4 \operatorname {CosIntegral}\left (d x^2\right ) \sin (c)+4 a b \sin \left (c+d x^2\right )+2 b^2 d x^2 \sin \left (2 \left (c+d x^2\right )\right )+4 a b d^2 x^4 \cos (c) \text {Si}\left (d x^2\right )+4 b^2 d^2 x^4 \sin (2 c) \text {Si}\left (2 d x^2\right )}{8 x^4} \] Input:

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

Output:

-1/8*(2*a^2 + b^2 + 4*a*b*d*x^2*Cos[c + d*x^2] - b^2*Cos[2*(c + d*x^2)] - 
4*b^2*d^2*x^4*Cos[2*c]*CosIntegral[2*d*x^2] + 4*a*b*d^2*x^4*CosIntegral[d* 
x^2]*Sin[c] + 4*a*b*Sin[c + d*x^2] + 2*b^2*d*x^2*Sin[2*(c + d*x^2)] + 4*a* 
b*d^2*x^4*Cos[c]*SinIntegral[d*x^2] + 4*b^2*d^2*x^4*Sin[2*c]*SinIntegral[2 
*d*x^2])/x^4
 

Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 169, 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.167, Rules used = {3884, 6, 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 {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx\)

\(\Big \downarrow \) 3884

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

\(\Big \downarrow \) 6

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 a^2+b^2}{8 x^4}-\frac {1}{2} a b d^2 \sin (c) \operatorname {CosIntegral}\left (d x^2\right )-\frac {1}{2} a b d^2 \cos (c) \text {Si}\left (d x^2\right )-\frac {a b d \cos \left (c+d x^2\right )}{2 x^2}-\frac {a b \sin \left (c+d x^2\right )}{2 x^4}+\frac {1}{2} b^2 d^2 \cos (2 c) \operatorname {CosIntegral}\left (2 d x^2\right )-\frac {1}{2} b^2 d^2 \sin (2 c) \text {Si}\left (2 d x^2\right )-\frac {b^2 d \sin \left (2 \left (c+d x^2\right )\right )}{4 x^2}+\frac {b^2 \cos \left (2 \left (c+d x^2\right )\right )}{8 x^4}\)

Input:

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

Output:

-1/8*(2*a^2 + b^2)/x^4 - (a*b*d*Cos[c + d*x^2])/(2*x^2) + (b^2*Cos[2*(c + 
d*x^2)])/(8*x^4) + (b^2*d^2*Cos[2*c]*CosIntegral[2*d*x^2])/2 - (a*b*d^2*Co 
sIntegral[d*x^2]*Sin[c])/2 - (a*b*Sin[c + d*x^2])/(2*x^4) - (b^2*d*Sin[2*( 
c + d*x^2)])/(4*x^2) - (a*b*d^2*Cos[c]*SinIntegral[d*x^2])/2 - (b^2*d^2*Si 
n[2*c]*SinIntegral[2*d*x^2])/2
 

Defintions of rubi rules used

rule 6
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v 
+ (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] &&  !FreeQ[Fx, x]
 

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

rule 3884
Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x 
_Symbol] :> Int[ExpandTrigReduce[(e*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] 
/; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 3.15 (sec) , antiderivative size = 270, normalized size of antiderivative = 1.60

method result size
risch \(-\frac {-2 i {\mathrm e}^{-2 i c} \pi \,\operatorname {csgn}\left (d \,x^{2}\right ) b^{2} d^{2} x^{4}-2 i {\mathrm e}^{-i c} \operatorname {expIntegral}_{1}\left (-i d \,x^{2}\right ) a b \,d^{2} x^{4}+4 i {\mathrm e}^{-2 i c} \operatorname {Si}\left (2 d \,x^{2}\right ) b^{2} d^{2} x^{4}+2 i a b \,d^{2} \operatorname {expIntegral}_{1}\left (-i d \,x^{2}\right ) {\mathrm e}^{i c} x^{4}-2 \,{\mathrm e}^{-i c} \pi \,\operatorname {csgn}\left (d \,x^{2}\right ) a b \,d^{2} x^{4}+2 \,\operatorname {expIntegral}_{1}\left (-2 i d \,x^{2}\right ) {\mathrm e}^{-2 i c} b^{2} d^{2} x^{4}+2 b^{2} d^{2} \operatorname {expIntegral}_{1}\left (-2 i d \,x^{2}\right ) {\mathrm e}^{2 i c} x^{4}+4 \,{\mathrm e}^{-i c} \operatorname {Si}\left (d \,x^{2}\right ) a b \,d^{2} x^{4}+4 a b \,x^{2} \cos \left (d \,x^{2}+c \right ) d +2 b^{2} x^{2} \sin \left (2 d \,x^{2}+2 c \right ) d +4 \sin \left (d \,x^{2}+c \right ) a b -b^{2} \cos \left (2 d \,x^{2}+2 c \right )+2 a^{2}+b^{2}}{8 x^{4}}\) \(270\)

Input:

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

Output:

-1/8*(-2*I*exp(-2*I*c)*Pi*csgn(d*x^2)*b^2*d^2*x^4-2*I*exp(-I*c)*Ei(1,-I*d* 
x^2)*a*b*d^2*x^4+4*I*exp(-2*I*c)*Si(2*d*x^2)*b^2*d^2*x^4+2*I*a*b*d^2*Ei(1, 
-I*d*x^2)*exp(I*c)*x^4-2*exp(-I*c)*Pi*csgn(d*x^2)*a*b*d^2*x^4+2*Ei(1,-2*I* 
d*x^2)*exp(-2*I*c)*b^2*d^2*x^4+2*b^2*d^2*Ei(1,-2*I*d*x^2)*exp(2*I*c)*x^4+4 
*exp(-I*c)*Si(d*x^2)*a*b*d^2*x^4+4*a*b*x^2*cos(d*x^2+c)*d+2*b^2*x^2*sin(2* 
d*x^2+2*c)*d+4*sin(d*x^2+c)*a*b-b^2*cos(2*d*x^2+2*c)+2*a^2+b^2)/x^4
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.92 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx=\frac {2 \, b^{2} d^{2} x^{4} \cos \left (2 \, c\right ) \operatorname {Ci}\left (2 \, d x^{2}\right ) - 2 \, a b d^{2} x^{4} \operatorname {Ci}\left (d x^{2}\right ) \sin \left (c\right ) - 2 \, b^{2} d^{2} x^{4} \sin \left (2 \, c\right ) \operatorname {Si}\left (2 \, d x^{2}\right ) - 2 \, a b d^{2} x^{4} \cos \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) - 2 \, a b d x^{2} \cos \left (d x^{2} + c\right ) + b^{2} \cos \left (d x^{2} + c\right )^{2} - a^{2} - b^{2} - 2 \, {\left (b^{2} d x^{2} \cos \left (d x^{2} + c\right ) + a b\right )} \sin \left (d x^{2} + c\right )}{4 \, x^{4}} \] Input:

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

Output:

1/4*(2*b^2*d^2*x^4*cos(2*c)*cos_integral(2*d*x^2) - 2*a*b*d^2*x^4*cos_inte 
gral(d*x^2)*sin(c) - 2*b^2*d^2*x^4*sin(2*c)*sin_integral(2*d*x^2) - 2*a*b* 
d^2*x^4*cos(c)*sin_integral(d*x^2) - 2*a*b*d*x^2*cos(d*x^2 + c) + b^2*cos( 
d*x^2 + c)^2 - a^2 - b^2 - 2*(b^2*d*x^2*cos(d*x^2 + c) + a*b)*sin(d*x^2 + 
c))/x^4
 

Sympy [F]

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

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

Output:

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

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.15 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.76 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx=\frac {1}{2} \, {\left ({\left (i \, \Gamma \left (-2, i \, d x^{2}\right ) - i \, \Gamma \left (-2, -i \, d x^{2}\right )\right )} \cos \left (c\right ) + {\left (\Gamma \left (-2, i \, d x^{2}\right ) + \Gamma \left (-2, -i \, d x^{2}\right )\right )} \sin \left (c\right )\right )} a b d^{2} - \frac {{\left (4 \, {\left ({\left (\Gamma \left (-2, 2 i \, d x^{2}\right ) + \Gamma \left (-2, -2 i \, d x^{2}\right )\right )} \cos \left (2 \, c\right ) + {\left (-i \, \Gamma \left (-2, 2 i \, d x^{2}\right ) + i \, \Gamma \left (-2, -2 i \, d x^{2}\right )\right )} \sin \left (2 \, c\right )\right )} d^{2} x^{4} + 1\right )} b^{2}}{8 \, x^{4}} - \frac {a^{2}}{4 \, x^{4}} \] Input:

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

Output:

1/2*((I*gamma(-2, I*d*x^2) - I*gamma(-2, -I*d*x^2))*cos(c) + (gamma(-2, I* 
d*x^2) + gamma(-2, -I*d*x^2))*sin(c))*a*b*d^2 - 1/8*(4*((gamma(-2, 2*I*d*x 
^2) + gamma(-2, -2*I*d*x^2))*cos(2*c) + (-I*gamma(-2, 2*I*d*x^2) + I*gamma 
(-2, -2*I*d*x^2))*sin(2*c))*d^2*x^4 + 1)*b^2/x^4 - 1/4*a^2/x^4
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 448 vs. \(2 (153) = 306\).

Time = 0.14 (sec) , antiderivative size = 448, normalized size of antiderivative = 2.65 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx=\frac {4 \, {\left (d x^{2} + c\right )}^{2} b^{2} d^{3} \cos \left (2 \, c\right ) \operatorname {Ci}\left (2 \, d x^{2}\right ) - 8 \, {\left (d x^{2} + c\right )} b^{2} c d^{3} \cos \left (2 \, c\right ) \operatorname {Ci}\left (2 \, d x^{2}\right ) + 4 \, b^{2} c^{2} d^{3} \cos \left (2 \, c\right ) \operatorname {Ci}\left (2 \, d x^{2}\right ) - 4 \, {\left (d x^{2} + c\right )}^{2} a b d^{3} \operatorname {Ci}\left (d x^{2}\right ) \sin \left (c\right ) + 8 \, {\left (d x^{2} + c\right )} a b c d^{3} \operatorname {Ci}\left (d x^{2}\right ) \sin \left (c\right ) - 4 \, a b c^{2} d^{3} \operatorname {Ci}\left (d x^{2}\right ) \sin \left (c\right ) - 4 \, {\left (d x^{2} + c\right )}^{2} a b d^{3} \cos \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) + 8 \, {\left (d x^{2} + c\right )} a b c d^{3} \cos \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) - 4 \, a b c^{2} d^{3} \cos \left (c\right ) \operatorname {Si}\left (d x^{2}\right ) + 4 \, {\left (d x^{2} + c\right )}^{2} b^{2} d^{3} \sin \left (2 \, c\right ) \operatorname {Si}\left (-2 \, d x^{2}\right ) - 8 \, {\left (d x^{2} + c\right )} b^{2} c d^{3} \sin \left (2 \, c\right ) \operatorname {Si}\left (-2 \, d x^{2}\right ) + 4 \, b^{2} c^{2} d^{3} \sin \left (2 \, c\right ) \operatorname {Si}\left (-2 \, d x^{2}\right ) - 4 \, {\left (d x^{2} + c\right )} a b d^{3} \cos \left (d x^{2} + c\right ) + 4 \, a b c d^{3} \cos \left (d x^{2} + c\right ) - 2 \, {\left (d x^{2} + c\right )} b^{2} d^{3} \sin \left (2 \, d x^{2} + 2 \, c\right ) + 2 \, b^{2} c d^{3} \sin \left (2 \, d x^{2} + 2 \, c\right ) + b^{2} d^{3} \cos \left (2 \, d x^{2} + 2 \, c\right ) - 4 \, a b d^{3} \sin \left (d x^{2} + c\right ) - 2 \, a^{2} d^{3} - b^{2} d^{3}}{8 \, {\left ({\left (d x^{2} + c\right )}^{2} - 2 \, {\left (d x^{2} + c\right )} c + c^{2}\right )} d} \] Input:

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

Output:

1/8*(4*(d*x^2 + c)^2*b^2*d^3*cos(2*c)*cos_integral(2*d*x^2) - 8*(d*x^2 + c 
)*b^2*c*d^3*cos(2*c)*cos_integral(2*d*x^2) + 4*b^2*c^2*d^3*cos(2*c)*cos_in 
tegral(2*d*x^2) - 4*(d*x^2 + c)^2*a*b*d^3*cos_integral(d*x^2)*sin(c) + 8*( 
d*x^2 + c)*a*b*c*d^3*cos_integral(d*x^2)*sin(c) - 4*a*b*c^2*d^3*cos_integr 
al(d*x^2)*sin(c) - 4*(d*x^2 + c)^2*a*b*d^3*cos(c)*sin_integral(d*x^2) + 8* 
(d*x^2 + c)*a*b*c*d^3*cos(c)*sin_integral(d*x^2) - 4*a*b*c^2*d^3*cos(c)*si 
n_integral(d*x^2) + 4*(d*x^2 + c)^2*b^2*d^3*sin(2*c)*sin_integral(-2*d*x^2 
) - 8*(d*x^2 + c)*b^2*c*d^3*sin(2*c)*sin_integral(-2*d*x^2) + 4*b^2*c^2*d^ 
3*sin(2*c)*sin_integral(-2*d*x^2) - 4*(d*x^2 + c)*a*b*d^3*cos(d*x^2 + c) + 
 4*a*b*c*d^3*cos(d*x^2 + c) - 2*(d*x^2 + c)*b^2*d^3*sin(2*d*x^2 + 2*c) + 2 
*b^2*c*d^3*sin(2*d*x^2 + 2*c) + b^2*d^3*cos(2*d*x^2 + 2*c) - 4*a*b*d^3*sin 
(d*x^2 + c) - 2*a^2*d^3 - b^2*d^3)/(((d*x^2 + c)^2 - 2*(d*x^2 + c)*c + c^2 
)*d)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^5} \, dx =\text {Too large to display} \] Input:

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

Output:

( - 10*cos(c + d*x**2)*sin(c + d*x**2)*tan((c + d*x**2)/2)**4*a*b + 10*cos 
(c + d*x**2)*sin(c + d*x**2)*tan((c + d*x**2)/2)**4*b**2*d*x**2 - 20*cos(c 
 + d*x**2)*sin(c + d*x**2)*tan((c + d*x**2)/2)**2*a*b + 20*cos(c + d*x**2) 
*sin(c + d*x**2)*tan((c + d*x**2)/2)**2*b**2*d*x**2 - 10*cos(c + d*x**2)*s 
in(c + d*x**2)*a*b + 10*cos(c + d*x**2)*sin(c + d*x**2)*b**2*d*x**2 - 40*c 
os(c + d*x**2)*tan((c + d*x**2)/2)**4*b**2 - 80*cos(c + d*x**2)*tan((c + d 
*x**2)/2)**2*b**2 - 40*cos(c + d*x**2)*b**2 + 96*int(tan((c + d*x**2)/2)** 
3/(tan((c + d*x**2)/2)**4*x**5 + 2*tan((c + d*x**2)/2)**2*x**5 + x**5),x)* 
tan((c + d*x**2)/2)**4*a*b*x**4 + 192*int(tan((c + d*x**2)/2)**3/(tan((c + 
 d*x**2)/2)**4*x**5 + 2*tan((c + d*x**2)/2)**2*x**5 + x**5),x)*tan((c + d* 
x**2)/2)**2*a*b*x**4 + 96*int(tan((c + d*x**2)/2)**3/(tan((c + d*x**2)/2)* 
*4*x**5 + 2*tan((c + d*x**2)/2)**2*x**5 + x**5),x)*a*b*x**4 - 480*int(tan( 
(c + d*x**2)/2)**2/(tan((c + d*x**2)/2)**4*x + 2*tan((c + d*x**2)/2)**2*x 
+ x),x)*tan((c + d*x**2)/2)**4*b**2*d**2*x**4 - 960*int(tan((c + d*x**2)/2 
)**2/(tan((c + d*x**2)/2)**4*x + 2*tan((c + d*x**2)/2)**2*x + x),x)*tan((c 
 + d*x**2)/2)**2*b**2*d**2*x**4 - 480*int(tan((c + d*x**2)/2)**2/(tan((c + 
 d*x**2)/2)**4*x + 2*tan((c + d*x**2)/2)**2*x + x),x)*b**2*d**2*x**4 + 96* 
int(1/(tan((c + d*x**2)/2)**4*x**3 + 2*tan((c + d*x**2)/2)**2*x**3 + x**3) 
,x)*tan((c + d*x**2)/2)**4*a*b*d*x**4 + 192*int(1/(tan((c + d*x**2)/2)**4* 
x**3 + 2*tan((c + d*x**2)/2)**2*x**3 + x**3),x)*tan((c + d*x**2)/2)**2*...