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

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 = 187 \[ \int \frac {(a+a \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\frac {a^3 x}{d^3}-\frac {a^3 (c-d) \left (2 c^2+6 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 )}{d^3 (c+d)^2 \sqrt {c^2-d^2} f}+\frac {(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac {a^3 (c-d) (2 c+5 d) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))} \] Output:

a^3*x/d^3-a^3*(c-d)*(2*c^2+6*c*d+7*d^2)*arctan((d+c*tan(1/2*f*x+1/2*e))/(c 
^2-d^2)^(1/2))/d^3/(c+d)^2/(c^2-d^2)^(1/2)/f+1/2*(c-d)*cos(f*x+e)*(a^3+a^3 
*sin(f*x+e))/d/(c+d)/f/(c+d*sin(f*x+e))^2+1/2*a^3*(c-d)*(2*c+5*d)*cos(f*x+ 
e)/d^2/(c+d)^2/f/(c+d*sin(f*x+e))
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 1.06 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.23, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.480, Rules used = {3042, 3241, 3042, 3447, 3042, 3500, 3042, 3214, 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 {(a \sin (e+f x)+a)^3}{(c+d \sin (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3241

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3447

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3500

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3214

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3139

\(\displaystyle \frac {(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}-\frac {a \left (-\frac {\frac {2 a^2 x (c-d) (c+d)^2}{d}-\frac {2 a^2 (c-d)^2 \left (2 c^2+6 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 )}{d f}}{d \left (c^2-d^2\right )}-\frac {a^2 (c-d) (2 c+5 d) \cos (e+f x)}{d f (c+d) (c+d \sin (e+f x))}\right )}{2 d (c+d)}\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}-\frac {a \left (-\frac {\frac {4 a^2 \left (2 c^2+6 c d+7 d^2\right ) (c-d)^2 \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 )}{d f}+\frac {2 a^2 x (c+d)^2 (c-d)}{d}}{d \left (c^2-d^2\right )}-\frac {a^2 (c-d) (2 c+5 d) \cos (e+f x)}{d f (c+d) (c+d \sin (e+f x))}\right )}{2 d (c+d)}\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}-\frac {a \left (-\frac {\frac {2 a^2 x (c-d) (c+d)^2}{d}-\frac {2 a^2 (c-d)^2 \left (2 c^2+6 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 )}{d f \sqrt {c^2-d^2}}}{d \left (c^2-d^2\right )}-\frac {a^2 (c-d) (2 c+5 d) \cos (e+f x)}{d f (c+d) (c+d \sin (e+f x))}\right )}{2 d (c+d)}\)

Input:

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

Output:

((c - d)*Cos[e + f*x]*(a^3 + a^3*Sin[e + f*x]))/(2*d*(c + d)*f*(c + d*Sin[ 
e + f*x])^2) - (a*(-(((2*a^2*(c - d)*(c + d)^2*x)/d - (2*a^2*(c - d)^2*(2* 
c^2 + 6*c*d + 7*d^2)*ArcTan[(2*d + 2*c*Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2 
])])/(d*Sqrt[c^2 - d^2]*f))/(d*(c^2 - d^2))) - (a^2*(c - d)*(2*c + 5*d)*Co 
s[e + f*x])/(d*(c + d)*f*(c + d*Sin[e + f*x]))))/(2*d*(c + d))
 

Defintions of rubi rules used

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 3214
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. 
)*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d   Int[1/(c + d 
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

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

rule 3447
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a 
 + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), 
 x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
 

rule 3500
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
 (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 
 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* 
(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2))   Int[(a + b*Sin[e + f*x 
])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A 
*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, 
B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 1.92 (sec) , antiderivative size = 353, normalized size of antiderivative = 1.89

method result size
derivativedivides \(\frac {2 a^{3} \left (\frac {\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{d^{3}}-\frac {\frac {-\frac {d^{2} \left (c^{3}+5 c^{2} d -4 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (c^{2}+2 c d +d^{2}\right ) c}-\frac {d \left (2 c^{5}+4 c^{4} d -c^{3} d^{2}+7 c^{2} d^{3}-10 c \,d^{4}-2 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \left (c^{2}+2 c d +d^{2}\right ) c^{2}}-\frac {d^{2} \left (7 c^{3}+11 c^{2} d -16 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 c \left (c^{2}+2 c d +d^{2}\right )}-\frac {d \left (2 c^{3}+4 c^{2} d -5 c \,d^{2}-d^{3}\right )}{2 \left (c^{2}+2 c d +d^{2}\right )}}{\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 (2 c^{3}+4 c^{2} d +c \,d^{2}-7 d^{3}\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}}}}{d^{3}}\right )}{f}\) \(353\)
default \(\frac {2 a^{3} \left (\frac {\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{d^{3}}-\frac {\frac {-\frac {d^{2} \left (c^{3}+5 c^{2} d -4 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (c^{2}+2 c d +d^{2}\right ) c}-\frac {d \left (2 c^{5}+4 c^{4} d -c^{3} d^{2}+7 c^{2} d^{3}-10 c \,d^{4}-2 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \left (c^{2}+2 c d +d^{2}\right ) c^{2}}-\frac {d^{2} \left (7 c^{3}+11 c^{2} d -16 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 c \left (c^{2}+2 c d +d^{2}\right )}-\frac {d \left (2 c^{3}+4 c^{2} d -5 c \,d^{2}-d^{3}\right )}{2 \left (c^{2}+2 c d +d^{2}\right )}}{\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 (2 c^{3}+4 c^{2} d +c \,d^{2}-7 d^{3}\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}}}}{d^{3}}\right )}{f}\) \(353\)
risch \(\frac {a^{3} x}{d^{3}}-\frac {i a^{3} \left (8 i c^{3} d \,{\mathrm e}^{i \left (f x +e \right )}-4 i c^{3} d \,{\mathrm e}^{3 i \left (f x +e \right )}-17 i d^{3} {\mathrm e}^{i \left (f x +e \right )} c -i d^{4} {\mathrm e}^{3 i \left (f x +e \right )}-2 i c^{2} d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+7 i c \,d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+10 i c^{2} d^{2} {\mathrm e}^{i \left (f x +e \right )}-i d^{4} {\mathrm e}^{i \left (f x +e \right )}+6 c^{4} {\mathrm e}^{2 i \left (f x +e \right )}+6 d \,c^{3} {\mathrm e}^{2 i \left (f x +e \right )}-9 d^{2} c^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3 d^{3} c \,{\mathrm e}^{2 i \left (f x +e \right )}-6 d^{4} {\mathrm e}^{2 i \left (f x +e \right )}-3 c^{2} d^{2}-3 c \,d^{3}+6 d^{4}\right )}{\left (-i d \,{\mathrm e}^{2 i \left (f x +e \right )}+i d +2 c \,{\mathrm e}^{i \left (f x +e \right )}\right )^{2} \left (c +d \right )^{2} f \,d^{3}}+\frac {\sqrt {-\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) c^{2}}{\left (c +d \right )^{3} f \,d^{3}}+\frac {3 \sqrt {-\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) c}{\left (c +d \right )^{3} f \,d^{2}}+\frac {7 \sqrt {-\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right )}{2 \left (c +d \right )^{3} f d}-\frac {\sqrt {-\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) c^{2}}{\left (c +d \right )^{3} f \,d^{3}}-\frac {3 \sqrt {-\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) c}{\left (c +d \right )^{3} f \,d^{2}}-\frac {7 \sqrt {-\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right )}{2 \left (c +d \right )^{3} f d}\) \(657\)

Input:

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

Output:

2/f*a^3*(1/d^3*arctan(tan(1/2*f*x+1/2*e))-1/d^3*((-1/2*d^2*(c^3+5*c^2*d-4* 
c*d^2-2*d^3)/(c^2+2*c*d+d^2)/c*tan(1/2*f*x+1/2*e)^3-1/2*d*(2*c^5+4*c^4*d-c 
^3*d^2+7*c^2*d^3-10*c*d^4-2*d^5)/(c^2+2*c*d+d^2)/c^2*tan(1/2*f*x+1/2*e)^2- 
1/2*d^2*(7*c^3+11*c^2*d-16*c*d^2-2*d^3)/c/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2* 
e)-1/2*d*(2*c^3+4*c^2*d-5*c*d^2-d^3)/(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*(2*c^3+4*c^2*d+c*d^2-7*d^3)/(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))))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 487 vs. \(2 (178) = 356\).

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

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

Output:

[1/4*(4*(a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4)*f*x*cos(f*x + e)^2 - 4*(a^3* 
c^4 + 2*a^3*c^3*d + 2*a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4)*f*x - (2*a^3*c^ 
4 + 6*a^3*c^3*d + 9*a^3*c^2*d^2 + 6*a^3*c*d^3 + 7*a^3*d^4 - (2*a^3*c^2*d^2 
 + 6*a^3*c*d^3 + 7*a^3*d^4)*cos(f*x + e)^2 + 2*(2*a^3*c^3*d + 6*a^3*c^2*d^ 
2 + 7*a^3*c*d^3)*sin(f*x + e))*sqrt(-(c - d)/(c + d))*log(((2*c^2 - d^2)*c 
os(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2 + 2*((c^2 + c*d)*cos(f*x + 
e)*sin(f*x + e) + (c*d + d^2)*cos(f*x + e))*sqrt(-(c - d)/(c + d)))/(d^2*c 
os(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2)) - 2*(2*a^3*c^3*d + 4*a^3* 
c^2*d^2 - 5*a^3*c*d^3 - a^3*d^4)*cos(f*x + e) - 2*(4*(a^3*c^3*d + 2*a^3*c^ 
2*d^2 + a^3*c*d^3)*f*x + 3*(a^3*c^2*d^2 + a^3*c*d^3 - 2*a^3*d^4)*cos(f*x + 
 e))*sin(f*x + e))/((c^2*d^5 + 2*c*d^6 + d^7)*f*cos(f*x + e)^2 - 2*(c^3*d^ 
4 + 2*c^2*d^5 + c*d^6)*f*sin(f*x + e) - (c^4*d^3 + 2*c^3*d^4 + 2*c^2*d^5 + 
 2*c*d^6 + d^7)*f), 1/2*(2*(a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4)*f*x*cos(f 
*x + e)^2 - 2*(a^3*c^4 + 2*a^3*c^3*d + 2*a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d 
^4)*f*x - (2*a^3*c^4 + 6*a^3*c^3*d + 9*a^3*c^2*d^2 + 6*a^3*c*d^3 + 7*a^3*d 
^4 - (2*a^3*c^2*d^2 + 6*a^3*c*d^3 + 7*a^3*d^4)*cos(f*x + e)^2 + 2*(2*a^3*c 
^3*d + 6*a^3*c^2*d^2 + 7*a^3*c*d^3)*sin(f*x + e))*sqrt((c - d)/(c + d))*ar 
ctan(-(c*sin(f*x + e) + d)*sqrt((c - d)/(c + d))/((c - d)*cos(f*x + e))) - 
 (2*a^3*c^3*d + 4*a^3*c^2*d^2 - 5*a^3*c*d^3 - a^3*d^4)*cos(f*x + e) - (4*( 
a^3*c^3*d + 2*a^3*c^2*d^2 + a^3*c*d^3)*f*x + 3*(a^3*c^2*d^2 + a^3*c*d^3...
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((a+a*sin(f*x+e))^3/(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. 503 vs. \(2 (178) = 356\).

Time = 0.18 (sec) , antiderivative size = 503, normalized size of antiderivative = 2.69 \[ \int \frac {(a+a \sin (e+f x))^3}{(c+d \sin (e+f x))^3} \, dx=\frac {\frac {{\left (f x + e\right )} a^{3}}{d^{3}} - \frac {{\left (2 \, a^{3} c^{3} + 4 \, a^{3} c^{2} d + a^{3} c d^{2} - 7 \, a^{3} d^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (c\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d}{\sqrt {c^{2} - d^{2}}}\right )\right )}}{{\left (c^{2} d^{3} + 2 \, c d^{4} + d^{5}\right )} \sqrt {c^{2} - d^{2}}} + \frac {a^{3} c^{4} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 5 \, a^{3} c^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 4 \, a^{3} c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2 \, a^{3} c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 2 \, a^{3} c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, a^{3} c^{4} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a^{3} c^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 7 \, a^{3} c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 10 \, a^{3} c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, a^{3} d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 7 \, a^{3} c^{4} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 11 \, a^{3} c^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 16 \, a^{3} c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \, a^{3} c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, a^{3} c^{5} + 4 \, a^{3} c^{4} d - 5 \, a^{3} c^{3} d^{2} - a^{3} c^{2} d^{3}}{{\left (c^{4} d^{2} + 2 \, c^{3} d^{3} + c^{2} d^{4}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + c\right )}^{2}}}{f} \] Input:

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

Output:

((f*x + e)*a^3/d^3 - (2*a^3*c^3 + 4*a^3*c^2*d + a^3*c*d^2 - 7*a^3*d^3)*(pi 
*floor(1/2*(f*x + e)/pi + 1/2)*sgn(c) + arctan((c*tan(1/2*f*x + 1/2*e) + d 
)/sqrt(c^2 - d^2)))/((c^2*d^3 + 2*c*d^4 + d^5)*sqrt(c^2 - d^2)) + (a^3*c^4 
*d*tan(1/2*f*x + 1/2*e)^3 + 5*a^3*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 - 4*a^3*c 
^2*d^3*tan(1/2*f*x + 1/2*e)^3 - 2*a^3*c*d^4*tan(1/2*f*x + 1/2*e)^3 + 2*a^3 
*c^5*tan(1/2*f*x + 1/2*e)^2 + 4*a^3*c^4*d*tan(1/2*f*x + 1/2*e)^2 - a^3*c^3 
*d^2*tan(1/2*f*x + 1/2*e)^2 + 7*a^3*c^2*d^3*tan(1/2*f*x + 1/2*e)^2 - 10*a^ 
3*c*d^4*tan(1/2*f*x + 1/2*e)^2 - 2*a^3*d^5*tan(1/2*f*x + 1/2*e)^2 + 7*a^3* 
c^4*d*tan(1/2*f*x + 1/2*e) + 11*a^3*c^3*d^2*tan(1/2*f*x + 1/2*e) - 16*a^3* 
c^2*d^3*tan(1/2*f*x + 1/2*e) - 2*a^3*c*d^4*tan(1/2*f*x + 1/2*e) + 2*a^3*c^ 
5 + 4*a^3*c^4*d - 5*a^3*c^3*d^2 - a^3*c^2*d^3)/((c^4*d^2 + 2*c^3*d^3 + c^2 
*d^4)*(c*tan(1/2*f*x + 1/2*e)^2 + 2*d*tan(1/2*f*x + 1/2*e) + c)^2))/f
 

Mupad [B] (verification not implemented)

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

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

Output:

((2*a^3*c^3 - a^3*d^3 - 5*a^3*c*d^2 + 4*a^3*c^2*d)/(d^2*(2*c*d + c^2 + d^2 
)) + (tan(e/2 + (f*x)/2)^3*(a^3*c^3 - 2*a^3*d^3 - 4*a^3*c*d^2 + 5*a^3*c^2* 
d))/(c*d*(2*c*d + c^2 + d^2)) + (tan(e/2 + (f*x)/2)*(7*a^3*c^3 - 2*a^3*d^3 
 - 16*a^3*c*d^2 + 11*a^3*c^2*d))/(c*d*(2*c*d + c^2 + d^2)) + (tan(e/2 + (f 
*x)/2)^2*(c^2 + 2*d^2)*(2*a^3*c^3 - a^3*d^3 - 5*a^3*c*d^2 + 4*a^3*c^2*d))/ 
(c^2*d^2*(2*c*d + c^2 + d^2)))/(f*(tan(e/2 + (f*x)/2)^2*(2*c^2 + 4*d^2) + 
c^2*tan(e/2 + (f*x)/2)^4 + c^2 + 4*c*d*tan(e/2 + (f*x)/2)^3 + 4*c*d*tan(e/ 
2 + (f*x)/2))) - (2*a^3*atan(-(((((((8*(4*c^2*d^12 + 16*c^3*d^11 + 24*c^4* 
d^10 + 16*c^5*d^9 + 4*c^6*d^8))/(4*c*d^8 + d^9 + 6*c^2*d^7 + 4*c^3*d^6 + c 
^4*d^5) + (8*tan(e/2 + (f*x)/2)*(12*c*d^14 + 48*c^2*d^13 + 64*c^3*d^12 + 1 
6*c^4*d^11 - 36*c^5*d^10 - 32*c^6*d^9 - 8*c^7*d^8))/(4*c*d^9 + d^10 + 6*c^ 
2*d^8 + 4*c^3*d^7 + c^4*d^6))*1i)/d^3 - (8*(4*c*d^10 + 2*c^2*d^9 - 6*c^3*d 
^8 - 2*c^4*d^7 + 2*c^5*d^6))/(4*c*d^8 + d^9 + 6*c^2*d^7 + 4*c^3*d^6 + c^4* 
d^5) + (8*tan(e/2 + (f*x)/2)*(28*c*d^11 + 52*c^2*d^10 + 4*c^3*d^9 - 44*c^4 
*d^8 - 32*c^5*d^7 - 8*c^6*d^6))/(4*c*d^9 + d^10 + 6*c^2*d^8 + 4*c^3*d^7 + 
c^4*d^6))*1i)/d^3 + (8*(4*c^2*d^6 + 16*c^3*d^5 + 24*c^4*d^4 + 16*c^5*d^3 + 
 4*c^6*d^2))/(4*c*d^8 + d^9 + 6*c^2*d^7 + 4*c^3*d^6 + c^4*d^5) - (8*tan(e/ 
2 + (f*x)/2)*(41*c*d^8 - 46*c^2*d^7 - 99*c^3*d^6 - 36*c^4*d^5 + 36*c^5*d^4 
 + 32*c^6*d^3 + 8*c^7*d^2))/(4*c*d^9 + d^10 + 6*c^2*d^8 + 4*c^3*d^7 + c^4* 
d^6))/d^3 + ((((8*(4*c*d^10 + 2*c^2*d^9 - 6*c^3*d^8 - 2*c^4*d^7 + 2*c^5...
 

Reduce [B] (verification not implemented)

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

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

Output:

(a**3*( - 8*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d* 
*2))*sin(e + f*x)**2*c**3*d**2 - 24*sqrt(c**2 - d**2)*atan((tan((e + f*x)/ 
2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x)**2*c**2*d**3 - 28*sqrt(c**2 - d* 
*2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x)**2*c*d** 
4 - 16*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))* 
sin(e + f*x)*c**4*d - 48*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/s 
qrt(c**2 - d**2))*sin(e + f*x)*c**3*d**2 - 56*sqrt(c**2 - d**2)*atan((tan( 
(e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x)*c**2*d**3 - 8*sqrt(c** 
2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*c**5 - 24*sqrt( 
c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*c**4*d - 28* 
sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*c**3*d* 
*2 + 6*cos(e + f*x)*sin(e + f*x)*c**4*d**2 + 12*cos(e + f*x)*sin(e + f*x)* 
c**3*d**3 - 6*cos(e + f*x)*sin(e + f*x)*c**2*d**4 - 12*cos(e + f*x)*sin(e 
+ f*x)*c*d**5 + 4*cos(e + f*x)*c**5*d + 12*cos(e + f*x)*c**4*d**2 - 2*cos( 
e + f*x)*c**3*d**3 - 12*cos(e + f*x)*c**2*d**4 - 2*cos(e + f*x)*c*d**5 + 4 
*sin(e + f*x)**2*c**4*d**2*f*x + 12*sin(e + f*x)**2*c**3*d**3*f*x + 3*sin( 
e + f*x)**2*c**3*d**3 + 12*sin(e + f*x)**2*c**2*d**4*f*x + 6*sin(e + f*x)* 
*2*c**2*d**4 + 4*sin(e + f*x)**2*c*d**5*f*x - 3*sin(e + f*x)**2*c*d**5 - 6 
*sin(e + f*x)**2*d**6 + 8*sin(e + f*x)*c**5*d*f*x + 24*sin(e + f*x)*c**4*d 
**2*f*x + 6*sin(e + f*x)*c**4*d**2 + 24*sin(e + f*x)*c**3*d**3*f*x + 12...