3.780 \(\int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=106 \[ \frac {2 \tan ^5(c+d x)}{5 a^2 d}-\frac {\tan ^3(c+d x)}{3 a^2 d}+\frac {\tan (c+d x)}{a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {2 \sec (c+d x)}{a^2 d}-\frac {x}{a^2} \]

[Out]

-x/a^2-2*sec(d*x+c)/a^2/d+4/3*sec(d*x+c)^3/a^2/d-2/5*sec(d*x+c)^5/a^2/d+tan(d*x+c)/a^2/d-1/3*tan(d*x+c)^3/a^2/
d+2/5*tan(d*x+c)^5/a^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.28, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2875, 2873, 2607, 30, 2606, 194, 3473, 8} \[ \frac {2 \tan ^5(c+d x)}{5 a^2 d}-\frac {\tan ^3(c+d x)}{3 a^2 d}+\frac {\tan (c+d x)}{a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {2 \sec (c+d x)}{a^2 d}-\frac {x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(Sin[c + d*x]^2*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]

[Out]

-(x/a^2) - (2*Sec[c + d*x])/(a^2*d) + (4*Sec[c + d*x]^3)/(3*a^2*d) - (2*Sec[c + d*x]^5)/(5*a^2*d) + Tan[c + d*
x]/(a^2*d) - Tan[c + d*x]^3/(3*a^2*d) + (2*Tan[c + d*x]^5)/(5*a^2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2875

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[((g*Cos[e + f*x])^(2*m + p)*(d*Sin[e + f*x])^n)/(a - b*Sin[e +
 f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \sec ^2(c+d x) (a-a \sin (c+d x))^2 \tan ^4(c+d x) \, dx}{a^4}\\ &=\frac {\int \left (a^2 \sec ^2(c+d x) \tan ^4(c+d x)-2 a^2 \sec (c+d x) \tan ^5(c+d x)+a^2 \tan ^6(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \sec ^2(c+d x) \tan ^4(c+d x) \, dx}{a^2}+\frac {\int \tan ^6(c+d x) \, dx}{a^2}-\frac {2 \int \sec (c+d x) \tan ^5(c+d x) \, dx}{a^2}\\ &=\frac {\tan ^5(c+d x)}{5 a^2 d}-\frac {\int \tan ^4(c+d x) \, dx}{a^2}+\frac {\operatorname {Subst}\left (\int x^4 \, dx,x,\tan (c+d x)\right )}{a^2 d}-\frac {2 \operatorname {Subst}\left (\int \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac {\tan ^3(c+d x)}{3 a^2 d}+\frac {2 \tan ^5(c+d x)}{5 a^2 d}+\frac {\int \tan ^2(c+d x) \, dx}{a^2}-\frac {2 \operatorname {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac {2 \sec (c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}+\frac {\tan (c+d x)}{a^2 d}-\frac {\tan ^3(c+d x)}{3 a^2 d}+\frac {2 \tan ^5(c+d x)}{5 a^2 d}-\frac {\int 1 \, dx}{a^2}\\ &=-\frac {x}{a^2}-\frac {2 \sec (c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}+\frac {\tan (c+d x)}{a^2 d}-\frac {\tan ^3(c+d x)}{3 a^2 d}+\frac {2 \tan ^5(c+d x)}{5 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.56, size = 143, normalized size = 1.35 \[ -\frac {\sec (c+d x) \left (-10 \sin (c+d x)+60 c \sin (2 (c+d x))+60 d x \sin (2 (c+d x))-89 \sin (2 (c+d x))+26 \sin (3 (c+d x))+\frac {5}{4} (60 c+60 d x-89) \cos (c+d x)+44 \cos (2 (c+d x))-15 c \cos (3 (c+d x))-15 d x \cos (3 (c+d x))+\frac {89}{4} \cos (3 (c+d x))+20\right )}{60 a^2 d (\sin (c+d x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sin[c + d*x]^2*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]

[Out]

-1/60*(Sec[c + d*x]*(20 + (5*(-89 + 60*c + 60*d*x)*Cos[c + d*x])/4 + 44*Cos[2*(c + d*x)] + (89*Cos[3*(c + d*x)
])/4 - 15*c*Cos[3*(c + d*x)] - 15*d*x*Cos[3*(c + d*x)] - 10*Sin[c + d*x] - 89*Sin[2*(c + d*x)] + 60*c*Sin[2*(c
 + d*x)] + 60*d*x*Sin[2*(c + d*x)] + 26*Sin[3*(c + d*x)]))/(a^2*d*(1 + Sin[c + d*x])^2)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 112, normalized size = 1.06 \[ -\frac {15 \, d x \cos \left (d x + c\right )^{3} - 30 \, d x \cos \left (d x + c\right ) - 22 \, \cos \left (d x + c\right )^{2} - {\left (30 \, d x \cos \left (d x + c\right ) + 26 \, \cos \left (d x + c\right )^{2} - 9\right )} \sin \left (d x + c\right ) + 6}{15 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} - 2 \, a^{2} d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/15*(15*d*x*cos(d*x + c)^3 - 30*d*x*cos(d*x + c) - 22*cos(d*x + c)^2 - (30*d*x*cos(d*x + c) + 26*cos(d*x + c
)^2 - 9)*sin(d*x + c) + 6)/(a^2*d*cos(d*x + c)^3 - 2*a^2*d*cos(d*x + c)*sin(d*x + c) - 2*a^2*d*cos(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.22, size = 103, normalized size = 0.97 \[ -\frac {\frac {60 \, {\left (d x + c\right )}}{a^{2}} + \frac {15}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} + \frac {105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 510 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 920 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 610 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 143}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{60 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/60*(60*(d*x + c)/a^2 + 15/(a^2*(tan(1/2*d*x + 1/2*c) - 1)) + (105*tan(1/2*d*x + 1/2*c)^4 + 510*tan(1/2*d*x
+ 1/2*c)^3 + 920*tan(1/2*d*x + 1/2*c)^2 + 610*tan(1/2*d*x + 1/2*c) + 143)/(a^2*(tan(1/2*d*x + 1/2*c) + 1)^5))/
d

________________________________________________________________________________________

maple [A]  time = 0.43, size = 146, normalized size = 1.38 \[ -\frac {1}{4 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}-\frac {4}{5 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {2}{a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {1}{3 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3}{2 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {7}{4 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^2*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x)

[Out]

-1/4/a^2/d/(tan(1/2*d*x+1/2*c)-1)-2/d/a^2*arctan(tan(1/2*d*x+1/2*c))-4/5/a^2/d/(tan(1/2*d*x+1/2*c)+1)^5+2/a^2/
d/(tan(1/2*d*x+1/2*c)+1)^4-1/3/a^2/d/(tan(1/2*d*x+1/2*c)+1)^3-3/2/a^2/d/(tan(1/2*d*x+1/2*c)+1)^2-7/4/a^2/d/(ta
n(1/2*d*x+1/2*c)+1)

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 249, normalized size = 2.35 \[ -\frac {2 \, {\left (\frac {\frac {49 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {20 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {70 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {60 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 16}{a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {5 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {15 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )}}{15 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)^4/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-2/15*((49*sin(d*x + c)/(cos(d*x + c) + 1) + 20*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 70*sin(d*x + c)^3/(cos(d
*x + c) + 1)^3 - 60*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 15*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 16)/(a^2 +
4*a^2*sin(d*x + c)/(cos(d*x + c) + 1) + 5*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 5*a^2*sin(d*x + c)^4/(cos(
d*x + c) + 1)^4 - 4*a^2*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + 15*ar
ctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2)/d

________________________________________________________________________________________

mupad [B]  time = 14.09, size = 105, normalized size = 0.99 \[ \frac {-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {28\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {98\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{15}+\frac {32}{15}}{a^2\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^5}-\frac {x}{a^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^4/(cos(c + d*x)^2*(a + a*sin(c + d*x))^2),x)

[Out]

((98*tan(c/2 + (d*x)/2))/15 + (8*tan(c/2 + (d*x)/2)^2)/3 - (28*tan(c/2 + (d*x)/2)^3)/3 - 8*tan(c/2 + (d*x)/2)^
4 - 2*tan(c/2 + (d*x)/2)^5 + 32/15)/(a^2*d*(tan(c/2 + (d*x)/2) - 1)*(tan(c/2 + (d*x)/2) + 1)^5) - x/a^2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sin ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**2*sin(d*x+c)**4/(a+a*sin(d*x+c))**2,x)

[Out]

Integral(sin(c + d*x)**4*sec(c + d*x)**2/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x)/a**2

________________________________________________________________________________________