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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, 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 {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\tan ^3(c+d x) (3 a \sec (c+d x)+4 a)}{12 d}-\frac {\tan (c+d x) (3 a \sec (c+d x)+8 a)}{8 d}+a x \]

Antiderivative was successfully verified.

[In]

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

[Out]

a*x + (3*a*ArcTanh[Sin[c + d*x]])/(8*d) - ((8*a + 3*a*Sec[c + d*x])*Tan[c + d*x])/(8*d) + ((4*a + 3*a*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+a \sec (c+d x)) \tan ^4(c+d x) \, dx &=\frac {(4 a+3 a \sec (c+d x)) \tan ^3(c+d x)}{12 d}-\frac {1}{4} \int (4 a+3 a \sec (c+d x)) \tan ^2(c+d x) \, dx\\ &=-\frac {(8 a+3 a \sec (c+d x)) \tan (c+d x)}{8 d}+\frac {(4 a+3 a \sec (c+d x)) \tan ^3(c+d x)}{12 d}+\frac {1}{8} \int (8 a+3 a \sec (c+d x)) \, dx\\ &=a x-\frac {(8 a+3 a \sec (c+d x)) \tan (c+d x)}{8 d}+\frac {(4 a+3 a \sec (c+d x)) \tan ^3(c+d x)}{12 d}+\frac {1}{8} (3 a) \int \sec (c+d x) \, dx\\ &=a x+\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {(8 a+3 a \sec (c+d x)) \tan (c+d x)}{8 d}+\frac {(4 a+3 a \sec (c+d x)) \tan ^3(c+d x)}{12 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.44, size = 75, normalized size = 1.03 \[ \frac {a \left (24 \tan ^{-1}(\tan (c+d x))+9 \tanh ^{-1}(\sin (c+d x))-\frac {1}{2} (32 \cos (c+d x)+15 \cos (2 (c+d x))+16 \cos (3 (c+d x))+3) \tan (c+d x) \sec ^3(c+d x)\right )}{24 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a*(24*ArcTan[Tan[c + d*x]] + 9*ArcTanh[Sin[c + d*x]] - ((3 + 32*Cos[c + d*x] + 15*Cos[2*(c + d*x)] + 16*Cos[3
*(c + d*x)])*Sec[c + d*x]^3*Tan[c + d*x])/2))/(24*d)

________________________________________________________________________________________

fricas [A]  time = 0.80, size = 112, normalized size = 1.53 \[ \frac {48 \, a d x \cos \left (d x + c\right )^{4} + 9 \, a \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, a \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 \, a \cos \left (d x + c\right )^{2} - 8 \, a \cos \left (d x + c\right ) - 6 \, a\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+a*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*a*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 9*a*cos(d*x + c)^4*log(-sin(d*x + c
) + 1) - 2*(32*a*cos(d*x + c)^3 + 15*a*cos(d*x + c)^2 - 8*a*cos(d*x + c) - 6*a)*sin(d*x + c))/(d*cos(d*x + c)^
4)

________________________________________________________________________________________

giac [A]  time = 1.54, size = 118, normalized size = 1.62 \[ \frac {24 \, {\left (d x + c\right )} a + 9 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 9 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 71 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 137 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 33 \, a \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+a*sec(d*x+c))*tan(d*x+c)^4,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.48, 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 {a \left (\sin ^{5}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {a \left (\sin ^{5}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {a \left (\sin ^{3}\left (d x +c \right )\right )}{8 d}-\frac {3 a \sin \left (d x +c \right )}{8 d}+\frac {3 a \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+a*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*a*sin(d*x+c)^5/cos(d*x+c)^4-1/8/d*a*sin(d*x+c)^5/cos(d*x
+c)^2-1/8*a*sin(d*x+c)^3/d-3/8*a*sin(d*x+c)/d+3/8/d*a*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.89, 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 \, a {\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+a*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*a*(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 = 1.85, size = 134, normalized size = 1.84 \[ a\,x-\frac {-\frac {5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {71\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}-\frac {137\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {11\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{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 )}+\frac {3\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a*x - ((11*a*tan(c/2 + (d*x)/2))/4 - (137*a*tan(c/2 + (d*x)/2)^3)/12 + (71*a*tan(c/2 + (d*x)/2)^5)/12 - (5*a*t
an(c/2 + (d*x)/2)^7)/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)) + (3*a*atanh(tan(c/2 + (d*x)/2)))/(4*d)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________