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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2672, 3767, 8} \[ \frac {2 \tan (c+d x)}{3 a d}-\frac {\sec (c+d x)}{3 d (a \sin (c+d x)+a)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

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

Rule 2672

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

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 45, normalized size = 1.07 \[ \frac {2 \tan (c+d x)-\cos (2 (c+d x)) \sec (c+d x)}{3 a d (\sin (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-(Cos[2*(c + d*x)]*Sec[c + d*x]) + 2*Tan[c + d*x])/(3*a*d*(1 + Sin[c + d*x]))

________________________________________________________________________________________

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.27, size = 67, normalized size = 1.60 \[ -\frac {\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} + 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7}{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/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.12, size = 70, normalized size = 1.67 \[ \frac {-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 129, normalized size = 3.07 \[ \frac {2 \, {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \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}} - 1\right )}}{3 \, {\left (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}}\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/3*(sin(d*x + c)/(cos(d*x + c) + 1) + 3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*sin(d*x + c)^3/(cos(d*x + c)
+ 1)^3 - 1)/((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)*d)

________________________________________________________________________________________

mupad [B]  time = 2.80, size = 71, normalized size = 1.69 \[ -\frac {2\,\left (3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________