3.36 \(\int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3086, 3475} \[ a x-\frac {b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3086

Int[cos[(c_.) + (d_.)*(x_)]^(m_)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Symb
ol] :> Int[(a + b*Tan[c + d*x])^n, x] /; FreeQ[{a, b, c, d}, x] && EqQ[m + n, 0] && IntegerQ[n] && NeQ[a^2 + b
^2, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 27, normalized size = 1.59 \[ \frac {2 \, {\left (d x + c\right )} a + b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(2*(d*x + c)*a + b*log(tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

maple [A]  time = 1.34, size = 24, normalized size = 1.41 \[ a x -\frac {b \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {c a}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a*cos(d*x+c)+b*sin(d*x+c)),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 30, normalized size = 1.76 \[ \frac {2 \, {\left (d x + c\right )} a - b \log \left (-\sin \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.57, size = 70, normalized size = 4.12 \[ \frac {b\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{d}+\frac {2\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {b\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((a*cos(c + d*x) + b*sin(c + d*x))*sec(c + d*x), x)

________________________________________________________________________________________