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

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

Optimal result

Integrand size = 26, antiderivative size = 1512 \[ \int \frac {(e+f x)^3 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx =\text {Too large to display} \] Output:

-I*a^2*(f*x+e)^3*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)^ 
(3/2)/d+3*a*f*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^ 
2-b^2)/d^2-6*I*a*f^2*(f*x+e)*polylog(2,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/ 
2)))/b/(a^2-b^2)/d^3-I*a*(f*x+e)^3/b/(a^2-b^2)/d+3*a*f*(f*x+e)^2*ln(1-I*b* 
exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)/d^2-6*I*f^2*(f*x+e)*polylo 
g(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(1/2)/d^3+6*I*f^2* 
(f*x+e)*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(1/2 
)/d^3-6*I*a^2*f^2*(f*x+e)*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)) 
)/b/(a^2-b^2)^(3/2)/d^3+3*a^2*f*(f*x+e)^2*polylog(2,I*b*exp(I*(d*x+c))/(a- 
(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(3/2)/d^2-3*f*(f*x+e)^2*polylog(2,I*b*exp(I* 
(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(1/2)/d^2+I*(f*x+e)^3*ln(1-I*b*e 
xp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(1/2)/d-3*a^2*f*(f*x+e)^2*p 
olylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(3/2)/d^2+3*f 
*(f*x+e)^2*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)^( 
1/2)/d^2+6*a*f^3*polylog(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2- 
b^2)/d^4-I*(f*x+e)^3*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2-b 
^2)^(1/2)/d+6*I*a^2*f^2*(f*x+e)*polylog(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^ 
(1/2)))/b/(a^2-b^2)^(3/2)/d^3+6*a*f^3*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2 
-b^2)^(1/2)))/b/(a^2-b^2)/d^4-6*I*a*f^2*(f*x+e)*polylog(2,I*b*exp(I*(d*x+c 
))/(a+(a^2-b^2)^(1/2)))/b/(a^2-b^2)/d^3+I*a^2*(f*x+e)^3*ln(1-I*b*exp(I*...
 

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(4970\) vs. \(2(1512)=3024\).

Time = 24.86 (sec) , antiderivative size = 4970, normalized size of antiderivative = 3.29 \[ \int \frac {(e+f x)^3 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Result too large to show} \] Input:

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

Output:

(3*b*e^2*f*((Pi*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 
 - b^2] + (2*(-c + Pi/2 - d*x)*ArcTanh[((a + b)*Cot[(-c + Pi/2 - d*x)/2])/ 
Sqrt[-a^2 + b^2]] - 2*(-c + ArcCos[-(a/b)])*ArcTanh[((-a + b)*Tan[(-c + Pi 
/2 - d*x)/2])/Sqrt[-a^2 + b^2]] + (ArcCos[-(a/b)] - (2*I)*(ArcTanh[((a + b 
)*Cot[(-c + Pi/2 - d*x)/2])/Sqrt[-a^2 + b^2]] - ArcTanh[((-a + b)*Tan[(-c 
+ Pi/2 - d*x)/2])/Sqrt[-a^2 + b^2]]))*Log[Sqrt[-a^2 + b^2]/(Sqrt[2]*Sqrt[b 
]*E^((I/2)*(-c + Pi/2 - d*x))*Sqrt[a + b*Sin[c + d*x]])] + (ArcCos[-(a/b)] 
 + (2*I)*(ArcTanh[((a + b)*Cot[(-c + Pi/2 - d*x)/2])/Sqrt[-a^2 + b^2]] - A 
rcTanh[((-a + b)*Tan[(-c + Pi/2 - d*x)/2])/Sqrt[-a^2 + b^2]]))*Log[(Sqrt[- 
a^2 + b^2]*E^((I/2)*(-c + Pi/2 - d*x)))/(Sqrt[2]*Sqrt[b]*Sqrt[a + b*Sin[c 
+ d*x]])] - (ArcCos[-(a/b)] + (2*I)*ArcTanh[((-a + b)*Tan[(-c + Pi/2 - d*x 
)/2])/Sqrt[-a^2 + b^2]])*Log[1 - ((a - I*Sqrt[-a^2 + b^2])*(a + b - Sqrt[- 
a^2 + b^2]*Tan[(-c + Pi/2 - d*x)/2]))/(b*(a + b + Sqrt[-a^2 + b^2]*Tan[(-c 
 + Pi/2 - d*x)/2]))] + (-ArcCos[-(a/b)] + (2*I)*ArcTanh[((-a + b)*Tan[(-c 
+ Pi/2 - d*x)/2])/Sqrt[-a^2 + b^2]])*Log[1 - ((a + I*Sqrt[-a^2 + b^2])*(a 
+ b - Sqrt[-a^2 + b^2]*Tan[(-c + Pi/2 - d*x)/2]))/(b*(a + b + Sqrt[-a^2 + 
b^2]*Tan[(-c + Pi/2 - d*x)/2]))] + I*(PolyLog[2, ((a - I*Sqrt[-a^2 + b^2]) 
*(a + b - Sqrt[-a^2 + b^2]*Tan[(-c + Pi/2 - d*x)/2]))/(b*(a + b + Sqrt[-a^ 
2 + b^2]*Tan[(-c + Pi/2 - d*x)/2]))] - PolyLog[2, ((a + I*Sqrt[-a^2 + b^2] 
)*(a + b - Sqrt[-a^2 + b^2]*Tan[(-c + Pi/2 - d*x)/2]))/(b*(a + b + Sqrt...
 

Rubi [A] (verified)

Time = 3.61 (sec) , antiderivative size = 1512, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {7293, 2009}

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {6 a \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f^3}{b \left (a^2-b^2\right ) d^4}+\frac {6 a \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f^3}{b \left (a^2-b^2\right ) d^4}+\frac {6 \operatorname {PolyLog}\left (4,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f^3}{b \sqrt {a^2-b^2} d^4}-\frac {6 a^2 \operatorname {PolyLog}\left (4,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f^3}{b \left (a^2-b^2\right )^{3/2} d^4}-\frac {6 \operatorname {PolyLog}\left (4,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f^3}{b \sqrt {a^2-b^2} d^4}+\frac {6 a^2 \operatorname {PolyLog}\left (4,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f^3}{b \left (a^2-b^2\right )^{3/2} d^4}-\frac {6 i a (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f^2}{b \left (a^2-b^2\right ) d^3}-\frac {6 i a (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f^2}{b \left (a^2-b^2\right ) d^3}-\frac {6 i (e+f x) \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f^2}{b \sqrt {a^2-b^2} d^3}+\frac {6 i a^2 (e+f x) \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f^2}{b \left (a^2-b^2\right )^{3/2} d^3}+\frac {6 i (e+f x) \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f^2}{b \sqrt {a^2-b^2} d^3}-\frac {6 i a^2 (e+f x) \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f^2}{b \left (a^2-b^2\right )^{3/2} d^3}+\frac {3 a (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f}{b \left (a^2-b^2\right ) d^2}+\frac {3 a (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f}{b \left (a^2-b^2\right ) d^2}-\frac {3 (e+f x)^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f}{b \sqrt {a^2-b^2} d^2}+\frac {3 a^2 (e+f x)^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) f}{b \left (a^2-b^2\right )^{3/2} d^2}+\frac {3 (e+f x)^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f}{b \sqrt {a^2-b^2} d^2}-\frac {3 a^2 (e+f x)^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) f}{b \left (a^2-b^2\right )^{3/2} d^2}-\frac {i a (e+f x)^3}{b \left (a^2-b^2\right ) d}-\frac {i (e+f x)^3 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d}+\frac {i a^2 (e+f x)^3 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d}+\frac {i (e+f x)^3 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d}-\frac {i a^2 (e+f x)^3 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d}-\frac {a (e+f x)^3 \cos (c+d x)}{\left (a^2-b^2\right ) d (a+b \sin (c+d x))}\)

Input:

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

Output:

((-I)*a*(e + f*x)^3)/(b*(a^2 - b^2)*d) + (3*a*f*(e + f*x)^2*Log[1 - (I*b*E 
^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^2) + (I*a^2*(e + 
f*x)^3*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2 
)^(3/2)*d) - (I*(e + f*x)^3*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - 
b^2])])/(b*Sqrt[a^2 - b^2]*d) + (3*a*f*(e + f*x)^2*Log[1 - (I*b*E^(I*(c + 
d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^2) - (I*a^2*(e + f*x)^3*Lo 
g[1 - (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)^(3/2)*d 
) + (I*(e + f*x)^3*Log[1 - (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/( 
b*Sqrt[a^2 - b^2]*d) - ((6*I)*a*f^2*(e + f*x)*PolyLog[2, (I*b*E^(I*(c + d* 
x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^3) + (3*a^2*f*(e + f*x)^2*Po 
lyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)^(3/2 
)*d^2) - (3*f*(e + f*x)^2*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - 
 b^2])])/(b*Sqrt[a^2 - b^2]*d^2) - ((6*I)*a*f^2*(e + f*x)*PolyLog[2, (I*b* 
E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^3) - (3*a^2*f*(e 
 + f*x)^2*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*(a^2 
 - b^2)^(3/2)*d^2) + (3*f*(e + f*x)^2*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a 
+ Sqrt[a^2 - b^2])])/(b*Sqrt[a^2 - b^2]*d^2) + (6*a*f^3*PolyLog[3, (I*b*E^ 
(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a^2 - b^2)*d^4) + ((6*I)*a^2*f^ 
2*(e + f*x)*PolyLog[3, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*(a 
^2 - b^2)^(3/2)*d^3) - ((6*I)*f^2*(e + f*x)*PolyLog[3, (I*b*E^(I*(c + d...
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [F]

\[\int \frac {\left (f x +e \right )^{3} \sin \left (d x +c \right )}{\left (a +b \sin \left (d x +c \right )\right )^{2}}d x\]

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 5184 vs. \(2 (1320) = 2640\).

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

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

Output:

Too large to include
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((f*x+e)^3*sin(d*x+c)/(a+b*sin(d*x+c))^2,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 [F]

\[ \int \frac {(e+f x)^3 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\int { \frac {{\left (f x + e\right )}^{3} \sin \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

\text{Hanged}
 

Reduce [F]

\[ \int \frac {(e+f x)^3 \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {too large to display} \] Input:

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

Output:

(48*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin 
(c + d*x)*a**7*b*d*e*f**2 - 144*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a 
 + b)/sqrt(a**2 - b**2))*sin(c + d*x)*a**6*b**2*f**3 - 8*sqrt(a**2 - b**2) 
*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(c + d*x)*a**5*b**3*d 
**3*e**3 + 48*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - 
b**2))*sin(c + d*x)*a**5*b**3*d*e*f**2 + 48*sqrt(a**2 - b**2)*atan((tan((c 
 + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(c + d*x)*a**4*b**4*d**2*e**2*f - 
240*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin 
(c + d*x)*a**4*b**4*f**3 - 384*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a 
+ b)/sqrt(a**2 - b**2))*sin(c + d*x)*a**3*b**5*d*e*f**2 - 48*sqrt(a**2 - b 
**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(c + d*x)*a**2*b* 
*6*d**2*e**2*f + 1248*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt 
(a**2 - b**2))*sin(c + d*x)*a**2*b**6*f**3 + 288*sqrt(a**2 - b**2)*atan((t 
an((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(c + d*x)*a*b**7*d*e*f**2 - 8 
64*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin( 
c + d*x)*b**8*f**3 + 48*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sq 
rt(a**2 - b**2))*a**8*d*e*f**2 - 144*sqrt(a**2 - b**2)*atan((tan((c + d*x) 
/2)*a + b)/sqrt(a**2 - b**2))*a**7*b*f**3 - 8*sqrt(a**2 - b**2)*atan((tan( 
(c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*a**6*b**2*d**3*e**3 + 48*sqrt(a**2 
- b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*a**6*b**2*d*e*...