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

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

Optimal result

Integrand size = 22, antiderivative size = 199 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^2} \, dx=\frac {a^2}{e \left (f+\frac {e}{x}\right )}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {d f}{e}+\frac {d}{x}\right )}{e^2}-\frac {b^2 d \operatorname {CosIntegral}\left (\frac {2 d \left (f+\frac {e}{x}\right )}{e}\right ) \sin \left (2 c-\frac {2 d f}{e}\right )}{e^2}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d f}{e}+\frac {d}{x}\right )}{e^2}-\frac {b^2 d \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (\frac {2 d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2} \] Output:

a^2/e/(f+e/x)-2*a*b*d*cos(c-d*f/e)*Ci(d*f/e+d/x)/e^2-b^2*d*Ci(2*d*(f+e/x)/ 
e)*sin(2*c-2*d*f/e)/e^2+2*a*b*sin(c+d/x)/e/(f+e/x)+b^2*sin(c+d/x)^2/e/(f+e 
/x)+2*a*b*d*sin(c-d*f/e)*Si(d*f/e+d/x)/e^2-b^2*d*cos(2*c-2*d*f/e)*Si(2*d*( 
f+e/x)/e)/e^2
 

Mathematica [A] (verified)

Time = 1.58 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.32 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^2} \, dx=-\frac {2 a^2 e^2+b^2 e^2+b^2 e f x \cos \left (2 \left (c+\frac {d}{x}\right )\right )+4 a b d f (e+f x) \cos \left (c-\frac {d f}{e}\right ) \operatorname {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+2 b^2 d f (e+f x) \operatorname {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (2 c-\frac {2 d f}{e}\right )-4 a b e f x \sin \left (c+\frac {d}{x}\right )-4 a b d e f \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-4 a b d f^2 x \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+2 b^2 d e f \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+2 b^2 d f^2 x \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 e^2 f (e+f x)} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.01, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3912, 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 {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^2} \, dx\)

\(\Big \downarrow \) 3912

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3798

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

a^2/(e*(f + e/x)) - (2*a*b*d*Cos[c - (d*f)/e]*CosIntegral[(d*f)/e + d/x])/ 
e^2 - (b^2*d*CosIntegral[(2*d*f)/e + (2*d)/x]*Sin[2*c - (2*d*f)/e])/e^2 + 
(2*a*b*Sin[c + d/x])/(e*(f + e/x)) + (b^2*Sin[c + d/x]^2)/(e*(f + e/x)) + 
(2*a*b*d*Sin[c - (d*f)/e]*SinIntegral[(d*f)/e + d/x])/e^2 - (b^2*d*Cos[2*c 
 - (2*d*f)/e]*SinIntegral[(2*d*f)/e + (2*d)/x])/e^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])
 

rule 3912
Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f 
_.)*(x_))^(n_)])^(p_.), x_Symbol] :> Simp[1/(n*f)   Subst[Int[ExpandIntegra 
nd[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m, x], 
 x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p 
, 0] && IntegerQ[1/n]
 
Maple [A] (verified)

Time = 2.81 (sec) , antiderivative size = 292, normalized size of antiderivative = 1.47

method result size
parts \(-\frac {a^{2}}{f \left (f x +e \right )}-b^{2} d \left (-\frac {1}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {\cos \left (\frac {2 d}{x}+2 c \right )}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {\frac {2 \,\operatorname {Si}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{e}-\frac {2 \,\operatorname {Ci}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{e}}{2 e}\right )-2 a b d \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {\frac {\operatorname {Si}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\operatorname {Ci}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )\) \(292\)
derivativedivides \(-d \left (-\frac {a^{2}}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+2 a b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {-\frac {\operatorname {Si}\left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\operatorname {Ci}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )-\frac {b^{2}}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {b^{2} \left (-\frac {2 \cos \left (\frac {2 d}{x}+2 c \right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {2 \left (-\frac {2 \,\operatorname {Si}\left (-\frac {2 d}{x}-2 c -\frac {2 \left (-c e +d f \right )}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{e}-\frac {2 \,\operatorname {Ci}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{e}\right )}{e}\right )}{4}\right )\) \(313\)
default \(-d \left (-\frac {a^{2}}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+2 a b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {-\frac {\operatorname {Si}\left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\operatorname {Ci}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )-\frac {b^{2}}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {b^{2} \left (-\frac {2 \cos \left (\frac {2 d}{x}+2 c \right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {2 \left (-\frac {2 \,\operatorname {Si}\left (-\frac {2 d}{x}-2 c -\frac {2 \left (-c e +d f \right )}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{e}-\frac {2 \,\operatorname {Ci}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{e}\right )}{e}\right )}{4}\right )\) \(313\)
risch \(\frac {a b d \,{\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \operatorname {expIntegral}_{1}\left (\frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right )}{e^{2}}-\frac {a^{2}}{f \left (f x +e \right )}-\frac {b^{2}}{2 f \left (f x +e \right )}+\frac {i d \,b^{2} {\mathrm e}^{-\frac {2 i \left (c e -d f \right )}{e}} \operatorname {expIntegral}_{1}\left (\frac {2 i d}{x}+2 i c -\frac {2 i \left (c e -d f \right )}{e}\right )}{2 e^{2}}-\frac {i d \,b^{2} {\mathrm e}^{\frac {2 i \left (c e -d f \right )}{e}} \operatorname {expIntegral}_{1}\left (-\frac {2 i d}{x}-2 i c -\frac {2 \left (-i c e +i f d \right )}{e}\right )}{2 e^{2}}+\frac {a b d \,{\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \operatorname {expIntegral}_{1}\left (-\frac {i d}{x}-i c -\frac {-i c e +i f d}{e}\right )}{e^{2}}+\frac {2 i a b d \sin \left (\frac {c x +d}{x}\right )}{e \left (-i c e +i f d +e \left (i c +\frac {i d}{x}\right )\right )}-\frac {i d \,b^{2} \cos \left (\frac {2 c x +2 d}{x}\right )}{2 e^{2} \left (\frac {i d}{x}+i c +\frac {-i c e +i f d}{e}\right )}\) \(338\)

Input:

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

Output:

-1/f/(f*x+e)*a^2-b^2*d*(-1/2/(-c*e+d*f+e*(c+d/x))/e+1/2*cos(2*d/x+2*c)/(-c 
*e+d*f+e*(c+d/x))/e+1/2*(2*Si(2*d/x+2*c+2*(-c*e+d*f)/e)*cos(2*(-c*e+d*f)/e 
)/e-2*Ci(2*d/x+2*c+2*(-c*e+d*f)/e)*sin(2*(-c*e+d*f)/e)/e)/e)-2*a*b*d*(-sin 
(c+d/x)/(-c*e+d*f+e*(c+d/x))/e+(Si(d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)/e)/e 
+Ci(d/x+c+(-c*e+d*f)/e)*cos((-c*e+d*f)/e)/e)/e)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.36 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^2} \, dx=-\frac {2 \, b^{2} e f x \cos \left (\frac {c x + d}{x}\right )^{2} - 4 \, a b e f x \sin \left (\frac {c x + d}{x}\right ) - b^{2} e f x + {\left (2 \, a^{2} + b^{2}\right )} e^{2} + 4 \, {\left (a b d f^{2} x + a b d e f\right )} \cos \left (-\frac {c e - d f}{e}\right ) \operatorname {Ci}\left (\frac {d f x + d e}{e x}\right ) - 2 \, {\left (b^{2} d f^{2} x + b^{2} d e f\right )} \operatorname {Ci}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) \sin \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) + 2 \, {\left (b^{2} d f^{2} x + b^{2} d e f\right )} \cos \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) + 4 \, {\left (a b d f^{2} x + a b d e f\right )} \sin \left (-\frac {c e - d f}{e}\right ) \operatorname {Si}\left (\frac {d f x + d e}{e x}\right )}{2 \, {\left (e^{2} f^{2} x + e^{3} f\right )}} \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

-a^2/(f^2*x + e*f) - 1/2*(b^2 + 2*(b^2*f^2*x + b^2*e*f)*integrate(1/4*cos( 
2*(c*x + d)/x)/(f^2*x^2 + 2*e*f*x + e^2), x) + 2*(b^2*f^2*x + b^2*e*f)*int 
egrate(1/4*cos(2*(c*x + d)/x)/((f^2*x^2 + 2*e*f*x + e^2)*cos(2*(c*x + d)/x 
)^2 + (f^2*x^2 + 2*e*f*x + e^2)*sin(2*(c*x + d)/x)^2), x) - 2*(a*b*f^2*x + 
 a*b*e*f)*integrate(sin((c*x + d)/x)/(f^2*x^2 + 2*e*f*x + e^2), x) - 2*(a* 
b*f^2*x + a*b*e*f)*integrate(sin((c*x + d)/x)/((f^2*x^2 + 2*e*f*x + e^2)*c 
os((c*x + d)/x)^2 + (f^2*x^2 + 2*e*f*x + e^2)*sin((c*x + d)/x)^2), x))/(f^ 
2*x + e*f)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 686 vs. \(2 (199) = 398\).

Time = 0.13 (sec) , antiderivative size = 686, normalized size of antiderivative = 3.45 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^2} \, dx =\text {Too large to display} \] Input:

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

Output:

-1/2*(4*a*b*c*d^2*e*cos((c*e - d*f)/e)*cos_integral(-(c*e - d*f - (c*x + d 
)*e/x)/e) - 4*a*b*d^3*f*cos((c*e - d*f)/e)*cos_integral(-(c*e - d*f - (c*x 
 + d)*e/x)/e) + 2*b^2*c*d^2*e*cos_integral(-2*(c*e - d*f - (c*x + d)*e/x)/ 
e)*sin(2*(c*e - d*f)/e) - 2*b^2*d^3*f*cos_integral(-2*(c*e - d*f - (c*x + 
d)*e/x)/e)*sin(2*(c*e - d*f)/e) - 2*b^2*c*d^2*e*cos(2*(c*e - d*f)/e)*sin_i 
ntegral(2*(c*e - d*f - (c*x + d)*e/x)/e) + 2*b^2*d^3*f*cos(2*(c*e - d*f)/e 
)*sin_integral(2*(c*e - d*f - (c*x + d)*e/x)/e) + 4*a*b*c*d^2*e*sin((c*e - 
 d*f)/e)*sin_integral((c*e - d*f - (c*x + d)*e/x)/e) - 4*a*b*d^3*f*sin((c* 
e - d*f)/e)*sin_integral((c*e - d*f - (c*x + d)*e/x)/e) - 4*(c*x + d)*a*b* 
d^2*e*cos((c*e - d*f)/e)*cos_integral(-(c*e - d*f - (c*x + d)*e/x)/e)/x - 
2*(c*x + d)*b^2*d^2*e*cos_integral(-2*(c*e - d*f - (c*x + d)*e/x)/e)*sin(2 
*(c*e - d*f)/e)/x + 2*(c*x + d)*b^2*d^2*e*cos(2*(c*e - d*f)/e)*sin_integra 
l(2*(c*e - d*f - (c*x + d)*e/x)/e)/x - 4*(c*x + d)*a*b*d^2*e*sin((c*e - d* 
f)/e)*sin_integral((c*e - d*f - (c*x + d)*e/x)/e)/x - b^2*d^2*e*cos(2*(c*x 
 + d)/x) + 4*a*b*d^2*e*sin((c*x + d)/x) + 2*a^2*d^2*e + b^2*d^2*e)/((c*e^3 
 - d*e^2*f - (c*x + d)*e^3/x)*d)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - 4*cos((c*x + d)/x)*sin((c*x + d)/x)*a*b*d**3*e**2*f**3*x - 2*cos((c*x 
+ d)/x)*sin((c*x + d)/x)*a*b*d*e**4*f*x - 2*cos((c*x + d)/x)*sin((c*x + d) 
/x)*a*b*d*e**3*f**2*x**2 - 5*cos((c*x + d)/x)*sin((c*x + d)/x)*b**2*d**2*e 
**3*f**2*x + 3*cos((c*x + d)/x)*sin((c*x + d)/x)*b**2*d**2*e**2*f**3*x**2 
- 4*cos((c*x + d)/x)*sin((c*x + d)/x)*b**2*e**5*x - 4*cos((c*x + d)/x)*sin 
((c*x + d)/x)*b**2*e**4*f*x**2 + 4*cos((c*x + d)/x)*a*b*d**2*e**3*f**2*x - 
 4*cos((c*x + d)/x)*a*b*d**2*e**2*f**3*x**2 + 8*cos((c*x + d)/x)*b**2*d*e* 
*4*f*x - 8*cos((c*x + d)/x)*b**2*d*e**3*f**2*x**2 + 24*int(tan((c*x + d)/( 
2*x))**2/(tan((c*x + d)/(2*x))**4*e**2*x**2 + 2*tan((c*x + d)/(2*x))**4*e* 
f*x**3 + tan((c*x + d)/(2*x))**4*f**2*x**4 + 2*tan((c*x + d)/(2*x))**2*e** 
2*x**2 + 4*tan((c*x + d)/(2*x))**2*e*f*x**3 + 2*tan((c*x + d)/(2*x))**2*f* 
*2*x**4 + e**2*x**2 + 2*e*f*x**3 + f**2*x**4),x)*b**2*d**3*e**5*f**2*x + 2 
4*int(tan((c*x + d)/(2*x))**2/(tan((c*x + d)/(2*x))**4*e**2*x**2 + 2*tan(( 
c*x + d)/(2*x))**4*e*f*x**3 + tan((c*x + d)/(2*x))**4*f**2*x**4 + 2*tan((c 
*x + d)/(2*x))**2*e**2*x**2 + 4*tan((c*x + d)/(2*x))**2*e*f*x**3 + 2*tan(( 
c*x + d)/(2*x))**2*f**2*x**4 + e**2*x**2 + 2*e*f*x**3 + f**2*x**4),x)*b**2 
*d**3*e**4*f**3*x**2 - 16*int(tan((c*x + d)/(2*x))/(tan((c*x + d)/(2*x))** 
4*e**2*x**2 + 2*tan((c*x + d)/(2*x))**4*e*f*x**3 + tan((c*x + d)/(2*x))**4 
*f**2*x**4 + 2*tan((c*x + d)/(2*x))**2*e**2*x**2 + 4*tan((c*x + d)/(2*x))* 
*2*e*f*x**3 + 2*tan((c*x + d)/(2*x))**2*f**2*x**4 + e**2*x**2 + 2*e*f*x...