3.641 \(\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)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

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

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

[Out]

Log[b*Sec[c + d*x] + a*Sin[c + d*x]]/d

Rule 4383

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[ActivateTrig[y], ActivateTrig[u], x]}, Simp[q*Log[Remo
veContent[ActivateTrig[y], x]], x] /;  !FalseQ[q]] /;  !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)} \, dx &=\frac {\log (b \sec (c+d x)+a \sin (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

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

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.13, size = 33, normalized size = 1.50 \[ \frac {\log \left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b\right ) - \log \left (-\cos \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)),x, algorithm="fricas")

[Out]

(log(a*cos(d*x + c)*sin(d*x + c) + b) - log(-cos(d*x + c)))/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)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.52, size = 23, normalized size = 1.05 \[ \frac {\ln \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]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 22, normalized size = 1.00 \[ \frac {\log \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)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.86, size = 133, normalized size = 6.05 \[ \frac {\mathrm {atan}\left (\frac {-\cos \left (c+d\,x\right )\,a^6+8\,\cos \left (c+d\,x\right )\,a^4\,b^2-16\,\cos \left (c+d\,x\right )\,a^2\,b^4+\frac {\sin \left (2\,c+2\,d\,x\right )\,a\,b^5}{2}+b^6}{1{}\mathrm {i}\,\cos \left (c+d\,x\right )\,a^6-8{}\mathrm {i}\,\cos \left (c+d\,x\right )\,a^4\,b^2+16{}\mathrm {i}\,\cos \left (c+d\,x\right )\,a^2\,b^4+\frac {1{}\mathrm {i}\,\sin \left (2\,c+2\,d\,x\right )\,a\,b^5}{2}+b^6\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{d} \]

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

[Out]

(atan((b^6 - a^6*cos(c + d*x) - 16*a^2*b^4*cos(c + d*x) + 8*a^4*b^2*cos(c + d*x) + (a*b^5*sin(2*c + 2*d*x))/2)
/(a^6*cos(c + d*x)*1i + b^6*1i + a^2*b^4*cos(c + d*x)*16i - a^4*b^2*cos(c + d*x)*8i + (a*b^5*sin(2*c + 2*d*x)*
1i)/2))*2i)/d

________________________________________________________________________________________

sympy [A]  time = 7.48, size = 63, normalized size = 2.86 \[ \begin {cases} x \tan {\relax (c )} & \text {for}\: a = 0 \wedge d = 0 \\\frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text {for}\: a = 0 \\\frac {x \left (a \cos {\relax (c )} + b \tan {\relax (c )} \sec {\relax (c )}\right )}{a \sin {\relax (c )} + b \sec {\relax (c )}} & \text {for}\: d = 0 \\\frac {\log {\left (\sin {\left (c + d x \right )} + \frac {b \sec {\left (c + d x \right )}}{a} \right )}}{d} & \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)),x)

[Out]

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

________________________________________________________________________________________