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

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [B] (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 = 248 \[ \int \frac {(c+d \sin (e+f x))^3}{(a+b \sin (e+f x))^3} \, dx=\frac {d^3 x}{b^3}+\frac {(b c-a d) \left (2 a^3 b c d-8 a b^3 c d+2 a^4 d^2+a^2 b^2 \left (2 c^2-5 d^2\right )+b^4 \left (c^2+6 d^2\right )\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{b^3 \left (a^2-b^2\right )^{5/2} f}+\frac {(b c-a d)^2 \left (3 a b c+2 a^2 d-5 b^2 d\right ) \cos (e+f x)}{2 b^2 \left (a^2-b^2\right )^2 f (a+b \sin (e+f x))}+\frac {(b c-a d)^2 \cos (e+f x) (c+d \sin (e+f x))}{2 b \left (a^2-b^2\right ) f (a+b \sin (e+f x))^2} \] Output:

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(524\) vs. \(2(248)=496\).

Time = 7.23 (sec) , antiderivative size = 524, normalized size of antiderivative = 2.11 \[ \int \frac {(c+d \sin (e+f x))^3}{(a+b \sin (e+f x))^3} \, dx=\frac {-\frac {4 \left (2 a^5 d^3-5 a^3 b^2 d^3+3 a b^4 d \left (3 c^2+2 d^2\right )-a^2 b^3 c \left (2 c^2+3 d^2\right )-b^5 c \left (c^2+6 d^2\right )\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\frac {4 a^6 d^3 e-6 a^4 b^2 d^3 e+2 b^6 d^3 e+4 a^6 d^3 f x-6 a^4 b^2 d^3 f x+2 b^6 d^3 f x-2 b (b c-a d)^2 \left (-4 a^2 b c+b^3 c-2 a^3 d+5 a b^2 d\right ) \cos (e+f x)-2 \left (-a^2 b+b^3\right )^2 d^3 (e+f x) \cos (2 (e+f x))+8 a^5 b d^3 e \sin (e+f x)-16 a^3 b^3 d^3 e \sin (e+f x)+8 a b^5 d^3 e \sin (e+f x)+8 a^5 b d^3 f x \sin (e+f x)-16 a^3 b^3 d^3 f x \sin (e+f x)+8 a b^5 d^3 f x \sin (e+f x)+3 a b^5 c^3 \sin (2 (e+f x))-3 a^2 b^4 c^2 d \sin (2 (e+f x))-6 b^6 c^2 d \sin (2 (e+f x))-3 a^3 b^3 c d^2 \sin (2 (e+f x))+12 a b^5 c d^2 \sin (2 (e+f x))+3 a^4 b^2 d^3 \sin (2 (e+f x))-6 a^2 b^4 d^3 \sin (2 (e+f x))}{\left (a^2-b^2\right )^2 (a+b \sin (e+f x))^2}}{4 b^3 f} \] Input:

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

Output:

((-4*(2*a^5*d^3 - 5*a^3*b^2*d^3 + 3*a*b^4*d*(3*c^2 + 2*d^2) - a^2*b^3*c*(2 
*c^2 + 3*d^2) - b^5*c*(c^2 + 6*d^2))*ArcTan[(b + a*Tan[(e + f*x)/2])/Sqrt[ 
a^2 - b^2]])/(a^2 - b^2)^(5/2) + (4*a^6*d^3*e - 6*a^4*b^2*d^3*e + 2*b^6*d^ 
3*e + 4*a^6*d^3*f*x - 6*a^4*b^2*d^3*f*x + 2*b^6*d^3*f*x - 2*b*(b*c - a*d)^ 
2*(-4*a^2*b*c + b^3*c - 2*a^3*d + 5*a*b^2*d)*Cos[e + f*x] - 2*(-(a^2*b) + 
b^3)^2*d^3*(e + f*x)*Cos[2*(e + f*x)] + 8*a^5*b*d^3*e*Sin[e + f*x] - 16*a^ 
3*b^3*d^3*e*Sin[e + f*x] + 8*a*b^5*d^3*e*Sin[e + f*x] + 8*a^5*b*d^3*f*x*Si 
n[e + f*x] - 16*a^3*b^3*d^3*f*x*Sin[e + f*x] + 8*a*b^5*d^3*f*x*Sin[e + f*x 
] + 3*a*b^5*c^3*Sin[2*(e + f*x)] - 3*a^2*b^4*c^2*d*Sin[2*(e + f*x)] - 6*b^ 
6*c^2*d*Sin[2*(e + f*x)] - 3*a^3*b^3*c*d^2*Sin[2*(e + f*x)] + 12*a*b^5*c*d 
^2*Sin[2*(e + f*x)] + 3*a^4*b^2*d^3*Sin[2*(e + f*x)] - 6*a^2*b^4*d^3*Sin[2 
*(e + f*x)])/((a^2 - b^2)^2*(a + b*Sin[e + f*x])^2))/(4*b^3*f)
 

Rubi [A] (verified)

Time = 1.19 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.24, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3271, 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 {(c+d \sin (e+f x))^3}{(a+b \sin (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3271

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3500

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3214

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3139

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

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 217

\(\displaystyle \frac {(b c-a d)^2 \cos (e+f x) (c+d \sin (e+f x))}{2 b f \left (a^2-b^2\right ) (a+b \sin (e+f x))^2}-\frac {-\frac {\left (2 a^2 d+3 a b c-5 b^2 d\right ) (b c-a d)^2 \cos (e+f x)}{b f \left (a^2-b^2\right ) (a+b \sin (e+f x))}-\frac {\frac {2 d^3 x \left (a^2-b^2\right )^2}{b}+\frac {2 (b c-a d) \left (2 a^4 d^2+2 a^3 b c d+2 a^2 b^2 c^2-5 a^2 b^2 d^2-8 a b^3 c d+b^4 c^2+6 b^4 d^2\right ) \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (e+f x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{b f \sqrt {a^2-b^2}}}{b \left (a^2-b^2\right )}}{2 b \left (a^2-b^2\right )}\)

Input:

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

Output:

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

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 3271
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(b^2*c^2 - 2*a*b*c*d + a^2*d^2))*Co 
s[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f* 
(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^2))   Int[(a + b*Sin 
[e + f*x])^(m - 3)*(c + d*Sin[e + f*x])^(n + 1)*Simp[b*(m - 2)*(b*c - a*d)^ 
2 + a*d*(n + 1)*(c*(a^2 + b^2) - 2*a*b*d) + (b*(n + 1)*(a*b*c^2 + c*d*(a^2 
+ b^2) - 3*a*b*d^2) - a*(n + 2)*(b*c - a*d)^2)*Sin[e + f*x] + b*(b^2*(c^2 - 
 d^2) - m*(b*c - a*d)^2 + d*n*(2*a*b*c - d*(a^2 + b^2)))*Sin[e + f*x]^2, x] 
, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - 
b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 2] && LtQ[n, -1] && (IntegerQ[m] || 
IntegersQ[2*m, 2*n])
 

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 [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(670\) vs. \(2(239)=478\).

Time = 3.59 (sec) , antiderivative size = 671, normalized size of antiderivative = 2.71

method result size
derivativedivides \(\frac {-\frac {2 \left (\frac {-\frac {b^{2} \left (a^{5} d^{3}+3 a^{4} b c \,d^{2}-9 a^{3} b^{2} c^{2} d -4 a^{3} b^{2} d^{3}+5 a^{2} b^{3} c^{3}+6 a^{2} b^{3} c \,d^{2}-2 b^{5} c^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a}-\frac {b \left (2 a^{7} d^{3}-6 a^{5} b^{2} c^{2} d -a^{5} b^{2} d^{3}+4 a^{4} b^{3} c^{3}+9 a^{4} b^{3} c \,d^{2}-15 a^{3} b^{4} c^{2} d -10 a^{3} b^{4} d^{3}+7 a^{2} b^{5} c^{3}+18 a^{2} b^{5} c \,d^{2}-6 a \,b^{6} c^{2} d -2 b^{7} c^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a^{2}}-\frac {b^{2} \left (7 a^{5} d^{3}-3 a^{4} b c \,d^{2}-15 a^{3} b^{2} c^{2} d -16 a^{3} b^{2} d^{3}+11 a^{2} b^{3} c^{3}+30 a^{2} b^{3} c \,d^{2}-12 a \,b^{4} c^{2} d -2 b^{5} c^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a}-\frac {b \left (2 a^{5} d^{3}-6 a^{3} b^{2} c^{2} d -5 a^{3} b^{2} d^{3}+4 a^{2} b^{3} c^{3}+9 a^{2} b^{3} c \,d^{2}-3 a \,b^{4} c^{2} d -b^{5} c^{3}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a +2 b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+a \right )^{2}}+\frac {\left (2 a^{5} d^{3}-5 a^{3} b^{2} d^{3}-2 a^{2} b^{3} c^{3}-3 a^{2} b^{3} c \,d^{2}+9 a \,b^{4} c^{2} d +6 a \,b^{4} d^{3}-b^{5} c^{3}-6 b^{5} c \,d^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {a^{2}-b^{2}}}\right )}{b^{3}}+\frac {2 d^{3} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{b^{3}}}{f}\) \(671\)
default \(\frac {-\frac {2 \left (\frac {-\frac {b^{2} \left (a^{5} d^{3}+3 a^{4} b c \,d^{2}-9 a^{3} b^{2} c^{2} d -4 a^{3} b^{2} d^{3}+5 a^{2} b^{3} c^{3}+6 a^{2} b^{3} c \,d^{2}-2 b^{5} c^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a}-\frac {b \left (2 a^{7} d^{3}-6 a^{5} b^{2} c^{2} d -a^{5} b^{2} d^{3}+4 a^{4} b^{3} c^{3}+9 a^{4} b^{3} c \,d^{2}-15 a^{3} b^{4} c^{2} d -10 a^{3} b^{4} d^{3}+7 a^{2} b^{5} c^{3}+18 a^{2} b^{5} c \,d^{2}-6 a \,b^{6} c^{2} d -2 b^{7} c^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a^{2}}-\frac {b^{2} \left (7 a^{5} d^{3}-3 a^{4} b c \,d^{2}-15 a^{3} b^{2} c^{2} d -16 a^{3} b^{2} d^{3}+11 a^{2} b^{3} c^{3}+30 a^{2} b^{3} c \,d^{2}-12 a \,b^{4} c^{2} d -2 b^{5} c^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) a}-\frac {b \left (2 a^{5} d^{3}-6 a^{3} b^{2} c^{2} d -5 a^{3} b^{2} d^{3}+4 a^{2} b^{3} c^{3}+9 a^{2} b^{3} c \,d^{2}-3 a \,b^{4} c^{2} d -b^{5} c^{3}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a +2 b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+a \right )^{2}}+\frac {\left (2 a^{5} d^{3}-5 a^{3} b^{2} d^{3}-2 a^{2} b^{3} c^{3}-3 a^{2} b^{3} c \,d^{2}+9 a \,b^{4} c^{2} d +6 a \,b^{4} d^{3}-b^{5} c^{3}-6 b^{5} c \,d^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {a^{2}-b^{2}}}\right )}{b^{3}}+\frac {2 d^{3} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{b^{3}}}{f}\) \(671\)
risch \(\text {Expression too large to display}\) \(2015\)

Input:

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

Output:

1/f*(-2/b^3*((-1/2*b^2*(a^5*d^3+3*a^4*b*c*d^2-9*a^3*b^2*c^2*d-4*a^3*b^2*d^ 
3+5*a^2*b^3*c^3+6*a^2*b^3*c*d^2-2*b^5*c^3)/(a^4-2*a^2*b^2+b^4)/a*tan(1/2*f 
*x+1/2*e)^3-1/2*b*(2*a^7*d^3-6*a^5*b^2*c^2*d-a^5*b^2*d^3+4*a^4*b^3*c^3+9*a 
^4*b^3*c*d^2-15*a^3*b^4*c^2*d-10*a^3*b^4*d^3+7*a^2*b^5*c^3+18*a^2*b^5*c*d^ 
2-6*a*b^6*c^2*d-2*b^7*c^3)/(a^4-2*a^2*b^2+b^4)/a^2*tan(1/2*f*x+1/2*e)^2-1/ 
2*b^2*(7*a^5*d^3-3*a^4*b*c*d^2-15*a^3*b^2*c^2*d-16*a^3*b^2*d^3+11*a^2*b^3* 
c^3+30*a^2*b^3*c*d^2-12*a*b^4*c^2*d-2*b^5*c^3)/(a^4-2*a^2*b^2+b^4)/a*tan(1 
/2*f*x+1/2*e)-1/2*b*(2*a^5*d^3-6*a^3*b^2*c^2*d-5*a^3*b^2*d^3+4*a^2*b^3*c^3 
+9*a^2*b^3*c*d^2-3*a*b^4*c^2*d-b^5*c^3)/(a^4-2*a^2*b^2+b^4))/(tan(1/2*f*x+ 
1/2*e)^2*a+2*b*tan(1/2*f*x+1/2*e)+a)^2+1/2*(2*a^5*d^3-5*a^3*b^2*d^3-2*a^2* 
b^3*c^3-3*a^2*b^3*c*d^2+9*a*b^4*c^2*d+6*a*b^4*d^3-b^5*c^3-6*b^5*c*d^2)/(a^ 
4-2*a^2*b^2+b^4)/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*f*x+1/2*e)+2*b)/( 
a^2-b^2)^(1/2)))+2*d^3/b^3*arctan(tan(1/2*f*x+1/2*e)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 773 vs. \(2 (239) = 478\).

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

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

Output:

[1/4*(4*(a^6*b^2 - 3*a^4*b^4 + 3*a^2*b^6 - b^8)*d^3*f*x*cos(f*x + e)^2 - 4 
*(a^8 - 2*a^6*b^2 + 2*a^2*b^6 - b^8)*d^3*f*x - ((2*a^4*b^3 + 3*a^2*b^5 + b 
^7)*c^3 - 9*(a^3*b^4 + a*b^6)*c^2*d + 3*(a^4*b^3 + 3*a^2*b^5 + 2*b^7)*c*d^ 
2 - (2*a^7 - 3*a^5*b^2 + a^3*b^4 + 6*a*b^6)*d^3 + (9*a*b^6*c^2*d - (2*a^2* 
b^5 + b^7)*c^3 - 3*(a^2*b^5 + 2*b^7)*c*d^2 + (2*a^5*b^2 - 5*a^3*b^4 + 6*a* 
b^6)*d^3)*cos(f*x + e)^2 - 2*(9*a^2*b^5*c^2*d - (2*a^3*b^4 + a*b^6)*c^3 - 
3*(a^3*b^4 + 2*a*b^6)*c*d^2 + (2*a^6*b - 5*a^4*b^3 + 6*a^2*b^5)*d^3)*sin(f 
*x + e))*sqrt(-a^2 + b^2)*log(-((2*a^2 - b^2)*cos(f*x + e)^2 - 2*a*b*sin(f 
*x + e) - a^2 - b^2 - 2*(a*cos(f*x + e)*sin(f*x + e) + b*cos(f*x + e))*sqr 
t(-a^2 + b^2))/(b^2*cos(f*x + e)^2 - 2*a*b*sin(f*x + e) - a^2 - b^2)) - 2* 
((4*a^4*b^4 - 5*a^2*b^6 + b^8)*c^3 - 3*(2*a^5*b^3 - a^3*b^5 - a*b^7)*c^2*d 
 + 9*(a^4*b^4 - a^2*b^6)*c*d^2 + (2*a^7*b - 7*a^5*b^3 + 5*a^3*b^5)*d^3)*co 
s(f*x + e) - 2*(4*(a^7*b - 3*a^5*b^3 + 3*a^3*b^5 - a*b^7)*d^3*f*x + 3*((a^ 
3*b^5 - a*b^7)*c^3 - (a^4*b^4 + a^2*b^6 - 2*b^8)*c^2*d - (a^5*b^3 - 5*a^3* 
b^5 + 4*a*b^7)*c*d^2 + (a^6*b^2 - 3*a^4*b^4 + 2*a^2*b^6)*d^3)*cos(f*x + e) 
)*sin(f*x + e))/((a^6*b^5 - 3*a^4*b^7 + 3*a^2*b^9 - b^11)*f*cos(f*x + e)^2 
 - 2*(a^7*b^4 - 3*a^5*b^6 + 3*a^3*b^8 - a*b^10)*f*sin(f*x + e) - (a^8*b^3 
- 2*a^6*b^5 + 2*a^2*b^9 - b^11)*f), 1/2*(2*(a^6*b^2 - 3*a^4*b^4 + 3*a^2*b^ 
6 - b^8)*d^3*f*x*cos(f*x + e)^2 - 2*(a^8 - 2*a^6*b^2 + 2*a^2*b^6 - b^8)*d^ 
3*f*x + ((2*a^4*b^3 + 3*a^2*b^5 + b^7)*c^3 - 9*(a^3*b^4 + a*b^6)*c^2*d ...
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((c+d*sin(f*x+e))^3/(a+b*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*b^2-4*a^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. 856 vs. \(2 (239) = 478\).

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

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

Output:

((f*x + e)*d^3/b^3 + (2*a^2*b^3*c^3 + b^5*c^3 - 9*a*b^4*c^2*d + 3*a^2*b^3* 
c*d^2 + 6*b^5*c*d^2 - 2*a^5*d^3 + 5*a^3*b^2*d^3 - 6*a*b^4*d^3)*(pi*floor(1 
/2*(f*x + e)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*f*x + 1/2*e) + b)/sqrt(a 
^2 - b^2)))/((a^4*b^3 - 2*a^2*b^5 + b^7)*sqrt(a^2 - b^2)) + (5*a^3*b^4*c^3 
*tan(1/2*f*x + 1/2*e)^3 - 2*a*b^6*c^3*tan(1/2*f*x + 1/2*e)^3 - 9*a^4*b^3*c 
^2*d*tan(1/2*f*x + 1/2*e)^3 + 3*a^5*b^2*c*d^2*tan(1/2*f*x + 1/2*e)^3 + 6*a 
^3*b^4*c*d^2*tan(1/2*f*x + 1/2*e)^3 + a^6*b*d^3*tan(1/2*f*x + 1/2*e)^3 - 4 
*a^4*b^3*d^3*tan(1/2*f*x + 1/2*e)^3 + 4*a^4*b^3*c^3*tan(1/2*f*x + 1/2*e)^2 
 + 7*a^2*b^5*c^3*tan(1/2*f*x + 1/2*e)^2 - 2*b^7*c^3*tan(1/2*f*x + 1/2*e)^2 
 - 6*a^5*b^2*c^2*d*tan(1/2*f*x + 1/2*e)^2 - 15*a^3*b^4*c^2*d*tan(1/2*f*x + 
 1/2*e)^2 - 6*a*b^6*c^2*d*tan(1/2*f*x + 1/2*e)^2 + 9*a^4*b^3*c*d^2*tan(1/2 
*f*x + 1/2*e)^2 + 18*a^2*b^5*c*d^2*tan(1/2*f*x + 1/2*e)^2 + 2*a^7*d^3*tan( 
1/2*f*x + 1/2*e)^2 - a^5*b^2*d^3*tan(1/2*f*x + 1/2*e)^2 - 10*a^3*b^4*d^3*t 
an(1/2*f*x + 1/2*e)^2 + 11*a^3*b^4*c^3*tan(1/2*f*x + 1/2*e) - 2*a*b^6*c^3* 
tan(1/2*f*x + 1/2*e) - 15*a^4*b^3*c^2*d*tan(1/2*f*x + 1/2*e) - 12*a^2*b^5* 
c^2*d*tan(1/2*f*x + 1/2*e) - 3*a^5*b^2*c*d^2*tan(1/2*f*x + 1/2*e) + 30*a^3 
*b^4*c*d^2*tan(1/2*f*x + 1/2*e) + 7*a^6*b*d^3*tan(1/2*f*x + 1/2*e) - 16*a^ 
4*b^3*d^3*tan(1/2*f*x + 1/2*e) + 4*a^4*b^3*c^3 - a^2*b^5*c^3 - 6*a^5*b^2*c 
^2*d - 3*a^3*b^4*c^2*d + 9*a^4*b^3*c*d^2 + 2*a^7*d^3 - 5*a^5*b^2*d^3)/((a^ 
6*b^2 - 2*a^4*b^4 + a^2*b^6)*(a*tan(1/2*f*x + 1/2*e)^2 + 2*b*tan(1/2*f*...
 

Mupad [B] (verification not implemented)

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

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

Output:

- ((b^5*c^3 - 2*a^5*d^3 - 4*a^2*b^3*c^3 + 5*a^3*b^2*d^3 - 9*a^2*b^3*c*d^2 
+ 6*a^3*b^2*c^2*d + 3*a*b^4*c^2*d)/(b^2*(a^4 + b^4 - 2*a^2*b^2)) - (tan(e/ 
2 + (f*x)/2)^3*(a^5*d^3 - 2*b^5*c^3 + 5*a^2*b^3*c^3 - 4*a^3*b^2*d^3 + 6*a^ 
2*b^3*c*d^2 - 9*a^3*b^2*c^2*d + 3*a^4*b*c*d^2))/(a*b*(a^4 + b^4 - 2*a^2*b^ 
2)) + (tan(e/2 + (f*x)/2)*(2*b^5*c^3 - 7*a^5*d^3 - 11*a^2*b^3*c^3 + 16*a^3 
*b^2*d^3 - 30*a^2*b^3*c*d^2 + 15*a^3*b^2*c^2*d + 12*a*b^4*c^2*d + 3*a^4*b* 
c*d^2))/(a*b*(a^4 + b^4 - 2*a^2*b^2)) + (tan(e/2 + (f*x)/2)^2*(a^2 + 2*b^2 
)*(b^5*c^3 - 2*a^5*d^3 - 4*a^2*b^3*c^3 + 5*a^3*b^2*d^3 - 9*a^2*b^3*c*d^2 + 
 6*a^3*b^2*c^2*d + 3*a*b^4*c^2*d))/(a^2*b^2*(a^4 + b^4 - 2*a^2*b^2)))/(f*( 
tan(e/2 + (f*x)/2)^2*(2*a^2 + 4*b^2) + a^2*tan(e/2 + (f*x)/2)^4 + a^2 + 4* 
a*b*tan(e/2 + (f*x)/2)^3 + 4*a*b*tan(e/2 + (f*x)/2))) - (2*d^3*atan(((d^3* 
((8*(4*a^2*b^10*d^6 - 16*a^4*b^8*d^6 + 24*a^6*b^6*d^6 - 16*a^8*b^4*d^6 + 4 
*a^10*b^2*d^6))/(b^13 - 4*a^2*b^11 + 6*a^4*b^9 - 4*a^6*b^7 + a^8*b^5) + (d 
^3*((8*tan(e/2 + (f*x)/2)*(4*a*b^15*c^3 - 12*a^5*b^11*c^3 + 8*a^7*b^9*c^3 
- 24*a^2*b^14*d^3 + 68*a^4*b^12*d^3 - 72*a^6*b^10*d^3 + 36*a^8*b^8*d^3 - 8 
*a^10*b^6*d^3 - 36*a^2*b^14*c^2*d - 36*a^3*b^13*c*d^2 + 72*a^4*b^12*c^2*d 
- 36*a^6*b^10*c^2*d + 12*a^7*b^9*c*d^2 + 24*a*b^15*c*d^2))/(b^14 - 4*a^2*b 
^12 + 6*a^4*b^10 - 4*a^6*b^8 + a^8*b^6) - (8*(4*a*b^14*d^3 - 2*a^2*b^13*c^ 
3 + 6*a^6*b^9*c^3 - 4*a^8*b^7*c^3 - 8*a^3*b^12*d^3 + 6*a^5*b^10*d^3 - 4*a^ 
7*b^8*d^3 + 2*a^9*b^6*d^3 - 12*a^2*b^13*c*d^2 + 18*a^3*b^12*c^2*d + 18*...
 

Reduce [B] (verification not implemented)

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

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

Output:

( - 8*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*s 
in(e + f*x)**2*a**6*b**2*d**3 + 20*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2 
)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a**4*b**4*d**3 + 8*sqrt(a**2 - 
 b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a* 
*3*b**5*c**3 + 12*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a** 
2 - b**2))*sin(e + f*x)**2*a**3*b**5*c*d**2 - 36*sqrt(a**2 - b**2)*atan((t 
an((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a**2*b**6*c**2*d 
 - 24*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*s 
in(e + f*x)**2*a**2*b**6*d**3 + 4*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2) 
*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a*b**7*c**3 + 24*sqrt(a**2 - b* 
*2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a*b** 
7*c*d**2 - 16*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - 
b**2))*sin(e + f*x)*a**7*b*d**3 + 40*sqrt(a**2 - b**2)*atan((tan((e + f*x) 
/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)*a**5*b**3*d**3 + 16*sqrt(a**2 - 
 b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)*a**4* 
b**4*c**3 + 24*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - 
 b**2))*sin(e + f*x)*a**4*b**4*c*d**2 - 72*sqrt(a**2 - b**2)*atan((tan((e 
+ f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)*a**3*b**5*c**2*d - 48*sqr 
t(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f* 
x)*a**3*b**5*d**3 + 8*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/s...