Integrand size = 29, antiderivative size = 86 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {3 a^3 \text {arctanh}(\cos (c+d x))}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {2 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))^2}+\frac {11 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))} \] Output:
-3*a^3*arctanh(cos(d*x+c))/d-a^3*cot(d*x+c)/d+2/3*a^3*cos(d*x+c)/d/(1-sin( d*x+c))^2+11/3*a^3*cos(d*x+c)/d/(1-sin(d*x+c))
Time = 1.73 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.57 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3 \left (-3 \cot \left (\frac {1}{2} (c+d x)\right )-18 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+18 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {4}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {4 \sin \left (\frac {1}{2} (c+d x)\right ) (-13+11 \sin (c+d x))}{\left (-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+3 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{6 d} \] Input:
Integrate[Csc[c + d*x]^2*Sec[c + d*x]^4*(a + a*Sin[c + d*x])^3,x]
Output:
(a^3*(-3*Cot[(c + d*x)/2] - 18*Log[Cos[(c + d*x)/2]] + 18*Log[Sin[(c + d*x )/2]] + 4/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2 + (4*Sin[(c + d*x)/2]*(- 13 + 11*Sin[c + d*x]))/(-Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3 + 3*Tan[(c + d*x)/2]))/(6*d)
Time = 0.39 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.05, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {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 \csc ^2(c+d x) \sec ^4(c+d x) (a \sin (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (c+d x)+a)^3}{\sin (c+d x)^2 \cos (c+d x)^4}dx\) |
\(\Big \downarrow \) 3351 |
\(\displaystyle a^4 \int \left (\frac {\csc ^2(c+d x)}{a}+\frac {3 \csc (c+d x)}{a}+\frac {3}{a (1-\sin (c+d x))}+\frac {2}{a (1-\sin (c+d x))^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^4 \left (-\frac {3 \text {arctanh}(\cos (c+d x))}{a d}-\frac {\cot (c+d x)}{a d}+\frac {11 \cos (c+d x)}{3 a d (1-\sin (c+d x))}+\frac {2 \cos (c+d x)}{3 a d (1-\sin (c+d x))^2}\right )\) |
Input:
Int[Csc[c + d*x]^2*Sec[c + d*x]^4*(a + a*Sin[c + d*x])^3,x]
Output:
a^4*((-3*ArcTanh[Cos[c + d*x]])/(a*d) - Cot[c + d*x]/(a*d) + (2*Cos[c + d* x])/(3*a*d*(1 - Sin[c + d*x])^2) + (11*Cos[c + d*x])/(3*a*d*(1 - Sin[c + d *x])))
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]))
Time = 1.04 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.08
method | result | size |
parallelrisch | \(\frac {\left (6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-27 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\cot \left (\frac {d x}{2}+\frac {c}{2}\right )+43 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {70}{3}\right ) a^{3}}{2 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}\) | \(93\) |
derivativedivides | \(\frac {\frac {a^{3}}{3 \cos \left (d x +c \right )^{3}}-3 a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 a^{3} \left (\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a^{3} \left (\frac {1}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )}{d}\) | \(131\) |
default | \(\frac {\frac {a^{3}}{3 \cos \left (d x +c \right )^{3}}-3 a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 a^{3} \left (\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a^{3} \left (\frac {1}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )}{d}\) | \(131\) |
risch | \(\frac {-\frac {58 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{3}-18 i a^{3} {\mathrm e}^{3 i \left (d x +c \right )}+\frac {28 a^{3}}{3}+22 i a^{3} {\mathrm e}^{i \left (d x +c \right )}+6 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} d}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}\) | \(138\) |
norman | \(\frac {\frac {a^{3}}{2 d}-\frac {21 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2 d}-\frac {133 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{6 d}-\frac {21 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{2 d}-\frac {14 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {44 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}-\frac {21 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2 d}-\frac {133 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{6 d}-\frac {14 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {21 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{2 d}+\frac {a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}}{2 d}-\frac {4 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {30 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {26 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}+\frac {3 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(316\) |
Input:
int(csc(d*x+c)^2*sec(d*x+c)^4*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/2*(6*(tan(1/2*d*x+1/2*c)-1)^3*ln(tan(1/2*d*x+1/2*c))+tan(1/2*d*x+1/2*c)^ 4-27*tan(1/2*d*x+1/2*c)^2+cot(1/2*d*x+1/2*c)+43*tan(1/2*d*x+1/2*c)-70/3)*a ^3/d/(tan(1/2*d*x+1/2*c)-1)^3
Leaf count of result is larger than twice the leaf count of optimal. 334 vs. \(2 (78) = 156\).
Time = 0.09 (sec) , antiderivative size = 334, normalized size of antiderivative = 3.88 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {28 \, a^{3} \cos \left (d x + c\right )^{3} - 10 \, a^{3} \cos \left (d x + c\right )^{2} - 34 \, a^{3} \cos \left (d x + c\right ) + 4 \, a^{3} - 9 \, {\left (a^{3} \cos \left (d x + c\right )^{3} + 2 \, a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - 2 \, a^{3} - {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - 2 \, a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 9 \, {\left (a^{3} \cos \left (d x + c\right )^{3} + 2 \, a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - 2 \, a^{3} - {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - 2 \, a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (14 \, a^{3} \cos \left (d x + c\right )^{2} + 19 \, a^{3} \cos \left (d x + c\right ) + 2 \, a^{3}\right )} \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{3} + 2 \, d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) - {\left (d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) - 2 \, d\right )} \sin \left (d x + c\right ) - 2 \, d\right )}} \] Input:
integrate(csc(d*x+c)^2*sec(d*x+c)^4*(a+a*sin(d*x+c))^3,x, algorithm="frica s")
Output:
1/6*(28*a^3*cos(d*x + c)^3 - 10*a^3*cos(d*x + c)^2 - 34*a^3*cos(d*x + c) + 4*a^3 - 9*(a^3*cos(d*x + c)^3 + 2*a^3*cos(d*x + c)^2 - a^3*cos(d*x + c) - 2*a^3 - (a^3*cos(d*x + c)^2 - a^3*cos(d*x + c) - 2*a^3)*sin(d*x + c))*log (1/2*cos(d*x + c) + 1/2) + 9*(a^3*cos(d*x + c)^3 + 2*a^3*cos(d*x + c)^2 - a^3*cos(d*x + c) - 2*a^3 - (a^3*cos(d*x + c)^2 - a^3*cos(d*x + c) - 2*a^3) *sin(d*x + c))*log(-1/2*cos(d*x + c) + 1/2) + 2*(14*a^3*cos(d*x + c)^2 + 1 9*a^3*cos(d*x + c) + 2*a^3)*sin(d*x + c))/(d*cos(d*x + c)^3 + 2*d*cos(d*x + c)^2 - d*cos(d*x + c) - (d*cos(d*x + c)^2 - d*cos(d*x + c) - 2*d)*sin(d* x + c) - 2*d)
Timed out. \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\text {Timed out} \] Input:
integrate(csc(d*x+c)**2*sec(d*x+c)**4*(a+a*sin(d*x+c))**3,x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.43 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {2 \, {\left (\tan \left (d x + c\right )^{3} - \frac {3}{\tan \left (d x + c\right )} + 6 \, \tan \left (d x + c\right )\right )} a^{3} + 6 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{3} + 3 \, a^{3} {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{\cos \left (d x + c\right )^{3}} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {2 \, a^{3}}{\cos \left (d x + c\right )^{3}}}{6 \, d} \] Input:
integrate(csc(d*x+c)^2*sec(d*x+c)^4*(a+a*sin(d*x+c))^3,x, algorithm="maxim a")
Output:
1/6*(2*(tan(d*x + c)^3 - 3/tan(d*x + c) + 6*tan(d*x + c))*a^3 + 6*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^3 + 3*a^3*(2*(3*cos(d*x + c)^2 + 1)/cos(d*x + c)^3 - 3*log(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1)) + 2*a^3/cos(d*x + c)^3)/d
Time = 0.19 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.37 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {18 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {3 \, {\left (6 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {4 \, {\left (15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 24 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 13 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \] Input:
integrate(csc(d*x+c)^2*sec(d*x+c)^4*(a+a*sin(d*x+c))^3,x, algorithm="giac" )
Output:
1/6*(18*a^3*log(abs(tan(1/2*d*x + 1/2*c))) + 3*a^3*tan(1/2*d*x + 1/2*c) - 3*(6*a^3*tan(1/2*d*x + 1/2*c) + a^3)/tan(1/2*d*x + 1/2*c) - 4*(15*a^3*tan( 1/2*d*x + 1/2*c)^2 - 24*a^3*tan(1/2*d*x + 1/2*c) + 13*a^3)/(tan(1/2*d*x + 1/2*c) - 1)^3)/d
Time = 31.46 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.67 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {3\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {-21\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+35\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {61\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+a^3}{d\,\left (-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \] Input:
int((a + a*sin(c + d*x))^3/(cos(c + d*x)^4*sin(c + d*x)^2),x)
Output:
(3*a^3*log(tan(c/2 + (d*x)/2)))/d - (35*a^3*tan(c/2 + (d*x)/2)^2 - 21*a^3* tan(c/2 + (d*x)/2)^3 + a^3 - (61*a^3*tan(c/2 + (d*x)/2))/3)/(d*(2*tan(c/2 + (d*x)/2) - 6*tan(c/2 + (d*x)/2)^2 + 6*tan(c/2 + (d*x)/2)^3 - 2*tan(c/2 + (d*x)/2)^4)) + (a^3*tan(c/2 + (d*x)/2))/(2*d)
Time = 0.18 (sec) , antiderivative size = 200, normalized size of antiderivative = 2.33 \[ \int \csc ^2(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-54 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+54 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-27 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+48 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-43 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+3\right )}{6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(csc(d*x+c)^2*sec(d*x+c)^4*(a+a*sin(d*x+c))^3,x)
Output:
(a**3*(18*log(tan((c + d*x)/2))*tan((c + d*x)/2)**4 - 54*log(tan((c + d*x) /2))*tan((c + d*x)/2)**3 + 54*log(tan((c + d*x)/2))*tan((c + d*x)/2)**2 - 18*log(tan((c + d*x)/2))*tan((c + d*x)/2) + 3*tan((c + d*x)/2)**5 - 27*tan ((c + d*x)/2)**4 + 48*tan((c + d*x)/2)**2 - 43*tan((c + d*x)/2) + 3))/(6*t an((c + d*x)/2)*d*(tan((c + d*x)/2)**3 - 3*tan((c + d*x)/2)**2 + 3*tan((c + d*x)/2) - 1))