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

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

Optimal result

Integrand size = 25, antiderivative size = 294 \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx=\frac {d^2 \left (12 c^2+16 c d+7 d^2\right ) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{a^2 (c-d)^4 (c+d)^2 \sqrt {c^2-d^2} f}-\frac {d \left (2 c^2-16 c d-21 d^2\right ) \cos (e+f x)}{6 a^2 (c-d)^3 (c+d) f (c+d \sin (e+f x))^2}-\frac {(c-8 d) \cos (e+f x)}{3 a^2 (c-d)^2 f (1+\sin (e+f x)) (c+d \sin (e+f x))^2}-\frac {\cos (e+f x)}{3 (c-d) f (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^2}-\frac {d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{6 a^2 (c-d)^4 (c+d)^2 f (c+d \sin (e+f x))} \] Output:

d^2*(12*c^2+16*c*d+7*d^2)*arctan((d+c*tan(1/2*f*x+1/2*e))/(c^2-d^2)^(1/2)) 
/a^2/(c-d)^4/(c+d)^2/(c^2-d^2)^(1/2)/f-1/6*d*(2*c^2-16*c*d-21*d^2)*cos(f*x 
+e)/a^2/(c-d)^3/(c+d)/f/(c+d*sin(f*x+e))^2-1/3*(c-8*d)*cos(f*x+e)/a^2/(c-d 
)^2/f/(1+sin(f*x+e))/(c+d*sin(f*x+e))^2-1/3*cos(f*x+e)/(c-d)/f/(a+a*sin(f* 
x+e))^2/(c+d*sin(f*x+e))^2-1/6*d*(2*c^3-16*c^2*d-59*c*d^2-32*d^3)*cos(f*x+ 
e)/a^2/(c-d)^4/(c+d)^2/f/(c+d*sin(f*x+e))
 

Mathematica [A] (verified)

Time = 4.30 (sec) , antiderivative size = 338, normalized size of antiderivative = 1.15 \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (4 (c-d) \sin \left (\frac {1}{2} (e+f x)\right )-2 (c-d) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+4 (c-10 d) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+\frac {6 d^2 \left (12 c^2+16 c d+7 d^2\right ) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3}{(c+d)^2 \sqrt {c^2-d^2}}+\frac {3 (c-d) d^3 \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3}{(c+d) (c+d \sin (e+f x))^2}+\frac {3 d^3 (7 c+4 d) \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3}{(c+d)^2 (c+d \sin (e+f x))}\right )}{6 a^2 (c-d)^4 f (1+\sin (e+f x))^2} \] Input:

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

Output:

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(4*(c - d)*Sin[(e + f*x)/2] - 2*(c 
- d)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) + 4*(c - 10*d)*Sin[(e + f*x)/2] 
*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + (6*d^2*(12*c^2 + 16*c*d + 7*d^2 
)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(Cos[(e + f*x)/2] + Sin 
[(e + f*x)/2])^3)/((c + d)^2*Sqrt[c^2 - d^2]) + (3*(c - d)*d^3*Cos[e + f*x 
]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3)/((c + d)*(c + d*Sin[e + f*x])^2 
) + (3*d^3*(7*c + 4*d)*Cos[e + f*x]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^ 
3)/((c + d)^2*(c + d*Sin[e + f*x]))))/(6*a^2*(c - d)^4*f*(1 + Sin[e + f*x] 
)^2)
 

Rubi [A] (verified)

Time = 1.28 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.10, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.640, Rules used = {3042, 3245, 25, 3042, 3457, 25, 3042, 3233, 25, 3042, 3233, 27, 3042, 3139, 1083, 217}

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 {1}{(a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{(a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^3}dx\)

\(\Big \downarrow \) 3245

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3457

\(\displaystyle \frac {-\frac {\int -\frac {21 d^2 a^2+2 (c-8 d) d \sin (e+f x) a^2}{(c+d \sin (e+f x))^3}dx}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\int \frac {21 d^2 a^2+2 (c-8 d) d \sin (e+f x) a^2}{(c+d \sin (e+f x))^3}dx}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int \frac {21 d^2 a^2+2 (c-8 d) d \sin (e+f x) a^2}{(c+d \sin (e+f x))^3}dx}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 3233

\(\displaystyle \frac {\frac {-\frac {\int -\frac {2 d^2 (19 c+16 d) a^2+d \left (2 c (c-8 d)-21 d^2\right ) \sin (e+f x) a^2}{(c+d \sin (e+f x))^2}dx}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\int \frac {2 d^2 (19 c+16 d) a^2+d \left (2 c (c-8 d)-21 d^2\right ) \sin (e+f x) a^2}{(c+d \sin (e+f x))^2}dx}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {\int \frac {2 d^2 (19 c+16 d) a^2+d \left (2 c (c-8 d)-21 d^2\right ) \sin (e+f x) a^2}{(c+d \sin (e+f x))^2}dx}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 3233

\(\displaystyle \frac {\frac {\frac {-\frac {\int -\frac {3 a^2 d^2 \left (12 c^2+16 d c+7 d^2\right )}{c+d \sin (e+f x)}dx}{c^2-d^2}-\frac {a^2 d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\frac {3 a^2 d^2 \left (12 c^2+16 c d+7 d^2\right ) \int \frac {1}{c+d \sin (e+f x)}dx}{c^2-d^2}-\frac {a^2 d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {\frac {3 a^2 d^2 \left (12 c^2+16 c d+7 d^2\right ) \int \frac {1}{c+d \sin (e+f x)}dx}{c^2-d^2}-\frac {a^2 d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 3139

\(\displaystyle \frac {\frac {\frac {\frac {6 a^2 d^2 \left (12 c^2+16 c d+7 d^2\right ) \int \frac {1}{c \tan ^2\left (\frac {1}{2} (e+f x)\right )+2 d \tan \left (\frac {1}{2} (e+f x)\right )+c}d\tan \left (\frac {1}{2} (e+f x)\right )}{f \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {\frac {\frac {-\frac {12 a^2 d^2 \left (12 c^2+16 c d+7 d^2\right ) \int \frac {1}{-\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )^2-4 \left (c^2-d^2\right )}d\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )}{f \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {\frac {\frac {\frac {6 a^2 d^2 \left (12 c^2+16 c d+7 d^2\right ) \arctan \left (\frac {2 c \tan \left (\frac {1}{2} (e+f x)\right )+2 d}{2 \sqrt {c^2-d^2}}\right )}{f \left (c^2-d^2\right )^{3/2}}-\frac {a^2 d \left (2 c^3-16 c^2 d-59 c d^2-32 d^3\right ) \cos (e+f x)}{f \left (c^2-d^2\right ) (c+d \sin (e+f x))}}{2 \left (c^2-d^2\right )}-\frac {a^2 d \left (2 c (c-8 d)-21 d^2\right ) \cos (e+f x)}{2 f \left (c^2-d^2\right ) (c+d \sin (e+f x))^2}}{a^2 (c-d)}-\frac {(c-8 d) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1) (c+d \sin (e+f x))^2}}{3 a^2 (c-d)}-\frac {\cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^2}\)

Input:

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

Output:

-1/3*Cos[e + f*x]/((c - d)*f*(a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^2 
) + (-(((c - 8*d)*Cos[e + f*x])/((c - d)*f*(1 + Sin[e + f*x])*(c + d*Sin[e 
 + f*x])^2)) + (-1/2*(a^2*d*(2*c*(c - 8*d) - 21*d^2)*Cos[e + f*x])/((c^2 - 
 d^2)*f*(c + d*Sin[e + f*x])^2) + ((6*a^2*d^2*(12*c^2 + 16*c*d + 7*d^2)*Ar 
cTan[(2*d + 2*c*Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2])])/((c^2 - d^2)^(3/2) 
*f) - (a^2*d*(2*c^3 - 16*c^2*d - 59*c*d^2 - 32*d^3)*Cos[e + f*x])/((c^2 - 
d^2)*f*(c + d*Sin[e + f*x])))/(2*(c^2 - d^2)))/(a^2*(c - d)))/(3*a^2*(c - 
d))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

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

rule 3139
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre 
eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + 2*b*e*x + a 
*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ 
[a^2 - b^2, 0]
 

rule 3233
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*Cos[e + f*x]*((a + b*Sin[e + 
 f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(a^2 - b^2)) 
  Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*( 
m + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c 
- a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
 

rule 3245
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^ 
m*((c + d*Sin[e + f*x])^(n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/( 
a*(2*m + 1)*(b*c - a*d))   Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + 
f*x])^n*Simp[b*c*(m + 1) - a*d*(2*m + n + 2) + b*d*(m + n + 2)*Sin[e + f*x] 
, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ 
[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] &&  !GtQ[n, 0] && (Intege 
rsQ[2*m, 2*n] || (IntegerQ[m] && EqQ[c, 0]))
 

rule 3457
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
(f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim 
p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( 
n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) 
  Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b 
*d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 
2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ 
[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] 
 &&  !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
 
Maple [A] (verified)

Time = 3.62 (sec) , antiderivative size = 378, normalized size of antiderivative = 1.29

method result size
derivativedivides \(\frac {\frac {2 d^{2} \left (\frac {\frac {d^{2} \left (9 c^{2}+4 c d -2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 c \left (c^{2}+2 c d +d^{2}\right )}+\frac {d \left (8 c^{4}+4 c^{3} d +15 c^{2} d^{2}+8 c \,d^{3}-2 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 c^{2} \left (c^{2}+2 c d +d^{2}\right )}+\frac {d^{2} \left (23 c^{2}+12 c d -2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) c}+\frac {d \left (8 c^{2}+4 c d -d^{2}\right )}{2 c^{2}+4 c d +2 d^{2}}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c \right )^{2}}+\frac {\left (12 c^{2}+16 c d +7 d^{2}\right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) \sqrt {c^{2}-d^{2}}}\right )}{\left (c -d \right )^{4}}-\frac {2 \left (c -4 d \right )}{\left (c -d \right )^{4} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {4}{3 \left (c -d \right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {2}{\left (c -d \right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}{a^{2} f}\) \(378\)
default \(\frac {\frac {2 d^{2} \left (\frac {\frac {d^{2} \left (9 c^{2}+4 c d -2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 c \left (c^{2}+2 c d +d^{2}\right )}+\frac {d \left (8 c^{4}+4 c^{3} d +15 c^{2} d^{2}+8 c \,d^{3}-2 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 c^{2} \left (c^{2}+2 c d +d^{2}\right )}+\frac {d^{2} \left (23 c^{2}+12 c d -2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) c}+\frac {d \left (8 c^{2}+4 c d -d^{2}\right )}{2 c^{2}+4 c d +2 d^{2}}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c \right )^{2}}+\frac {\left (12 c^{2}+16 c d +7 d^{2}\right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) \sqrt {c^{2}-d^{2}}}\right )}{\left (c -d \right )^{4}}-\frac {2 \left (c -4 d \right )}{\left (c -d \right )^{4} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {4}{3 \left (c -d \right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {2}{\left (c -d \right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}{a^{2} f}\) \(378\)
risch \(\text {Expression too large to display}\) \(1076\)

Input:

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

Output:

2/f/a^2*(d^2/(c-d)^4*((1/2*d^2*(9*c^2+4*c*d-2*d^2)/c/(c^2+2*c*d+d^2)*tan(1 
/2*f*x+1/2*e)^3+1/2*d*(8*c^4+4*c^3*d+15*c^2*d^2+8*c*d^3-2*d^4)/c^2/(c^2+2* 
c*d+d^2)*tan(1/2*f*x+1/2*e)^2+1/2*d^2*(23*c^2+12*c*d-2*d^2)/(c^2+2*c*d+d^2 
)/c*tan(1/2*f*x+1/2*e)+1/2*d*(8*c^2+4*c*d-d^2)/(c^2+2*c*d+d^2))/(tan(1/2*f 
*x+1/2*e)^2*c+2*d*tan(1/2*f*x+1/2*e)+c)^2+1/2*(12*c^2+16*c*d+7*d^2)/(c^2+2 
*c*d+d^2)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2 
)^(1/2)))-(c-4*d)/(c-d)^4/(tan(1/2*f*x+1/2*e)+1)-2/3/(c-d)^3/(tan(1/2*f*x+ 
1/2*e)+1)^3+1/(c-d)^3/(tan(1/2*f*x+1/2*e)+1)^2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1728 vs. \(2 (281) = 562\).

Time = 0.29 (sec) , antiderivative size = 3540, normalized size of antiderivative = 12.04 \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*d^2-4*c^2>0)', see `assume?` f 
or more de
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 594 vs. \(2 (281) = 562\).

Time = 0.19 (sec) , antiderivative size = 594, normalized size of antiderivative = 2.02 \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx =\text {Too large to display} \] Input:

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

Output:

1/3*(3*(12*c^2*d^2 + 16*c*d^3 + 7*d^4)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*s 
gn(c) + arctan((c*tan(1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/((a^2*c^6 - 
2*a^2*c^5*d - a^2*c^4*d^2 + 4*a^2*c^3*d^3 - a^2*c^2*d^4 - 2*a^2*c*d^5 + a^ 
2*d^6)*sqrt(c^2 - d^2)) + 3*(9*c^3*d^4*tan(1/2*f*x + 1/2*e)^3 + 4*c^2*d^5* 
tan(1/2*f*x + 1/2*e)^3 - 2*c*d^6*tan(1/2*f*x + 1/2*e)^3 + 8*c^4*d^3*tan(1/ 
2*f*x + 1/2*e)^2 + 4*c^3*d^4*tan(1/2*f*x + 1/2*e)^2 + 15*c^2*d^5*tan(1/2*f 
*x + 1/2*e)^2 + 8*c*d^6*tan(1/2*f*x + 1/2*e)^2 - 2*d^7*tan(1/2*f*x + 1/2*e 
)^2 + 23*c^3*d^4*tan(1/2*f*x + 1/2*e) + 12*c^2*d^5*tan(1/2*f*x + 1/2*e) - 
2*c*d^6*tan(1/2*f*x + 1/2*e) + 8*c^4*d^3 + 4*c^3*d^4 - c^2*d^5)/((a^2*c^8 
- 2*a^2*c^7*d - a^2*c^6*d^2 + 4*a^2*c^5*d^3 - a^2*c^4*d^4 - 2*a^2*c^3*d^5 
+ a^2*c^2*d^6)*(c*tan(1/2*f*x + 1/2*e)^2 + 2*d*tan(1/2*f*x + 1/2*e) + c)^2 
) - 2*(3*c*tan(1/2*f*x + 1/2*e)^2 - 12*d*tan(1/2*f*x + 1/2*e)^2 + 3*c*tan( 
1/2*f*x + 1/2*e) - 21*d*tan(1/2*f*x + 1/2*e) + 2*c - 11*d)/((a^2*c^4 - 4*a 
^2*c^3*d + 6*a^2*c^2*d^2 - 4*a^2*c*d^3 + a^2*d^4)*(tan(1/2*f*x + 1/2*e) + 
1)^3))/f
 

Mupad [B] (verification not implemented)

Time = 19.39 (sec) , antiderivative size = 1199, normalized size of antiderivative = 4.08 \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx =\text {Too large to display} \] Input:

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

Output:

((12*c*d^4 + 14*c^4*d - 4*c^5 - 3*d^5 + 46*c^2*d^3 + 40*c^3*d^2)/(3*(c + d 
)*(c^2 - d^2)*(3*c*d^2 - 3*c^2*d + c^3 - d^3)) + (tan(e/2 + (f*x)/2)^5*(4* 
c*d^5 + 4*c^5*d - 2*c^6 - 2*d^6 + 23*c^2*d^4 + 40*c^3*d^3 + 38*c^4*d^2))/( 
c^2*(c^5 - 3*c^4*d - 3*c*d^4 + d^5 + 2*c^2*d^3 + 2*c^3*d^2)) + (2*tan(e/2 
+ (f*x)/2)^3*(33*c*d^5 + 16*c^5*d - 6*c^6 - 9*d^6 + 177*c^2*d^4 + 212*c^3* 
d^3 + 102*c^4*d^2))/(3*c^2*(c^2 - d^2)*(3*c*d^2 - 3*c^2*d + c^3 - d^3)) + 
(tan(e/2 + (f*x)/2)*(33*c*d^4 + 20*c^4*d - 6*c^5 - 6*d^5 + 160*c^2*d^3 + 1 
14*c^3*d^2))/(3*c*(c^2 - d^2)*(3*c*d^2 - 3*c^2*d + c^3 - d^3)) + (tan(e/2 
+ (f*x)/2)^2*(6*c*d^6 + 16*c^6*d - 14*c^7 - 6*d^7 + 232*c^2*d^5 + 583*c^3* 
d^4 + 532*c^4*d^3 + 226*c^5*d^2))/(3*c^2*(c + d)*(c^2 - d^2)*(3*c*d^2 - 3* 
c^2*d + c^3 - d^3)) + (tan(e/2 + (f*x)/2)^4*(48*c*d^6 + 14*c^6*d - 16*c^7 
- 18*d^7 + 303*c^2*d^5 + 522*c^3*d^4 + 502*c^4*d^3 + 220*c^5*d^2))/(3*c^2* 
(c + d)*(c^2 - d^2)*(3*c*d^2 - 3*c^2*d + c^3 - d^3)) + (tan(e/2 + (f*x)/2) 
^6*(4*c*d^5 + 4*c^5*d - 2*c^6 - 2*d^6 + 9*c^2*d^4 + 8*c^3*d^3 + 14*c^4*d^2 
))/(c*(c - d)*(2*c*d + c^2 + d^2)*(3*c*d^2 - 3*c^2*d + c^3 - d^3)))/(f*(ta 
n(e/2 + (f*x)/2)*(3*a^2*c^2 + 4*a^2*c*d) + tan(e/2 + (f*x)/2)^2*(5*a^2*c^2 
 + 4*a^2*d^2 + 12*a^2*c*d) + tan(e/2 + (f*x)/2)^5*(5*a^2*c^2 + 4*a^2*d^2 + 
 12*a^2*c*d) + tan(e/2 + (f*x)/2)^3*(7*a^2*c^2 + 12*a^2*d^2 + 16*a^2*c*d) 
+ tan(e/2 + (f*x)/2)^4*(7*a^2*c^2 + 12*a^2*d^2 + 16*a^2*c*d) + tan(e/2 + ( 
f*x)/2)^6*(3*a^2*c^2 + 4*a^2*c*d) + a^2*c^2 + a^2*c^2*tan(e/2 + (f*x)/2...
 

Reduce [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 4900, normalized size of antiderivative = 16.67 \[ \int \frac {1}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3} \, dx =\text {Too large to display} \] Input:

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

Output:

(108*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*ta 
n((e + f*x)/2)**7*c**6*d**2 + 288*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2) 
*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**7*c**5*d**3 + 255*sqrt(c**2 - 
 d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)** 
7*c**4*d**4 + 84*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 
 - d**2))*tan((e + f*x)/2)**7*c**3*d**5 + 324*sqrt(c**2 - d**2)*atan((tan( 
(e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**6*c**6*d**2 + 129 
6*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan(( 
e + f*x)/2)**6*c**5*d**3 + 1917*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c 
 + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**6*c**4*d**4 + 1272*sqrt(c**2 - 
d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**6 
*c**3*d**5 + 336*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 
 - d**2))*tan((e + f*x)/2)**6*c**2*d**6 + 540*sqrt(c**2 - d**2)*atan((tan( 
(e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**5*c**6*d**2 + 273 
6*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan(( 
e + f*x)/2)**5*c**5*d**3 + 5163*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c 
 + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**5*c**4*d**4 + 4632*sqrt(c**2 - 
d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**5 
*c**3*d**5 + 2028*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c** 
2 - d**2))*tan((e + f*x)/2)**5*c**2*d**6 + 336*sqrt(c**2 - d**2)*atan((...