3.873 \(\int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx\)

Optimal. Leaf size=64 \[ \frac {a^5}{2 d (a-a \sin (c+d x))^2}-\frac {2 a^4}{d (a-a \sin (c+d x))}-\frac {a^3 \log (1-\sin (c+d x))}{d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2836, 12, 43} \[ \frac {a^5}{2 d (a-a \sin (c+d x))^2}-\frac {2 a^4}{d (a-a \sin (c+d x))}-\frac {a^3 \log (1-\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((a^3*Log[1 - Sin[c + d*x]])/d) + a^5/(2*d*(a - a*Sin[c + d*x])^2) - (2*a^4)/(d*(a - a*Sin[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2836

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 45, normalized size = 0.70 \[ -\frac {a^3 \left (\frac {3-4 \sin (c+d x)}{(\sin (c+d x)-1)^2}+2 \log (1-\sin (c+d x))\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-1/2*(a^3*(2*Log[1 - Sin[c + d*x]] + (3 - 4*Sin[c + d*x])/(-1 + Sin[c + d*x])^2))/d

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 86, normalized size = 1.34 \[ -\frac {4 \, a^{3} \sin \left (d x + c\right ) - 3 \, a^{3} + 2 \, {\left (a^{3} \cos \left (d x + c\right )^{2} + 2 \, a^{3} \sin \left (d x + c\right ) - 2 \, a^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, {\left (d \cos \left (d x + c\right )^{2} + 2 \, d \sin \left (d x + c\right ) - 2 \, d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.27, size = 125, normalized size = 1.95 \[ \frac {6 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 12 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {25 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 112 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 186 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 112 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 25 \, a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{4}}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*(6*a^3*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 12*a^3*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + (25*a^3*tan(1/2*d*x +
 1/2*c)^4 - 112*a^3*tan(1/2*d*x + 1/2*c)^3 + 186*a^3*tan(1/2*d*x + 1/2*c)^2 - 112*a^3*tan(1/2*d*x + 1/2*c) + 2
5*a^3)/(tan(1/2*d*x + 1/2*c) - 1)^4)/d

________________________________________________________________________________________

maple [B]  time = 0.29, size = 220, normalized size = 3.44 \[ \frac {a^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}-\frac {a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {3 a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {3 a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{8 d}-\frac {a^{3} \sin \left (d x +c \right )}{d}+\frac {a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}+\frac {a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}+\frac {a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5*sin(d*x+c)^2*(a+a*sin(d*x+c))^3,x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 59, normalized size = 0.92 \[ -\frac {2 \, a^{3} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {4 \, a^{3} \sin \left (d x + c\right ) - 3 \, a^{3}}{\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 9.71, size = 313, normalized size = 4.89 \[ -\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (4\,a^3\,\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )+a^3\,\left (4\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )-8\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )+2\right )\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (4\,a^3\,\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )+a^3\,\left (4\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )-8\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )+2\right )\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (6\,a^3\,\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )+a^3\,\left (6\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )-12\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )+6\right )\right )}{d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^4}-\frac {a^3\,\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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)**5*sin(d*x+c)**2*(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________