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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2839, 2606, 3473, 8} \[ -\frac {\tan ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}-\frac {\sec (c+d x)}{a d}-\frac {x}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

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

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 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 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 (c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \sec (c+d x) \tan ^3(c+d x) \, dx}{a}-\frac {\int \tan ^4(c+d x) \, dx}{a}\\ &=-\frac {\tan ^3(c+d x)}{3 a d}+\frac {\int \tan ^2(c+d x) \, dx}{a}+\frac {\operatorname {Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a d}\\ &=-\frac {\sec (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}-\frac {\tan ^3(c+d x)}{3 a d}-\frac {\int 1 \, dx}{a}\\ &=-\frac {x}{a}-\frac {\sec (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}-\frac {\tan ^3(c+d x)}{3 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.36, size = 111, normalized size = 1.59 \[ \frac {-2 \sin (c+d x)+4 \cos (2 (c+d x))+(6 c+6 d x-5) (\sin (c+d x)+1) \cos (c+d x)}{6 a d (\sin (c+d x)+1) \left (\sin \left (\frac {1}{2} (c+d x)\right )-\cos \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(4*Cos[2*(c + d*x)] - 2*Sin[c + d*x] + (-5 + 6*c + 6*d*x)*Cos[c + d*x]*(1 + Sin[c + d*x]))/(6*a*d*(-Cos[(c + d
*x)/2] + Sin[(c + d*x)/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])*(1 + Sin[c + d*x]))

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 70, normalized size = 1.00 \[ -\frac {3 \, d x \cos \left (d x + c\right ) + 4 \, \cos \left (d x + c\right )^{2} + {\left (3 \, d x \cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right ) - 2}{3 \, {\left (a d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a 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)^3/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 77, normalized size = 1.10 \[ -\frac {\frac {6 \, {\left (d x + c\right )}}{a} + \frac {3}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} + \frac {9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 11}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*(6*(d*x + c)/a + 3/(a*(tan(1/2*d*x + 1/2*c) - 1)) + (9*tan(1/2*d*x + 1/2*c)^2 + 24*tan(1/2*d*x + 1/2*c) +
 11)/(a*(tan(1/2*d*x + 1/2*c) + 1)^3))/d

________________________________________________________________________________________

maple [A]  time = 0.36, size = 104, normalized size = 1.49 \[ -\frac {1}{2 a 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 )}{a d}+\frac {2}{3 a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{2 a 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)^3/(a+a*sin(d*x+c)),x)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 154, normalized size = 2.20 \[ -\frac {2 \, {\left (\frac {\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {6 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + 2}{a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {3 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}\right )}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 11.18, size = 79, normalized size = 1.13 \[ \frac {-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {4}{3}}{a\,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 )}^3}-\frac {x}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________