3.59 \(\int \frac {\tan ^3(c+d x)}{a+a \sec (c+d x)} \, dx\)

Optimal. Leaf size=28 \[ \frac {\sec (c+d x)}{a d}+\frac {\log (\cos (c+d x))}{a d} \]

[Out]

ln(cos(d*x+c))/a/d+sec(d*x+c)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3879, 43} \[ \frac {\sec (c+d x)}{a d}+\frac {\log (\cos (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cos[c + d*x]]/(a*d) + Sec[c + d*x]/(a*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 3879

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 21, normalized size = 0.75 \[ \frac {\sec (c+d x)+\log (\cos (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Log[Cos[c + d*x]] + Sec[c + d*x])/(a*d)

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 33, normalized size = 1.18 \[ \frac {\cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) + 1}{a d \cos \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

(cos(d*x + c)*log(-cos(d*x + c)) + 1)/(a*d*cos(d*x + c))

________________________________________________________________________________________

giac [B]  time = 1.12, size = 111, normalized size = 3.96 \[ -\frac {\frac {\log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{a} - \frac {\log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{a} + \frac {\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1}{a {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1))/a - log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)
)/a + ((cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)/(a*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.31, size = 30, normalized size = 1.07 \[ \frac {\sec \left (d x +c \right )}{d a}-\frac {\ln \left (\sec \left (d x +c \right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^3/(a+a*sec(d*x+c)),x)

[Out]

sec(d*x+c)/d/a-1/a/d*ln(sec(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 28, normalized size = 1.00 \[ \frac {\frac {\log \left (\cos \left (d x + c\right )\right )}{a} + \frac {1}{a \cos \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(cos(d*x + c))/a + 1/(a*cos(d*x + c)))/d

________________________________________________________________________________________

mupad [B]  time = 1.22, size = 44, normalized size = 1.57 \[ \frac {2}{d\,\left (a-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {2\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(tan(c + d*x)**3/(sec(c + d*x) + 1), x)/a

________________________________________________________________________________________