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

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

Optimal result

Integrand size = 25, antiderivative size = 143 \[ \int \frac {(a+a \sin (e+f x))^3}{c+d \sin (e+f x)} \, dx=\frac {a^3 \left (2 c^2-6 c d+7 d^2\right ) x}{2 d^3}-\frac {2 a^3 (c-d)^3 \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{d^3 \sqrt {c^2-d^2} f}+\frac {a^3 (2 c-5 d) \cos (e+f x)}{2 d^2 f}-\frac {\cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d f} \] Output:

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

Mathematica [A] (verified)

Time = 5.62 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.13 \[ \int \frac {(a+a \sin (e+f x))^3}{c+d \sin (e+f x)} \, dx=\frac {a^3 (1+\sin (e+f x))^3 \left (-8 (c-d)^3 \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )+\sqrt {c^2-d^2} \left (2 \left (2 c^2-6 c d+7 d^2\right ) (e+f x)+4 (c-3 d) d \cos (e+f x)-d^2 \sin (2 (e+f x))\right )\right )}{4 d^3 \sqrt {c^2-d^2} 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]),x]
 

Output:

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

Rubi [A] (verified)

Time = 0.89 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.09, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.480, Rules used = {3042, 3242, 3042, 3447, 3042, 3502, 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)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3242

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3447

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3502

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3214

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3139

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

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 217

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

Input:

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

Output:

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

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 3242
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 - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Simp[1/(d*(m 
+ n))   Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^n*Simp[a*b*c* 
(m - 2) + b^2*d*(n + 1) + a^2*d*(m + n) - b*(b*c*(m - 1) - a*d*(3*m + 2*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] && 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 3502
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co 
s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m 
+ 2))   Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m 
 + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] 
 &&  !LtQ[m, -1]
 
Maple [A] (verified)

Time = 1.74 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.29

method result size
derivativedivides \(\frac {2 a^{3} \left (\frac {\left (-c^{3}+3 c^{2} d -3 c \,d^{2}+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 )}{d^{3} \sqrt {c^{2}-d^{2}}}+\frac {\frac {\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2}+\left (c d -3 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+c d -3 d^{2}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}+\frac {\left (2 c^{2}-6 c d +7 d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}}{d^{3}}\right )}{f}\) \(184\)
default \(\frac {2 a^{3} \left (\frac {\left (-c^{3}+3 c^{2} d -3 c \,d^{2}+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 )}{d^{3} \sqrt {c^{2}-d^{2}}}+\frac {\frac {\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2}+\left (c d -3 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+c d -3 d^{2}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}+\frac {\left (2 c^{2}-6 c d +7 d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}}{d^{3}}\right )}{f}\) \(184\)
risch \(\frac {a^{3} x \,c^{2}}{d^{3}}-\frac {3 a^{3} x c}{d^{2}}+\frac {7 a^{3} x}{2 d}+\frac {a^{3} {\mathrm e}^{i \left (f x +e \right )} c}{2 d^{2} f}-\frac {3 a^{3} {\mathrm e}^{i \left (f x +e \right )}}{2 d f}+\frac {a^{3} {\mathrm e}^{-i \left (f x +e \right )} c}{2 d^{2} f}-\frac {3 a^{3} {\mathrm e}^{-i \left (f x +e \right )}}{2 d f}+\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 ) f \,d^{3}}-\frac {2 \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 ) f \,d^{2}}+\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 )}{\left (c +d \right ) 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 ) f \,d^{3}}+\frac {2 \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 ) f \,d^{2}}-\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 )}{\left (c +d \right ) f d}-\frac {a^{3} \sin \left (2 f x +2 e \right )}{4 f d}\) \(506\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 404, normalized size of antiderivative = 2.83 \[ \int \frac {(a+a \sin (e+f x))^3}{c+d \sin (e+f x)} \, dx=\left [-\frac {a^{3} d^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, a^{3} c^{2} - 6 \, a^{3} c d + 7 \, a^{3} d^{2}\right )} f x - {\left (a^{3} c^{2} - 2 \, a^{3} c d + a^{3} d^{2}\right )} \sqrt {-\frac {c - d}{c + d}} \log \left (\frac {{\left (2 \, c^{2} - d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2} + 2 \, {\left ({\left (c^{2} + c d\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {c - d}{c + d}}}{d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2}}\right ) - 2 \, {\left (a^{3} c d - 3 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )}{2 \, d^{3} f}, -\frac {a^{3} d^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, a^{3} c^{2} - 6 \, a^{3} c d + 7 \, a^{3} d^{2}\right )} f x - 2 \, {\left (a^{3} c^{2} - 2 \, a^{3} c d + a^{3} d^{2}\right )} \sqrt {\frac {c - d}{c + d}} \arctan \left (-\frac {{\left (c \sin \left (f x + e\right ) + d\right )} \sqrt {\frac {c - d}{c + d}}}{{\left (c - d\right )} \cos \left (f x + e\right )}\right ) - 2 \, {\left (a^{3} c d - 3 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )}{2 \, d^{3} f}\right ] \] Input:

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

Output:

[-1/2*(a^3*d^2*cos(f*x + e)*sin(f*x + e) - (2*a^3*c^2 - 6*a^3*c*d + 7*a^3* 
d^2)*f*x - (a^3*c^2 - 2*a^3*c*d + a^3*d^2)*sqrt(-(c - d)/(c + d))*log(((2* 
c^2 - d^2)*cos(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*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2)) - 2*(a^3*c*d 
- 3*a^3*d^2)*cos(f*x + e))/(d^3*f), -1/2*(a^3*d^2*cos(f*x + e)*sin(f*x + e 
) - (2*a^3*c^2 - 6*a^3*c*d + 7*a^3*d^2)*f*x - 2*(a^3*c^2 - 2*a^3*c*d + a^3 
*d^2)*sqrt((c - d)/(c + d))*arctan(-(c*sin(f*x + e) + d)*sqrt((c - d)/(c + 
 d))/((c - d)*cos(f*x + e))) - 2*(a^3*c*d - 3*a^3*d^2)*cos(f*x + e))/(d^3* 
f)]
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e)),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 [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.62 \[ \int \frac {(a+a \sin (e+f x))^3}{c+d \sin (e+f x)} \, dx=\frac {\frac {{\left (2 \, a^{3} c^{2} - 6 \, a^{3} c d + 7 \, a^{3} d^{2}\right )} {\left (f x + e\right )}}{d^{3}} - \frac {4 \, {\left (a^{3} c^{3} - 3 \, a^{3} c^{2} d + 3 \, a^{3} c d^{2} - 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 )}}{\sqrt {c^{2} - d^{2}} d^{3}} + \frac {2 \, {\left (a^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 2 \, a^{3} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 6 \, a^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, a^{3} c - 6 \, a^{3} d\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} d^{2}}}{2 \, f} \] Input:

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

Output:

1/2*((2*a^3*c^2 - 6*a^3*c*d + 7*a^3*d^2)*(f*x + e)/d^3 - 4*(a^3*c^3 - 3*a^ 
3*c^2*d + 3*a^3*c*d^2 - 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)))/(sqrt(c^2 - d^2)*d 
^3) + 2*(a^3*d*tan(1/2*f*x + 1/2*e)^3 + 2*a^3*c*tan(1/2*f*x + 1/2*e)^2 - 6 
*a^3*d*tan(1/2*f*x + 1/2*e)^2 - a^3*d*tan(1/2*f*x + 1/2*e) + 2*a^3*c - 6*a 
^3*d)/((tan(1/2*f*x + 1/2*e)^2 + 1)^2*d^2))/f
 

Mupad [B] (verification not implemented)

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

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

Output:

((2*(a^3*c - 3*a^3*d))/d^2 + (a^3*tan(e/2 + (f*x)/2)^3)/d - (a^3*tan(e/2 + 
 (f*x)/2))/d + (2*tan(e/2 + (f*x)/2)^2*(a^3*c - 3*a^3*d))/d^2)/(f*(2*tan(e 
/2 + (f*x)/2)^2 + tan(e/2 + (f*x)/2)^4 + 1)) + (2*a^3*atan(((a^3*((8*(49*a 
^6*c^2*d^6 - 84*a^6*c^3*d^5 + 64*a^6*c^4*d^4 - 24*a^6*c^5*d^3 + 4*a^6*c^6* 
d^2))/d^5 + (8*tan(e/2 + (f*x)/2)*(94*a^6*c*d^8 - 144*a^6*c^2*d^7 + 19*a^6 
*c^3*d^6 + 116*a^6*c^4*d^5 - 116*a^6*c^5*d^4 + 48*a^6*c^6*d^3 - 8*a^6*c^7* 
d^2))/d^6 + (a^3*((8*tan(e/2 + (f*x)/2)*(8*a^3*c*d^9 - 24*a^3*c^2*d^8 + 24 
*a^3*c^3*d^7 - 8*a^3*c^4*d^6))/d^6 - (8*(14*a^3*c*d^8 - 16*a^3*c^2*d^7 + 2 
*a^3*c^3*d^6))/d^5 + (a^3*(32*c^2*d^3 + (8*tan(e/2 + (f*x)/2)*(12*c*d^10 - 
 8*c^3*d^8))/d^6)*(c^2 - 3*c*d + (7*d^2)/2)*1i)/d^3)*(c^2 - 3*c*d + (7*d^2 
)/2)*1i)/d^3)*(c^2 - 3*c*d + (7*d^2)/2))/d^3 + (a^3*((8*(49*a^6*c^2*d^6 - 
84*a^6*c^3*d^5 + 64*a^6*c^4*d^4 - 24*a^6*c^5*d^3 + 4*a^6*c^6*d^2))/d^5 + ( 
8*tan(e/2 + (f*x)/2)*(94*a^6*c*d^8 - 144*a^6*c^2*d^7 + 19*a^6*c^3*d^6 + 11 
6*a^6*c^4*d^5 - 116*a^6*c^5*d^4 + 48*a^6*c^6*d^3 - 8*a^6*c^7*d^2))/d^6 + ( 
a^3*((8*(14*a^3*c*d^8 - 16*a^3*c^2*d^7 + 2*a^3*c^3*d^6))/d^5 - (8*tan(e/2 
+ (f*x)/2)*(8*a^3*c*d^9 - 24*a^3*c^2*d^8 + 24*a^3*c^3*d^7 - 8*a^3*c^4*d^6) 
)/d^6 + (a^3*(32*c^2*d^3 + (8*tan(e/2 + (f*x)/2)*(12*c*d^10 - 8*c^3*d^8))/ 
d^6)*(c^2 - 3*c*d + (7*d^2)/2)*1i)/d^3)*(c^2 - 3*c*d + (7*d^2)/2)*1i)/d^3) 
*(c^2 - 3*c*d + (7*d^2)/2))/d^3)/((16*(2*a^9*c^7 - 14*a^9*c*d^6 - 8*a^9*c^ 
6*d + 47*a^9*c^2*d^5 - 55*a^9*c^3*d^4 + 21*a^9*c^4*d^3 + 7*a^9*c^5*d^2)...
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.86 \[ \int \frac {(a+a \sin (e+f x))^3}{c+d \sin (e+f x)} \, dx=\frac {a^{3} \left (-4 \sqrt {c^{2}-d^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c +d}{\sqrt {c^{2}-d^{2}}}\right ) c^{2}+8 \sqrt {c^{2}-d^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c +d}{\sqrt {c^{2}-d^{2}}}\right ) c d -4 \sqrt {c^{2}-d^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c +d}{\sqrt {c^{2}-d^{2}}}\right ) d^{2}-\cos \left (f x +e \right ) \sin \left (f x +e \right ) c \,d^{2}-\cos \left (f x +e \right ) \sin \left (f x +e \right ) d^{3}+2 \cos \left (f x +e \right ) c^{2} d -4 \cos \left (f x +e \right ) c \,d^{2}-6 \cos \left (f x +e \right ) d^{3}+2 c^{3} e +2 c^{3} f x -4 c^{2} d e -4 c^{2} d f x +c \,d^{2} e +c \,d^{2} f x +7 d^{3} e +7 d^{3} f x \right )}{2 d^{3} f \left (c +d \right )} \] Input:

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

Output:

(a**3*( - 4*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d* 
*2))*c**2 + 8*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - 
d**2))*c*d - 4*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - 
 d**2))*d**2 - cos(e + f*x)*sin(e + f*x)*c*d**2 - cos(e + f*x)*sin(e + f*x 
)*d**3 + 2*cos(e + f*x)*c**2*d - 4*cos(e + f*x)*c*d**2 - 6*cos(e + f*x)*d* 
*3 + 2*c**3*e + 2*c**3*f*x - 4*c**2*d*e - 4*c**2*d*f*x + c*d**2*e + c*d**2 
*f*x + 7*d**3*e + 7*d**3*f*x))/(2*d**3*f*(c + d))