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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
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 = 280 \[ \int \frac {(e+f x)^2 \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {2 i f (e+f x) \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^2}+\frac {2 i f (e+f x) \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^2}-\frac {2 f^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {2 f^2 \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))} \] Output:

-2*I*f*(f*x+e)*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b/(a^2-b^2)^(1 
/2)/d^2+2*I*f*(f*x+e)*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b/(a^2- 
b^2)^(1/2)/d^2-2*f^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^3+2*f^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^3-(f*x+e)^2/b/d/(a+b*sin(d*x+c))
 

Mathematica [A] (verified)

Time = 3.63 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.11 \[ \int \frac {(e+f x)^2 \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {2 i f \left (-i d \left (2 \sqrt {-a^2+b^2} e \arctan \left (\frac {i a+b e^{i (c+d x)}}{\sqrt {a^2-b^2}}\right )+\sqrt {a^2-b^2} f x \left (\log \left (1-\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )-\log \left (1+\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )\right )\right )-\sqrt {a^2-b^2} f \operatorname {PolyLog}\left (2,\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )+\sqrt {a^2-b^2} f \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )\right )}{b \sqrt {-\left (a^2-b^2\right )^2} d^3}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))} \] Input:

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

Output:

((2*I)*f*((-I)*d*(2*Sqrt[-a^2 + b^2]*e*ArcTan[(I*a + b*E^(I*(c + d*x)))/Sq 
rt[a^2 - b^2]] + Sqrt[a^2 - b^2]*f*x*(Log[1 - (b*E^(I*(c + d*x)))/((-I)*a 
+ Sqrt[-a^2 + b^2])] - Log[1 + (b*E^(I*(c + d*x)))/(I*a + Sqrt[-a^2 + b^2] 
)])) - Sqrt[a^2 - b^2]*f*PolyLog[2, (b*E^(I*(c + d*x)))/((-I)*a + Sqrt[-a^ 
2 + b^2])] + Sqrt[a^2 - b^2]*f*PolyLog[2, -((b*E^(I*(c + d*x)))/(I*a + Sqr 
t[-a^2 + b^2]))]))/(b*Sqrt[-(a^2 - b^2)^2]*d^3) - (e + f*x)^2/(b*d*(a + b* 
Sin[c + d*x]))
 

Rubi [A] (verified)

Time = 0.99 (sec) , antiderivative size = 272, normalized size of antiderivative = 0.97, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {4922, 3042, 3804, 2694, 27, 2620, 2715, 2838}

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

\(\Big \downarrow \) 4922

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3804

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

\(\Big \downarrow \) 2694

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 2620

\(\displaystyle -\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {4 f \left (\frac {i b \left (\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {f \int \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )dx}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {f \int \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )dx}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b d}\)

\(\Big \downarrow \) 2715

\(\displaystyle -\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {4 f \left (\frac {i b \left (\frac {i f \int e^{-i (c+d x)} \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )de^{i (c+d x)}}{b d^2}+\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {i f \int e^{-i (c+d x)} \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )de^{i (c+d x)}}{b d^2}+\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b d}\)

\(\Big \downarrow \) 2838

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

Input:

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

Output:

(4*f*(((-1/2*I)*b*(((e + f*x)*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 
- b^2])])/(b*d) - (I*f*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^ 
2])])/(b*d^2)))/Sqrt[a^2 - b^2] + ((I/2)*b*(((e + f*x)*Log[1 - (I*b*E^(I*( 
c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*d) - (I*f*PolyLog[2, (I*b*E^(I*(c + 
d*x)))/(a + Sqrt[a^2 - b^2])])/(b*d^2)))/Sqrt[a^2 - b^2]))/(b*d) - (e + f* 
x)^2/(b*d*(a + b*Sin[c + d*x]))
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2620
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ 
((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp 
[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si 
mp[d*(m/(b*f*g*n*Log[F]))   Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x 
)))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
 

rule 2694
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) 
*(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q)   Int 
[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q)   Int[(f + g*x) 
^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ 
v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
 

rule 2715
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] 
:> Simp[1/(d*e*n*Log[F])   Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) 
))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

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

rule 3804
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Sy 
mbol] :> Simp[2   Int[(c + d*x)^m*(E^(I*(e + f*x))/(I*b + 2*a*E^(I*(e + f*x 
)) - I*b*E^(2*I*(e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ 
[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 4922
Int[Cos[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.)*((a_) + (b_.)*Sin[(c 
_.) + (d_.)*(x_)])^(n_.), x_Symbol] :> Simp[(e + f*x)^m*((a + b*Sin[c + d*x 
])^(n + 1)/(b*d*(n + 1))), x] - Simp[f*(m/(b*d*(n + 1)))   Int[(e + f*x)^(m 
 - 1)*(a + b*Sin[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d, e, f, n}, 
x] && IGtQ[m, 0] && NeQ[n, -1]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 605 vs. \(2 (250 ) = 500\).

Time = 4.18 (sec) , antiderivative size = 606, normalized size of antiderivative = 2.16

method result size
risch \(-\frac {2 i \left (x^{2} f^{2}+2 e f x +e^{2}\right ) {\mathrm e}^{i \left (d x +c \right )}}{b d \left (2 i a \,{\mathrm e}^{i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}-b \right )}+\frac {4 i f e \arctan \left (\frac {2 i b \,{\mathrm e}^{i \left (d x +c \right )}-2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{d^{2} b \sqrt {-a^{2}+b^{2}}}+\frac {2 f^{2} \ln \left (\frac {i a +{\mathrm e}^{i \left (d x +c \right )} b -\sqrt {-a^{2}+b^{2}}}{i a -\sqrt {-a^{2}+b^{2}}}\right ) x}{d^{2} b \sqrt {-a^{2}+b^{2}}}-\frac {2 f^{2} \ln \left (\frac {i a +{\mathrm e}^{i \left (d x +c \right )} b +\sqrt {-a^{2}+b^{2}}}{i a +\sqrt {-a^{2}+b^{2}}}\right ) x}{d^{2} b \sqrt {-a^{2}+b^{2}}}+\frac {2 f^{2} \ln \left (\frac {i a +{\mathrm e}^{i \left (d x +c \right )} b -\sqrt {-a^{2}+b^{2}}}{i a -\sqrt {-a^{2}+b^{2}}}\right ) c}{d^{3} b \sqrt {-a^{2}+b^{2}}}-\frac {2 f^{2} \ln \left (\frac {i a +{\mathrm e}^{i \left (d x +c \right )} b +\sqrt {-a^{2}+b^{2}}}{i a +\sqrt {-a^{2}+b^{2}}}\right ) c}{d^{3} b \sqrt {-a^{2}+b^{2}}}-\frac {2 i f^{2} \operatorname {dilog}\left (\frac {i a +{\mathrm e}^{i \left (d x +c \right )} b -\sqrt {-a^{2}+b^{2}}}{i a -\sqrt {-a^{2}+b^{2}}}\right )}{d^{3} b \sqrt {-a^{2}+b^{2}}}+\frac {2 i f^{2} \operatorname {dilog}\left (\frac {i a +{\mathrm e}^{i \left (d x +c \right )} b +\sqrt {-a^{2}+b^{2}}}{i a +\sqrt {-a^{2}+b^{2}}}\right )}{d^{3} b \sqrt {-a^{2}+b^{2}}}-\frac {4 i f^{2} c \arctan \left (\frac {2 i b \,{\mathrm e}^{i \left (d x +c \right )}-2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{d^{3} b \sqrt {-a^{2}+b^{2}}}\) \(606\)

Input:

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

Output:

-2*I*(f^2*x^2+2*e*f*x+e^2)*exp(I*(d*x+c))/b/d/(2*I*a*exp(I*(d*x+c))+b*exp( 
2*I*(d*x+c))-b)+4*I/d^2/b*f*e/(-a^2+b^2)^(1/2)*arctan(1/2*(2*I*b*exp(I*(d* 
x+c))-2*a)/(-a^2+b^2)^(1/2))+2/d^2/b*f^2/(-a^2+b^2)^(1/2)*ln((I*a+exp(I*(d 
*x+c))*b-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))*x-2/d^2/b*f^2/(-a^2+b^2 
)^(1/2)*ln((I*a+exp(I*(d*x+c))*b+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2))) 
*x+2/d^3/b*f^2/(-a^2+b^2)^(1/2)*ln((I*a+exp(I*(d*x+c))*b-(-a^2+b^2)^(1/2)) 
/(I*a-(-a^2+b^2)^(1/2)))*c-2/d^3/b*f^2/(-a^2+b^2)^(1/2)*ln((I*a+exp(I*(d*x 
+c))*b+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*c-2*I/d^3/b*f^2/(-a^2+b^2 
)^(1/2)*dilog((I*a+exp(I*(d*x+c))*b-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2 
)))+2*I/d^3/b*f^2/(-a^2+b^2)^(1/2)*dilog((I*a+exp(I*(d*x+c))*b+(-a^2+b^2)^ 
(1/2))/(I*a+(-a^2+b^2)^(1/2)))-4*I/d^3/b*f^2*c/(-a^2+b^2)^(1/2)*arctan(1/2 
*(2*I*b*exp(I*(d*x+c))-2*a)/(-a^2+b^2)^(1/2))
 

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. 1393 vs. \(2 (242) = 484\).

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

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

Output:

-((a^2 - b^2)*d^2*f^2*x^2 + 2*(a^2 - b^2)*d^2*e*f*x + (a^2 - b^2)*d^2*e^2 
+ (-I*b^2*f^2*sin(d*x + c) - I*a*b*f^2)*sqrt(-(a^2 - b^2)/b^2)*dilog((I*a* 
cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(- 
(a^2 - b^2)/b^2) - b)/b + 1) + (I*b^2*f^2*sin(d*x + c) + I*a*b*f^2)*sqrt(- 
(a^2 - b^2)/b^2)*dilog((I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c 
) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) + (I*b^2*f^2*sin( 
d*x + c) + I*a*b*f^2)*sqrt(-(a^2 - b^2)/b^2)*dilog((-I*a*cos(d*x + c) - a* 
sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) 
- b)/b + 1) + (-I*b^2*f^2*sin(d*x + c) - I*a*b*f^2)*sqrt(-(a^2 - b^2)/b^2) 
*dilog((-I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c) - I*b*sin(d*x 
 + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) - (a*b*d*e*f - a*b*c*f^2 + (b^2* 
d*e*f - b^2*c*f^2)*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2)*log(2*b*cos(d*x + 
c) + 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) + 2*I*a) - (a*b*d*e*f 
 - a*b*c*f^2 + (b^2*d*e*f - b^2*c*f^2)*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2 
)*log(2*b*cos(d*x + c) - 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) - 
 2*I*a) + (a*b*d*e*f - a*b*c*f^2 + (b^2*d*e*f - b^2*c*f^2)*sin(d*x + c))*s 
qrt(-(a^2 - b^2)/b^2)*log(-2*b*cos(d*x + c) + 2*I*b*sin(d*x + c) + 2*b*sqr 
t(-(a^2 - b^2)/b^2) + 2*I*a) + (a*b*d*e*f - a*b*c*f^2 + (b^2*d*e*f - b^2*c 
*f^2)*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2)*log(-2*b*cos(d*x + c) - 2*I*b*s 
in(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) - 2*I*a) + (a*b*d*f^2*x + a*b*...
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((f*x+e)^2*cos(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)^2 \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\int { \frac {{\left (f x + e\right )}^{2} \cos \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

\text{Hanged}
 

Reduce [F]

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

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

Output:

(4*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*d*e*f - 8*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**2*f**2 + 8*sqrt(a**2 - b**2)*atan( 
(tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(c + d*x)*b**4*f**2 + 4*sqr 
t(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*a**4*d*e*f 
 - 8*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*a* 
*3*b*f**2 + 8*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - 
b**2))*a*b**3*f**2 + 2*cos(c + d*x)*a**4*b*d*f**2*x - 6*cos(c + d*x)*a**2* 
b**3*d*f**2*x + 4*cos(c + d*x)*b**5*d*f**2*x + 8*int(x/(tan((c + d*x)/2)** 
4*a**2 + 4*tan((c + d*x)/2)**3*a*b + 2*tan((c + d*x)/2)**2*a**2 + 4*tan((c 
 + d*x)/2)**2*b**2 + 4*tan((c + d*x)/2)*a*b + a**2),x)*sin(c + d*x)*a**4*b 
**3*d**2*f**2 - 16*int(x/(tan((c + d*x)/2)**4*a**2 + 4*tan((c + d*x)/2)**3 
*a*b + 2*tan((c + d*x)/2)**2*a**2 + 4*tan((c + d*x)/2)**2*b**2 + 4*tan((c 
+ d*x)/2)*a*b + a**2),x)*sin(c + d*x)*a**2*b**5*d**2*f**2 + 8*int(x/(tan(( 
c + d*x)/2)**4*a**2 + 4*tan((c + d*x)/2)**3*a*b + 2*tan((c + d*x)/2)**2*a* 
*2 + 4*tan((c + d*x)/2)**2*b**2 + 4*tan((c + d*x)/2)*a*b + a**2),x)*sin(c 
+ d*x)*b**7*d**2*f**2 + 8*int(x/(tan((c + d*x)/2)**4*a**2 + 4*tan((c + d*x 
)/2)**3*a*b + 2*tan((c + d*x)/2)**2*a**2 + 4*tan((c + d*x)/2)**2*b**2 + 4* 
tan((c + d*x)/2)*a*b + a**2),x)*a**5*b**2*d**2*f**2 - 16*int(x/(tan((c + d 
*x)/2)**4*a**2 + 4*tan((c + d*x)/2)**3*a*b + 2*tan((c + d*x)/2)**2*a**2...