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

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

Optimal result

Integrand size = 25, antiderivative size = 121 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {3 d \left (2 c^2-2 c d+d^2\right ) x}{2 a}+\frac {2 d \left (c^2-3 c d+d^2\right ) \cos (e+f x)}{a f}+\frac {(2 c-3 d) d^2 \cos (e+f x) \sin (e+f x)}{2 a f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (a+a \sin (e+f x))} \] Output:

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

Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.59 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (d \cos \left (\frac {1}{2} (e+f x)\right ) \left (6 \left (2 c^2-2 c d+d^2\right ) (e+f x)-4 (3 c-d) d \cos (e+f x)-d^2 \sin (2 (e+f x))\right )+\sin \left (\frac {1}{2} (e+f x)\right ) \left (2 \left (4 c^3+6 c^2 d (-2+e+f x)-6 c d^2 (-2+e+f x)+d^3 (-4+3 e+3 f x)\right )-4 (3 c-d) d^2 \cos (e+f x)-d^3 \sin (2 (e+f x))\right )\right )}{4 a f (1+\sin (e+f x))} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3246, 25, 3042, 3213}

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 \sin (e+f x)+a} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3246

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3213

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

Input:

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

Output:

-(((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(f*(a + a*Sin[e + f*x]))) 
+ (d*((3*a*(2*c^2 - 2*c*d + d^2)*x)/2 + (2*a*(c^2 - 3*c*d + d^2)*Cos[e + f 
*x])/f + (a*(2*c - 3*d)*d*Cos[e + f*x]*Sin[e + f*x])/(2*f)))/a^2
 

Defintions of rubi rules used

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

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

rule 3213
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) 
*(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co 
s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free 
Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

rule 3246
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*Cos[e + f*x]*((c + d*Sin[e + 
 f*x])^(n - 1)/(a*f*(a + b*Sin[e + f*x]))), x] - Simp[d/(a*b)   Int[(c + d* 
Sin[e + f*x])^(n - 2)*Simp[b*d*(n - 1) - a*c*n + (b*c*(n - 1) - a*d*n)*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[n, 1] && (IntegerQ[2*n] || 
EqQ[c, 0])
 
Maple [A] (verified)

Time = 1.72 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.22

method result size
derivativedivides \(\frac {2 d \left (\frac {\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2}+\left (-3 c d +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}-3 c d +d^{2}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}+\frac {3 \left (2 c^{2}-2 c d +d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )-\frac {2 \left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a f}\) \(148\)
default \(\frac {2 d \left (\frac {\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2}+\left (-3 c d +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}-3 c d +d^{2}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}+\frac {3 \left (2 c^{2}-2 c d +d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )-\frac {2 \left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a f}\) \(148\)
parallelrisch \(\frac {\left (\left (12 f x +28\right ) d^{3}+\left (-24 f x -84\right ) c \,d^{2}+24 c^{2} \left (f x +2\right ) d -16 c^{3}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+24 d \left (\left (\left (\frac {f x}{2}+\frac {1}{6}\right ) d^{2}+c \left (-f x -\frac {1}{2}\right ) d +c^{2} f x \right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {d \left (\left (c -\frac {d}{4}\right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (c -\frac {d}{4}\right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\frac {d \left (\sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )-\cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )\right )}{12}\right )}{2}\right )}{8 f a \left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) \(177\)
risch \(\frac {3 d x \,c^{2}}{a}-\frac {3 d^{2} x c}{a}+\frac {3 d^{3} x}{2 a}-\frac {3 d^{2} {\mathrm e}^{i \left (f x +e \right )} c}{2 a f}+\frac {d^{3} {\mathrm e}^{i \left (f x +e \right )}}{2 a f}-\frac {3 d^{2} {\mathrm e}^{-i \left (f x +e \right )} c}{2 a f}+\frac {d^{3} {\mathrm e}^{-i \left (f x +e \right )}}{2 a f}-\frac {2 c^{3}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {6 c^{2} d}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {6 c \,d^{2}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 d^{3}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {d^{3} \sin \left (2 f x +2 e \right )}{4 a f}\) \(235\)
norman \(\frac {\frac {-6 c \,d^{2}+d^{3}}{a f}+\frac {\left (-6 c \,d^{2}-d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{a f}+\frac {\left (2 c^{3}-6 c^{2} d -2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {\left (2 c^{3}-6 c^{2} d +6 c \,d^{2}-3 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}+\frac {\left (6 c^{3}-18 c^{2} d +6 c \,d^{2}-5 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a f}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x}{2 a}-\frac {12 c \,d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{a f}+\frac {3 \left (2 c^{3}-6 c^{2} d +4 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{2 a}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{2 a}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{2 a}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) \(493\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 236 vs. \(2 (117) = 234\).

Time = 0.09 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.95 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {d^{3} \cos \left (f x + e\right )^{3} - 2 \, c^{3} + 6 \, c^{2} d - 6 \, c d^{2} + 2 \, d^{3} + 3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} f x - 2 \, {\left (3 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )^{2} - {\left (2 \, c^{3} - 6 \, c^{2} d + 12 \, c d^{2} - 3 \, d^{3} - 3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} f x\right )} \cos \left (f x + e\right ) - {\left (d^{3} \cos \left (f x + e\right )^{2} - 2 \, c^{3} + 6 \, c^{2} d - 6 \, c d^{2} + 2 \, d^{3} - 3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} f x + {\left (6 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, {\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \] Input:

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

Output:

1/2*(d^3*cos(f*x + e)^3 - 2*c^3 + 6*c^2*d - 6*c*d^2 + 2*d^3 + 3*(2*c^2*d - 
 2*c*d^2 + d^3)*f*x - 2*(3*c*d^2 - d^3)*cos(f*x + e)^2 - (2*c^3 - 6*c^2*d 
+ 12*c*d^2 - 3*d^3 - 3*(2*c^2*d - 2*c*d^2 + d^3)*f*x)*cos(f*x + e) - (d^3* 
cos(f*x + e)^2 - 2*c^3 + 6*c^2*d - 6*c*d^2 + 2*d^3 - 3*(2*c^2*d - 2*c*d^2 
+ d^3)*f*x + (6*c*d^2 - d^3)*cos(f*x + e))*sin(f*x + e))/(a*f*cos(f*x + e) 
 + a*f*sin(f*x + e) + a*f)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3602 vs. \(2 (107) = 214\).

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

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

Output:

Piecewise((-4*c**3*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f* 
tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)** 
2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 8*c**3*tan(e/2 + f*x/2)**2/(2*a*f*ta 
n(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 
+ 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 4*c**3/(2* 
a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/ 
2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*c* 
*2*d*f*x*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + 
f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f* 
tan(e/2 + f*x/2) + 2*a*f) + 6*c**2*d*f*x*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/ 
2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4* 
a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 12*c**2*d*f*x* 
tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 
 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + 
 f*x/2) + 2*a*f) + 12*c**2*d*f*x*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/ 
2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan( 
e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*c**2*d*f*x*tan(e/2 + 
 f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan 
(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2* 
a*f) + 6*c**2*d*f*x/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 425 vs. \(2 (117) = 234\).

Time = 0.12 (sec) , antiderivative size = 425, normalized size of antiderivative = 3.51 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {d^{3} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {5 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 4}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {2 \, a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {a \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}} + \frac {3 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} - 6 \, c d^{2} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} + 6 \, c^{2} d {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {2 \, c^{3}}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{f} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.36 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {\frac {3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} {\left (f x + e\right )}}{a} - \frac {4 \, {\left (c^{3} - 3 \, c^{2} d + 3 \, c d^{2} - d^{3}\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}} + \frac {2 \, {\left (d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 6 \, c d^{2} + 2 \, d^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} a}}{2 \, f} \] Input:

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

Output:

1/2*(3*(2*c^2*d - 2*c*d^2 + d^3)*(f*x + e)/a - 4*(c^3 - 3*c^2*d + 3*c*d^2 
- d^3)/(a*(tan(1/2*f*x + 1/2*e) + 1)) + 2*(d^3*tan(1/2*f*x + 1/2*e)^3 - 6* 
c*d^2*tan(1/2*f*x + 1/2*e)^2 + 2*d^3*tan(1/2*f*x + 1/2*e)^2 - d^3*tan(1/2* 
f*x + 1/2*e) - 6*c*d^2 + 2*d^3)/((tan(1/2*f*x + 1/2*e)^2 + 1)^2*a))/f
 

Mupad [B] (verification not implemented)

Time = 17.94 (sec) , antiderivative size = 282, normalized size of antiderivative = 2.33 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {3\,d\,\mathrm {atan}\left (\frac {3\,d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c^2-2\,c\,d+d^2\right )}{6\,c^2\,d-6\,c\,d^2+3\,d^3}\right )\,\left (2\,c^2-2\,c\,d+d^2\right )}{a\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (6\,c\,d^2-d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (2\,c^3-6\,c^2\,d+6\,c\,d^2-3\,d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (4\,c^3-12\,c^2\,d+18\,c\,d^2-5\,d^3\right )+12\,c\,d^2-6\,c^2\,d+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (6\,c\,d^2-3\,d^3\right )+2\,c^3-4\,d^3}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\right )} \] Input:

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

Output:

(3*d*atan((3*d*tan(e/2 + (f*x)/2)*(2*c^2 - 2*c*d + d^2))/(6*c^2*d - 6*c*d^ 
2 + 3*d^3))*(2*c^2 - 2*c*d + d^2))/(a*f) - (tan(e/2 + (f*x)/2)*(6*c*d^2 - 
d^3) + tan(e/2 + (f*x)/2)^4*(6*c*d^2 - 6*c^2*d + 2*c^3 - 3*d^3) + tan(e/2 
+ (f*x)/2)^2*(18*c*d^2 - 12*c^2*d + 4*c^3 - 5*d^3) + 12*c*d^2 - 6*c^2*d + 
tan(e/2 + (f*x)/2)^3*(6*c*d^2 - 3*d^3) + 2*c^3 - 4*d^3)/(f*(a + a*tan(e/2 
+ (f*x)/2) + 2*a*tan(e/2 + (f*x)/2)^2 + 2*a*tan(e/2 + (f*x)/2)^3 + a*tan(e 
/2 + (f*x)/2)^4 + a*tan(e/2 + (f*x)/2)^5))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 315, normalized size of antiderivative = 2.60 \[ \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx=\frac {4 \cos \left (f x +e \right ) c^{3}-6 \cos \left (f x +e \right ) d^{3}+12 c^{2} d +3 \cos \left (f x +e \right ) d^{3} f x -6 \sin \left (f x +e \right ) c^{2} d f x +6 d^{3}+6 \sin \left (f x +e \right )^{2} c \,d^{2}+6 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c \,d^{2}-6 c^{2} d f x +6 c \,d^{2} f x -4 c^{3}+\sin \left (f x +e \right )^{3} d^{3}-\sin \left (f x +e \right ) d^{3}+\cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} d^{3}-\cos \left (f x +e \right ) \sin \left (f x +e \right ) d^{3}-12 \cos \left (f x +e \right ) c^{2} d +12 \cos \left (f x +e \right ) c \,d^{2}-3 d^{3} f x -3 \sin \left (f x +e \right ) d^{3} f x +6 \cos \left (f x +e \right ) c^{2} d f x -6 \cos \left (f x +e \right ) c \,d^{2} f x +6 \sin \left (f x +e \right ) c \,d^{2} f x -12 c \,d^{2}+6 \sin \left (f x +e \right ) c \,d^{2}-2 \sin \left (f x +e \right )^{2} d^{3}}{2 a f \left (\cos \left (f x +e \right )-\sin \left (f x +e \right )-1\right )} \] Input:

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

Output:

(cos(e + f*x)*sin(e + f*x)**2*d**3 + 6*cos(e + f*x)*sin(e + f*x)*c*d**2 - 
cos(e + f*x)*sin(e + f*x)*d**3 + 4*cos(e + f*x)*c**3 + 6*cos(e + f*x)*c**2 
*d*f*x - 12*cos(e + f*x)*c**2*d - 6*cos(e + f*x)*c*d**2*f*x + 12*cos(e + f 
*x)*c*d**2 + 3*cos(e + f*x)*d**3*f*x - 6*cos(e + f*x)*d**3 + sin(e + f*x)* 
*3*d**3 + 6*sin(e + f*x)**2*c*d**2 - 2*sin(e + f*x)**2*d**3 - 6*sin(e + f* 
x)*c**2*d*f*x + 6*sin(e + f*x)*c*d**2*f*x + 6*sin(e + f*x)*c*d**2 - 3*sin( 
e + f*x)*d**3*f*x - sin(e + f*x)*d**3 - 4*c**3 - 6*c**2*d*f*x + 12*c**2*d 
+ 6*c*d**2*f*x - 12*c*d**2 - 3*d**3*f*x + 6*d**3)/(2*a*f*(cos(e + f*x) - s 
in(e + f*x) - 1))