Integrand size = 12, antiderivative size = 91 \[ \int (a+a \sec (c+d x))^4 \, dx=a^4 x+\frac {6 a^4 \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^4 \tan (c+d x)}{d}+\frac {\left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{3 d}+\frac {4 \left (a^4+a^4 \sec (c+d x)\right ) \tan (c+d x)}{3 d} \] Output:
a^4*x+6*a^4*arctanh(sin(d*x+c))/d+5*a^4*tan(d*x+c)/d+1/3*(a^2+a^2*sec(d*x+ c))^2*tan(d*x+c)/d+4/3*(a^4+a^4*sec(d*x+c))*tan(d*x+c)/d
Time = 1.32 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.97 \[ \int (a+a \sec (c+d x))^4 \, dx=a^4 x+\frac {4 a^4 \coth ^{-1}(\sin (c+d x))}{d}+\frac {2 a^4 \text {arctanh}(\sin (c+d x))}{d}+\frac {7 a^4 \tan (c+d x)}{d}+\frac {2 a^4 \sec (c+d x) \tan (c+d x)}{d}+\frac {a^4 \tan ^3(c+d x)}{3 d} \] Input:
Integrate[(a + a*Sec[c + d*x])^4,x]
Output:
a^4*x + (4*a^4*ArcCoth[Sin[c + d*x]])/d + (2*a^4*ArcTanh[Sin[c + d*x]])/d + (7*a^4*Tan[c + d*x])/d + (2*a^4*Sec[c + d*x]*Tan[c + d*x])/d + (a^4*Tan[ c + d*x]^3)/(3*d)
Time = 0.59 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.08, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.917, Rules used = {3042, 4262, 3042, 4405, 27, 3042, 4402, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sec (c+d x)+a)^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^4dx\) |
\(\Big \downarrow \) 4262 |
\(\displaystyle \frac {1}{3} a \int (\sec (c+d x) a+a)^2 (8 \sec (c+d x) a+3 a)dx+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} a \int \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left (8 \csc \left (c+d x+\frac {\pi }{2}\right ) a+3 a\right )dx+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 4405 |
\(\displaystyle \frac {1}{3} a \left (\frac {1}{2} \int 6 (\sec (c+d x) a+a) \left (5 \sec (c+d x) a^2+a^2\right )dx+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} a \left (3 \int (\sec (c+d x) a+a) \left (5 \sec (c+d x) a^2+a^2\right )dx+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} a \left (3 \int \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (5 \csc \left (c+d x+\frac {\pi }{2}\right ) a^2+a^2\right )dx+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 4402 |
\(\displaystyle \frac {1}{3} a \left (3 \left (5 a^3 \int \sec ^2(c+d x)dx+6 a^3 \int \sec (c+d x)dx+a^3 x\right )+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} a \left (3 \left (6 a^3 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+5 a^3 \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+a^3 x\right )+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{3} a \left (3 \left (-\frac {5 a^3 \int 1d(-\tan (c+d x))}{d}+6 a^3 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+a^3 x\right )+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{3} a \left (3 \left (6 a^3 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {5 a^3 \tan (c+d x)}{d}+a^3 x\right )+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{3} a \left (3 \left (\frac {6 a^3 \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^3 \tan (c+d x)}{d}+a^3 x\right )+\frac {4 \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {\tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}\) |
Input:
Int[(a + a*Sec[c + d*x])^4,x]
Output:
((a^2 + a^2*Sec[c + d*x])^2*Tan[c + d*x])/(3*d) + (a*((4*(a^3 + a^3*Sec[c + d*x])*Tan[c + d*x])/d + 3*(a^3*x + (6*a^3*ArcTanh[Sin[c + d*x]])/d + (5* a^3*Tan[c + d*x])/d)))/3
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-b^2)*C ot[c + d*x]*((a + b*Csc[c + d*x])^(n - 2)/(d*(n - 1))), x] + Simp[a/(n - 1) Int[(a + b*Csc[c + d*x])^(n - 2)*(a*(n - 1) + b*(3*n - 4)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && GtQ[n, 1] && Inte gerQ[2*n]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[a*c*x, x] + (Simp[b*d Int[Csc[e + f*x]^2, x], x ] + Simp[(b*c + a*d) Int[Csc[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f }, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d _.) + (c_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m - 1)/(f*m)), x] + Simp[1/m Int[(a + b*Csc[e + f*x])^(m - 1)*Simp[a*c*m + (b*c*m + a*d*(2*m - 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && GtQ[m, 1] && EqQ[a^2 - b^2, 0] && IntegerQ[2 *m]
Time = 1.14 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.98
method | result | size |
parts | \(a^{4} x -\frac {a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {6 a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {6 a^{4} \tan \left (d x +c \right )}{d}+\frac {2 a^{4} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{d}\) | \(89\) |
derivativedivides | \(\frac {a^{4} \left (d x +c \right )+4 a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 a^{4} \tan \left (d x +c \right )+4 a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(104\) |
default | \(\frac {a^{4} \left (d x +c \right )+4 a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 a^{4} \tan \left (d x +c \right )+4 a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(104\) |
risch | \(a^{4} x -\frac {4 i a^{4} \left (3 \,{\mathrm e}^{5 i \left (d x +c \right )}-9 \,{\mathrm e}^{4 i \left (d x +c \right )}-21 \,{\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}-10\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {6 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {6 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) | \(117\) |
parallelrisch | \(-\frac {18 \left (\left (\cos \left (d x +c \right )+\frac {\cos \left (3 d x +3 c \right )}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (-\cos \left (d x +c \right )-\frac {\cos \left (3 d x +3 c \right )}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {d x \cos \left (d x +c \right )}{6}-\frac {d x \cos \left (3 d x +3 c \right )}{18}-\frac {4 \sin \left (d x +c \right )}{9}-\frac {2 \sin \left (2 d x +2 c \right )}{9}-\frac {10 \sin \left (3 d x +3 c \right )}{27}\right ) a^{4}}{d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(147\) |
norman | \(\frac {a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-a^{4} x -\frac {18 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {76 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}-\frac {10 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+3 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-3 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}-\frac {6 a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {6 a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(170\) |
Input:
int((a+a*sec(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
a^4*x-a^4/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+6*a^4/d*ln(sec(d*x+c)+tan(d *x+c))+6*a^4*tan(d*x+c)/d+2*a^4*sec(d*x+c)*tan(d*x+c)/d
Time = 0.09 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.21 \[ \int (a+a \sec (c+d x))^4 \, dx=\frac {3 \, a^{4} d x \cos \left (d x + c\right )^{3} + 9 \, a^{4} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, a^{4} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (20 \, a^{4} \cos \left (d x + c\right )^{2} + 6 \, a^{4} \cos \left (d x + c\right ) + a^{4}\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{3}} \] Input:
integrate((a+a*sec(d*x+c))^4,x, algorithm="fricas")
Output:
1/3*(3*a^4*d*x*cos(d*x + c)^3 + 9*a^4*cos(d*x + c)^3*log(sin(d*x + c) + 1) - 9*a^4*cos(d*x + c)^3*log(-sin(d*x + c) + 1) + (20*a^4*cos(d*x + c)^2 + 6*a^4*cos(d*x + c) + a^4)*sin(d*x + c))/(d*cos(d*x + c)^3)
\[ \int (a+a \sec (c+d x))^4 \, dx=a^{4} \left (\int 1\, dx + \int 4 \sec {\left (c + d x \right )}\, dx + \int 6 \sec ^{2}{\left (c + d x \right )}\, dx + \int 4 \sec ^{3}{\left (c + d x \right )}\, dx + \int \sec ^{4}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate((a+a*sec(d*x+c))**4,x)
Output:
a**4*(Integral(1, x) + Integral(4*sec(c + d*x), x) + Integral(6*sec(c + d* x)**2, x) + Integral(4*sec(c + d*x)**3, x) + Integral(sec(c + d*x)**4, x))
Time = 0.03 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.27 \[ \int (a+a \sec (c+d x))^4 \, dx=a^{4} x + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{4}}{3 \, d} - \frac {a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{d} + \frac {4 \, a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right )}{d} + \frac {6 \, a^{4} \tan \left (d x + c\right )}{d} \] Input:
integrate((a+a*sec(d*x+c))^4,x, algorithm="maxima")
Output:
a^4*x + 1/3*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^4/d - a^4*(2*sin(d*x + c)/ (sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1))/d + 4*a^4*log(sec(d*x + c) + tan(d*x + c))/d + 6*a^4*tan(d*x + c)/d
Time = 0.16 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.27 \[ \int (a+a \sec (c+d x))^4 \, dx=\frac {3 \, {\left (d x + c\right )} a^{4} + 18 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 18 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 38 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 27 \, a^{4} \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 )}^{3}}}{3 \, d} \] Input:
integrate((a+a*sec(d*x+c))^4,x, algorithm="giac")
Output:
1/3*(3*(d*x + c)*a^4 + 18*a^4*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 18*a^4* log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(15*a^4*tan(1/2*d*x + 1/2*c)^5 - 38 *a^4*tan(1/2*d*x + 1/2*c)^3 + 27*a^4*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^3)/d
Time = 10.24 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.29 \[ \int (a+a \sec (c+d x))^4 \, dx=a^4\,x+\frac {12\,a^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {10\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {76\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+18\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \] Input:
int((a + a/cos(c + d*x))^4,x)
Output:
a^4*x + (12*a^4*atanh(tan(c/2 + (d*x)/2)))/d - (10*a^4*tan(c/2 + (d*x)/2)^ 5 - (76*a^4*tan(c/2 + (d*x)/2)^3)/3 + 18*a^4*tan(c/2 + (d*x)/2))/(d*(3*tan (c/2 + (d*x)/2)^2 - 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 - 1))
Time = 0.17 (sec) , antiderivative size = 185, normalized size of antiderivative = 2.03 \[ \int (a+a \sec (c+d x))^4 \, dx=\frac {a^{4} \left (-18 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2}+18 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+18 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2}-18 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d x -6 \cos \left (d x +c \right ) \sin \left (d x +c \right )-3 \cos \left (d x +c \right ) d x +20 \sin \left (d x +c \right )^{3}-21 \sin \left (d x +c \right )\right )}{3 \cos \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int((a+a*sec(d*x+c))^4,x)
Output:
(a**4*( - 18*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2 + 18*c os(c + d*x)*log(tan((c + d*x)/2) - 1) + 18*cos(c + d*x)*log(tan((c + d*x)/ 2) + 1)*sin(c + d*x)**2 - 18*cos(c + d*x)*log(tan((c + d*x)/2) + 1) + 3*co s(c + d*x)*sin(c + d*x)**2*d*x - 6*cos(c + d*x)*sin(c + d*x) - 3*cos(c + d *x)*d*x + 20*sin(c + d*x)**3 - 21*sin(c + d*x)))/(3*cos(c + d*x)*d*(sin(c + d*x)**2 - 1))