3.19 \(\int \sec (c+d x) (a+a \sin (c+d x))^2 \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2667, 43} \[ -\frac {a^2 \sin (c+d x)}{d}-\frac {2 a^2 \log (1-\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 29, normalized size = 0.85 \[ \frac {a^2 (-\sin (c+d x)-2 \log (1-\sin (c+d x)))}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 32, normalized size = 0.94 \[ -\frac {2 \, a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + a^{2} \sin \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.87, size = 91, normalized size = 2.68 \[ \frac {2 \, {\left (a^{2} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 2 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(a^2*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 2*a^2*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - (a^2*tan(1/2*d*x + 1/2*c)^
2 + a^2*tan(1/2*d*x + 1/2*c) + a^2)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d

________________________________________________________________________________________

maple [A]  time = 0.14, size = 53, normalized size = 1.56 \[ -\frac {a^{2} \sin \left (d x +c \right )}{d}+\frac {2 a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}-\frac {2 a^{2} \ln \left (\cos \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-a^2*sin(d*x+c)/d+2/d*a^2*ln(sec(d*x+c)+tan(d*x+c))-2/d*a^2*ln(cos(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 30, normalized size = 0.88 \[ -\frac {2 \, a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) + a^{2} \sin \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 26, normalized size = 0.76 \[ -\frac {a^2\,\left (2\,\ln \left (\sin \left (c+d\,x\right )-1\right )+\sin \left (c+d\,x\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________