3.265 \(\int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx\)

Optimal. Leaf size=73 \[ \frac {\tan ^3(c+d x) (4 a+3 b \sec (c+d x))}{12 d}-\frac {\tan (c+d x) (8 a+3 b \sec (c+d x))}{8 d}+a x+\frac {3 b \tanh ^{-1}(\sin (c+d x))}{8 d} \]

[Out]

a*x+3/8*b*arctanh(sin(d*x+c))/d-1/8*(8*a+3*b*sec(d*x+c))*tan(d*x+c)/d+1/12*(4*a+3*b*sec(d*x+c))*tan(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3881, 3770} \[ \frac {\tan ^3(c+d x) (4 a+3 b \sec (c+d x))}{12 d}-\frac {\tan (c+d x) (8 a+3 b \sec (c+d x))}{8 d}+a x+\frac {3 b \tanh ^{-1}(\sin (c+d x))}{8 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

a*x + (3*b*ArcTanh[Sin[c + d*x]])/(8*d) - ((8*a + 3*b*Sec[c + d*x])*Tan[c + d*x])/(8*d) + ((4*a + 3*b*Sec[c +
d*x])*Tan[c + d*x]^3)/(12*d)

Rule 3770

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

Rule 3881

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[(e*(e*Cot[
c + d*x])^(m - 1)*(a*m + b*(m - 1)*Csc[c + d*x]))/(d*m*(m - 1)), x] - Dist[e^2/m, Int[(e*Cot[c + d*x])^(m - 2)
*(a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.60, size = 79, normalized size = 1.08 \[ \frac {-\left (\tan (c+d x) \sec ^3(c+d x) (32 a \cos (c+d x)+16 a \cos (3 (c+d x))+15 b \cos (2 (c+d x))+3 b)\right )+48 a \tan ^{-1}(\tan (c+d x))+18 b \tanh ^{-1}(\sin (c+d x))}{48 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(48*a*ArcTan[Tan[c + d*x]] + 18*b*ArcTanh[Sin[c + d*x]] - (3*b + 32*a*Cos[c + d*x] + 15*b*Cos[2*(c + d*x)] + 1
6*a*Cos[3*(c + d*x)])*Sec[c + d*x]^3*Tan[c + d*x])/(48*d)

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 112, normalized size = 1.53 \[ \frac {48 \, a d x \cos \left (d x + c\right )^{4} + 9 \, b \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, b \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (32 \, a \cos \left (d x + c\right )^{3} + 15 \, b \cos \left (d x + c\right )^{2} - 8 \, a \cos \left (d x + c\right ) - 6 \, b\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/48*(48*a*d*x*cos(d*x + c)^4 + 9*b*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 9*b*cos(d*x + c)^4*log(-sin(d*x + c
) + 1) - 2*(32*a*cos(d*x + c)^3 + 15*b*cos(d*x + c)^2 - 8*a*cos(d*x + c) - 6*b)*sin(d*x + c))/(d*cos(d*x + c)^
4)

________________________________________________________________________________________

giac [B]  time = 1.58, size = 172, normalized size = 2.36 \[ \frac {24 \, {\left (d x + c\right )} a + 9 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 9 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 104 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 33 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 104 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 33 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/24*(24*(d*x + c)*a + 9*b*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 9*b*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(24
*a*tan(1/2*d*x + 1/2*c)^7 - 9*b*tan(1/2*d*x + 1/2*c)^7 - 104*a*tan(1/2*d*x + 1/2*c)^5 + 33*b*tan(1/2*d*x + 1/2
*c)^5 + 104*a*tan(1/2*d*x + 1/2*c)^3 + 33*b*tan(1/2*d*x + 1/2*c)^3 - 24*a*tan(1/2*d*x + 1/2*c) - 9*b*tan(1/2*d
*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d

________________________________________________________________________________________

maple [A]  time = 0.43, size = 127, normalized size = 1.74 \[ \frac {a \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {a \tan \left (d x +c \right )}{d}+a x +\frac {c a}{d}+\frac {b \left (\sin ^{5}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {b \left (\sin ^{5}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {b \left (\sin ^{3}\left (d x +c \right )\right )}{8 d}-\frac {3 b \sin \left (d x +c \right )}{8 d}+\frac {3 b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*a*tan(d*x+c)^3/d-a*tan(d*x+c)/d+a*x+1/d*c*a+1/4/d*b*sin(d*x+c)^5/cos(d*x+c)^4-1/8/d*b*sin(d*x+c)^5/cos(d*x
+c)^2-1/8*b*sin(d*x+c)^3/d-3/8*b*sin(d*x+c)/d+3/8/d*b*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.62, size = 102, normalized size = 1.40 \[ \frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a + 3 \, b {\left (\frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{48 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/48*(16*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))*a + 3*b*(2*(5*sin(d*x + c)^3 - 3*sin(d*x + c))/(sin(d
*x + c)^4 - 2*sin(d*x + c)^2 + 1) + 3*log(sin(d*x + c) + 1) - 3*log(sin(d*x + c) - 1)))/d

________________________________________________________________________________________

mupad [B]  time = 2.23, size = 267, normalized size = 3.66 \[ \frac {2\,a\,\mathrm {atan}\left (\frac {64\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^3+9\,a\,b^2}+\frac {9\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^3+9\,a\,b^2}\right )}{d}+\frac {3\,b\,\mathrm {atanh}\left (\frac {27\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,\left (24\,a^2\,b+\frac {27\,b^3}{8}\right )}+\frac {24\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{24\,a^2\,b+\frac {27\,b^3}{8}}\right )}{4\,d}-\frac {\left (\frac {3\,b}{4}-2\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {26\,a}{3}-\frac {11\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {26\,a}{3}-\frac {11\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a+\frac {3\,b}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*a*atan((64*a^3*tan(c/2 + (d*x)/2))/(9*a*b^2 + 64*a^3) + (9*a*b^2*tan(c/2 + (d*x)/2))/(9*a*b^2 + 64*a^3)))/d
 + (3*b*atanh((27*b^3*tan(c/2 + (d*x)/2))/(8*(24*a^2*b + (27*b^3)/8)) + (24*a^2*b*tan(c/2 + (d*x)/2))/(24*a^2*
b + (27*b^3)/8)))/(4*d) - (tan(c/2 + (d*x)/2)*(2*a + (3*b)/4) - tan(c/2 + (d*x)/2)^7*(2*a - (3*b)/4) - tan(c/2
 + (d*x)/2)^3*((26*a)/3 + (11*b)/4) + tan(c/2 + (d*x)/2)^5*((26*a)/3 - (11*b)/4))/(d*(6*tan(c/2 + (d*x)/2)^4 -
 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((a + b*sec(c + d*x))*tan(c + d*x)**4, x)

________________________________________________________________________________________