3.642 \(\int \frac {a \cos (c+d x)+b \sec (c+d x) \tan (c+d x)}{(b \sec (c+d x)+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=24 \[ -\frac {1}{d (a \sin (c+d x)+b \sec (c+d x))} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.023, Rules used = {4385} \[ -\frac {1}{d (a \sin (c+d x)+b \sec (c+d x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(1/(d*(b*Sec[c + d*x] + a*Sin[c + d*x])))

Rule 4385

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[ActivateTrig[y], ActivateTrig[u], x]}, Simp[(q*A
ctivateTrig[y^(m + 1)])/(m + 1), x] /;  !FalseQ[q]] /; FreeQ[m, x] && NeQ[m, -1] &&  !InertTrigFreeQ[u]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 27, normalized size = 1.12 \[ -\frac {2 \cos (c+d x)}{d (a \sin (2 (c+d x))+2 b)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.90, size = 29, normalized size = 1.21 \[ -\frac {\cos \left (d x + c\right )}{a d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.73, size = 108, normalized size = 4.50 \[ \frac {2 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b\right )}}{{\left (b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b\right )} b d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.63, size = 25, normalized size = 1.04 \[ -\frac {1}{d \left (b \sec \left (d x +c \right )+a \sin \left (d x +c \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 24, normalized size = 1.00 \[ -\frac {1}{{\left (b \sec \left (d x + c\right ) + a \sin \left (d x + c\right )\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.24, size = 47, normalized size = 1.96 \[ -\frac {b\,\left (\cos \left (c+d\,x\right )+1\right )+\frac {a\,\sin \left (2\,c+2\,d\,x\right )}{2}}{b\,d\,\left (b+\frac {a\,\sin \left (2\,c+2\,d\,x\right )}{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 21.18, size = 49, normalized size = 2.04 \[ \begin {cases} - \frac {1}{a d \sin {\left (c + d x \right )} + b d \sec {\left (c + d x \right )}} & \text {for}\: d \neq 0 \\\frac {x \left (a \cos {\relax (c )} + b \tan {\relax (c )} \sec {\relax (c )}\right )}{\left (a \sin {\relax (c )} + b \sec {\relax (c )}\right )^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-1/(a*d*sin(c + d*x) + b*d*sec(c + d*x)), Ne(d, 0)), (x*(a*cos(c) + b*tan(c)*sec(c))/(a*sin(c) + b*
sec(c))**2, True))

________________________________________________________________________________________