3.290 \(\int \frac {\tan (c+d x)}{a+b \sec (c+d x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3885, 36, 29, 31} \[ -\frac {\log (a+b \sec (c+d x))}{a d}-\frac {\log (\cos (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 3885

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 19, normalized size = 0.54 \[ -\frac {\log (a \cos (c+d x)+b)}{a d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 19, normalized size = 0.54 \[ -\frac {\log \left (a \cos \left (d x + c\right ) + b\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.35, size = 114, normalized size = 3.26 \[ \frac {\log \left (\frac {{\left | 2 \, b + \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {2 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - 2 \, {\left | a \right |} \right |}}{{\left | 2 \, b + \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {2 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + 2 \, {\left | a \right |} \right |}}\right )}{d {\left | a \right |}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.13, size = 35, normalized size = 1.00 \[ -\frac {\ln \left (a +b \sec \left (d x +c \right )\right )}{d a}+\frac {\ln \left (\sec \left (d x +c \right )\right )}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 19, normalized size = 0.54 \[ -\frac {\log \left (a \cos \left (d x + c\right ) + b\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.47, size = 71, normalized size = 2.03 \[ \frac {\mathrm {atan}\left (\frac {a\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}+b\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(atan((a*sin(c/2 + (d*x)/2)^2)/(a*cos(c/2 + (d*x)/2)^2*1i + b*cos(c/2 + (d*x)/2)^2*1i + b*sin(c/2 + (d*x)/2)^2
*1i))*2i)/(a*d)

________________________________________________________________________________________

sympy [A]  time = 5.73, size = 82, normalized size = 2.34 \[ \begin {cases} \frac {\tilde {\infty } x \tan {\relax (c )}}{\sec {\relax (c )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a d} & \text {for}\: b = 0 \\- \frac {1}{b d \sec {\left (c + d x \right )}} & \text {for}\: a = 0 \\\frac {x \tan {\relax (c )}}{a + b \sec {\relax (c )}} & \text {for}\: d = 0 \\- \frac {\log {\left (\frac {a}{b} + \sec {\left (c + d x \right )} \right )}}{a d} + \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a d} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*x*tan(c)/sec(c), Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (log(tan(c + d*x)**2 + 1)/(2*a*d), Eq(b, 0)),
 (-1/(b*d*sec(c + d*x)), Eq(a, 0)), (x*tan(c)/(a + b*sec(c)), Eq(d, 0)), (-log(a/b + sec(c + d*x))/(a*d) + log
(tan(c + d*x)**2 + 1)/(2*a*d), True))

________________________________________________________________________________________