3.643 \(\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))^3} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 26, 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}{2 d (a \sin (c+d x)+b \sec (c+d x))^2} \]

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])^3,x]

[Out]

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

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))^3} \, dx &=-\frac {1}{2 d (b \sec (c+d x)+a \sin (c+d x))^2}\\ \end {align*}

________________________________________________________________________________________

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

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])^3,x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 1.91, size = 63, normalized size = 2.42 \[ \frac {\cos \left (d x + c\right )^{2}}{2 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} - a^{2} d \cos \left (d x + c\right )^{2} - 2 \, a b d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - b^{2} d\right )}} \]

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))^3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

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))^3,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Eval
uation time: 52.12gen.cc:simplify/tmp.type!=_EXT Error: Bad Argument Value

________________________________________________________________________________________

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

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))^3,x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 24, normalized size = 0.92 \[ -\frac {1}{2 \, {\left (b \sec \left (d x + c\right ) + a \sin \left (d x + c\right )\right )}^{2} 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))^3,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 6.31, size = 291, normalized size = 11.19 \[ \frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (a^2+b^2\right )}{b^2}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (a^2+b^2\right )}{b^2}+\frac {2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a^2-b^2\right )}{b^2}+\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{b}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{b}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{b}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (4\,a^2+4\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,a^2+4\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (8\,a^2-6\,b^2\right )+b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+b^2+4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\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))^3,x)

[Out]

((2*tan(c/2 + (d*x)/2)^2*(a^2 + b^2))/b^2 + (2*tan(c/2 + (d*x)/2)^6*(a^2 + b^2))/b^2 + (2*a*tan(c/2 + (d*x)/2)
)/b - (4*tan(c/2 + (d*x)/2)^4*(a^2 - b^2))/b^2 + (2*a*tan(c/2 + (d*x)/2)^3)/b - (2*a*tan(c/2 + (d*x)/2)^5)/b -
 (2*a*tan(c/2 + (d*x)/2)^7)/b)/(d*(tan(c/2 + (d*x)/2)^2*(4*a^2 + 4*b^2) + tan(c/2 + (d*x)/2)^6*(4*a^2 + 4*b^2)
 - tan(c/2 + (d*x)/2)^4*(8*a^2 - 6*b^2) + b^2*tan(c/2 + (d*x)/2)^8 + b^2 + 4*a*b*tan(c/2 + (d*x)/2)^3 - 4*a*b*
tan(c/2 + (d*x)/2)^5 - 4*a*b*tan(c/2 + (d*x)/2)^7 + 4*a*b*tan(c/2 + (d*x)/2)))

________________________________________________________________________________________

sympy [A]  time = 44.09, size = 80, normalized size = 3.08 \[ \begin {cases} - \frac {1}{2 a^{2} d \sin ^{2}{\left (c + d x \right )} + 4 a b d \sin {\left (c + d x \right )} \sec {\left (c + d x \right )} + 2 b^{2} d \sec ^{2}{\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 )^{3}} & \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))**3,x)

[Out]

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

________________________________________________________________________________________