Integrand size = 21, antiderivative size = 115 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=-\frac {9 a^2 x}{8}+\frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a^2 \sin (c+d x)}{d}-\frac {a^2 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d} \] Output:
-9/8*a^2*x+2*a^2*arctanh(sin(d*x+c))/d-2*a^2*sin(d*x+c)/d-1/8*a^2*cos(d*x+ c)*sin(d*x+c)/d+1/4*a^2*cos(d*x+c)^3*sin(d*x+c)/d-2/3*a^2*sin(d*x+c)^3/d+a ^2*tan(d*x+c)/d
Time = 0.13 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.82 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=-\frac {a^2 (1+\cos (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \left (48 c+48 d x+60 \arctan (\tan (c+d x))-192 \text {arctanh}(\sin (c+d x))+192 \sin (c+d x)+64 \sin ^3(c+d x)-3 \sin (4 (c+d x))-96 \tan (c+d x)\right )}{384 d} \] Input:
Integrate[(a + a*Sec[c + d*x])^2*Sin[c + d*x]^4,x]
Output:
-1/384*(a^2*(1 + Cos[c + d*x])^2*Sec[(c + d*x)/2]^4*(48*c + 48*d*x + 60*Ar cTan[Tan[c + d*x]] - 192*ArcTanh[Sin[c + d*x]] + 192*Sin[c + d*x] + 64*Sin [c + d*x]^3 - 3*Sin[4*(c + d*x)] - 96*Tan[c + d*x]))/d
Time = 0.54 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4360, 3042, 3351, 2009}
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 \sin ^4(c+d x) (a \sec (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos \left (c+d x-\frac {\pi }{2}\right )^4 \left (a-a \csc \left (c+d x-\frac {\pi }{2}\right )\right )^2dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int \sin ^2(c+d x) \tan ^2(c+d x) (a (-\cos (c+d x))-a)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \left (-\sin \left (c+d x+\frac {\pi }{2}\right )\right )-a\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 3351 |
\(\displaystyle \frac {\int \left (\cos ^4(c+d x) a^6+2 \cos ^3(c+d x) a^6-\cos ^2(c+d x) a^6+\sec ^2(c+d x) a^6-4 \cos (c+d x) a^6+2 \sec (c+d x) a^6-a^6\right )dx}{a^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {2 a^6 \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a^6 \sin ^3(c+d x)}{3 d}-\frac {2 a^6 \sin (c+d x)}{d}+\frac {a^6 \tan (c+d x)}{d}+\frac {a^6 \sin (c+d x) \cos ^3(c+d x)}{4 d}-\frac {a^6 \sin (c+d x) \cos (c+d x)}{8 d}-\frac {9 a^6 x}{8}}{a^4}\) |
Input:
Int[(a + a*Sec[c + d*x])^2*Sin[c + d*x]^4,x]
Output:
((-9*a^6*x)/8 + (2*a^6*ArcTanh[Sin[c + d*x]])/d - (2*a^6*Sin[c + d*x])/d - (a^6*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a^6*Cos[c + d*x]^3*Sin[c + d*x]) /(4*d) - (2*a^6*Sin[c + d*x]^3)/(3*d) + (a^6*Tan[c + d*x])/d)/a^4
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[1/a^p Int[Expan dTrig[(d*sin[e + f*x])^n*(a - b*sin[e + f*x])^(p/2)*(a + b*sin[e + f*x])^(m + p/2), x], x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && In tegersQ[m, n, p/2] && ((GtQ[m, 0] && GtQ[p, 0] && LtQ[-m - p, n, -1]) || (G tQ[m, 2] && LtQ[p, 0] && GtQ[m + p/2, 0]))
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
Time = 0.41 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.01
method | result | size |
parallelrisch | \(\frac {a^{2} \left (-72 d x \cos \left (d x +c \right )-128 \cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+128 \cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\sin \left (5 d x +5 c \right )+64 \sin \left (d x +c \right )-\frac {224 \sin \left (2 d x +2 c \right )}{3}+\sin \left (3 d x +3 c \right )+\frac {16 \sin \left (4 d x +4 c \right )}{3}\right )}{64 \cos \left (d x +c \right ) d}\) | \(116\) |
derivativedivides | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(134\) |
default | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(134\) |
parts | \(\frac {a^{2} \left (-\frac {\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )}{d}+\frac {2 a^{2} \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(139\) |
risch | \(-\frac {9 a^{2} x}{8}+\frac {5 i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{4 d}-\frac {5 i a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{4 d}+\frac {2 i a^{2}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {a^{2} \sin \left (4 d x +4 c \right )}{32 d}+\frac {a^{2} \sin \left (3 d x +3 c \right )}{6 d}\) | \(142\) |
norman | \(\frac {\frac {9 a^{2} x}{8}+\frac {27 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8}+\frac {9 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4}-\frac {9 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{4}-\frac {27 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8}-\frac {9 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{8}+\frac {7 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {22 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}-\frac {31 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 d}-\frac {58 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}-\frac {25 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(258\) |
Input:
int((a+a*sec(d*x+c))^2*sin(d*x+c)^4,x,method=_RETURNVERBOSE)
Output:
1/64*a^2*(-72*d*x*cos(d*x+c)-128*cos(d*x+c)*ln(tan(1/2*d*x+1/2*c)-1)+128*c os(d*x+c)*ln(tan(1/2*d*x+1/2*c)+1)+sin(5*d*x+5*c)+64*sin(d*x+c)-224/3*sin( 2*d*x+2*c)+sin(3*d*x+3*c)+16/3*sin(4*d*x+4*c))/cos(d*x+c)/d
Time = 0.09 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.16 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=-\frac {27 \, a^{2} d x \cos \left (d x + c\right ) - 24 \, a^{2} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) + 24 \, a^{2} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) - {\left (6 \, a^{2} \cos \left (d x + c\right )^{4} + 16 \, a^{2} \cos \left (d x + c\right )^{3} - 3 \, a^{2} \cos \left (d x + c\right )^{2} - 64 \, a^{2} \cos \left (d x + c\right ) + 24 \, a^{2}\right )} \sin \left (d x + c\right )}{24 \, d \cos \left (d x + c\right )} \] Input:
integrate((a+a*sec(d*x+c))^2*sin(d*x+c)^4,x, algorithm="fricas")
Output:
-1/24*(27*a^2*d*x*cos(d*x + c) - 24*a^2*cos(d*x + c)*log(sin(d*x + c) + 1) + 24*a^2*cos(d*x + c)*log(-sin(d*x + c) + 1) - (6*a^2*cos(d*x + c)^4 + 16 *a^2*cos(d*x + c)^3 - 3*a^2*cos(d*x + c)^2 - 64*a^2*cos(d*x + c) + 24*a^2) *sin(d*x + c))/(d*cos(d*x + c))
\[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=a^{2} \left (\int 2 \sin ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sin ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{4}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate((a+a*sec(d*x+c))**2*sin(d*x+c)**4,x)
Output:
a**2*(Integral(2*sin(c + d*x)**4*sec(c + d*x), x) + Integral(sin(c + d*x)* *4*sec(c + d*x)**2, x) + Integral(sin(c + d*x)**4, x))
Time = 0.11 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.10 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=-\frac {32 \, {\left (2 \, \sin \left (d x + c\right )^{3} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, \sin \left (d x + c\right )\right )} a^{2} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) - 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} + 48 \, {\left (3 \, d x + 3 \, c - \frac {\tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1} - 2 \, \tan \left (d x + c\right )\right )} a^{2}}{96 \, d} \] Input:
integrate((a+a*sec(d*x+c))^2*sin(d*x+c)^4,x, algorithm="maxima")
Output:
-1/96*(32*(2*sin(d*x + c)^3 - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1) + 6*sin(d*x + c))*a^2 - 3*(12*d*x + 12*c + sin(4*d*x + 4*c) - 8*sin( 2*d*x + 2*c))*a^2 + 48*(3*d*x + 3*c - tan(d*x + c)/(tan(d*x + c)^2 + 1) - 2*tan(d*x + c))*a^2)/d
Time = 0.17 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.40 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=-\frac {27 \, {\left (d x + c\right )} a^{2} - 48 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 48 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} + \frac {2 \, {\left (51 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 187 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 229 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 45 \, a^{2} \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} \] Input:
integrate((a+a*sec(d*x+c))^2*sin(d*x+c)^4,x, algorithm="giac")
Output:
-1/24*(27*(d*x + c)*a^2 - 48*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) + 48*a ^2*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 48*a^2*tan(1/2*d*x + 1/2*c)/(tan(1 /2*d*x + 1/2*c)^2 - 1) + 2*(51*a^2*tan(1/2*d*x + 1/2*c)^7 + 187*a^2*tan(1/ 2*d*x + 1/2*c)^5 + 229*a^2*tan(1/2*d*x + 1/2*c)^3 + 45*a^2*tan(1/2*d*x + 1 /2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 11.14 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.54 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=\frac {4\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {9\,a^2\,x}{8}+\frac {\frac {25\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+\frac {58\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3}+\frac {31\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{2}-\frac {22\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}-\frac {7\,a^2\,\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 )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\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(sin(c + d*x)^4*(a + a/cos(c + d*x))^2,x)
Output:
(4*a^2*atanh(tan(c/2 + (d*x)/2)))/d - (9*a^2*x)/8 + ((31*a^2*tan(c/2 + (d* x)/2)^5)/2 - (22*a^2*tan(c/2 + (d*x)/2)^3)/3 + (58*a^2*tan(c/2 + (d*x)/2)^ 7)/3 + (25*a^2*tan(c/2 + (d*x)/2)^9)/4 - (7*a^2*tan(c/2 + (d*x)/2))/4)/(d* (3*tan(c/2 + (d*x)/2)^2 + 2*tan(c/2 + (d*x)/2)^4 - 2*tan(c/2 + (d*x)/2)^6 - 3*tan(c/2 + (d*x)/2)^8 - tan(c/2 + (d*x)/2)^10 + 1))
Time = 0.18 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.37 \[ \int (a+a \sec (c+d x))^2 \sin ^4(c+d x) \, dx=\frac {a^{2} \left (-6 \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )^{3}-9 \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )-48 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+48 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}-48 \cos \left (d x +c \right ) \sin \left (d x +c \right )-36 \cos \left (d x +c \right ) c -27 \cos \left (d x +c \right ) d x -12 \sin \left (d x +c \right )^{3}+36 \sin \left (d x +c \right )\right )}{24 \cos \left (d x +c \right ) d} \] Input:
int((a+a*sec(d*x+c))^2*sin(d*x+c)^4,x)
Output:
(a**2*( - 6*cos(c + d*x)**2*sin(c + d*x)**3 - 9*cos(c + d*x)**2*sin(c + d* x) - 48*cos(c + d*x)*log(tan((c + d*x)/2) - 1) + 48*cos(c + d*x)*log(tan(( c + d*x)/2) + 1) - 16*cos(c + d*x)*sin(c + d*x)**3 - 48*cos(c + d*x)*sin(c + d*x) - 36*cos(c + d*x)*c - 27*cos(c + d*x)*d*x - 12*sin(c + d*x)**3 + 3 6*sin(c + d*x)))/(24*cos(c + d*x)*d)