Integrand size = 29, antiderivative size = 56 \[ \int \csc ^2(c+d x) \sec ^2(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 {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))} \] Output:
-3*a^3*arctanh(cos(d*x+c))/d-a^3*cot(d*x+c)/d+4*a^3*cos(d*x+c)/d/(1-sin(d* x+c))
Time = 1.11 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.71 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3 \left (-\cot \left (\frac {1}{2} (c+d x)\right )-6 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+6 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {16 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+\tan \left (\frac {1}{2} (c+d x)\right )\right )}{2 d} \] Input:
Integrate[Csc[c + d*x]^2*Sec[c + d*x]^2*(a + a*Sin[c + d*x])^3,x]
Output:
(a^3*(-Cot[(c + d*x)/2] - 6*Log[Cos[(c + d*x)/2]] + 6*Log[Sin[(c + d*x)/2] ] + (16*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2]) + Tan[(c + d*x)/2]))/(2*d)
Time = 0.34 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.96, 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 ^2(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)^2}dx\) |
\(\Big \downarrow \) 3351 |
\(\displaystyle a^2 \int \left (a \csc ^2(c+d x)+3 a \csc (c+d x)+\frac {4 a}{1-\sin (c+d x)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 \left (-\frac {3 a \text {arctanh}(\cos (c+d x))}{d}-\frac {a \cot (c+d x)}{d}+\frac {4 a \cos (c+d x)}{d (1-\sin (c+d x))}\right )\) |
Input:
Int[Csc[c + d*x]^2*Sec[c + d*x]^2*(a + a*Sin[c + d*x])^3,x]
Output:
a^2*((-3*a*ArcTanh[Cos[c + d*x]])/d - (a*Cot[c + d*x])/d + (4*a*Cos[c + d* x])/(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 = 0.93 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.21
method | result | size |
parallelrisch | \(\frac {\left (\left (6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-6\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\cot \left (\frac {d x}{2}+\frac {c}{2}\right )-18\right ) a^{3}}{2 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(68\) |
derivativedivides | \(\frac {\frac {a^{3}}{\cos \left (d x +c \right )}+3 a^{3} \tan \left (d x +c \right )+3 a^{3} \left (\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}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )}{d}\) | \(89\) |
default | \(\frac {\frac {a^{3}}{\cos \left (d x +c \right )}+3 a^{3} \tan \left (d x +c \right )+3 a^{3} \left (\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}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )}{d}\) | \(89\) |
risch | \(\frac {-10 a^{3}-2 i a^{3} {\mathrm e}^{i \left (d x +c \right )}+8 a^{3} {\mathrm e}^{2 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 ) 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}\) | \(109\) |
norman | \(\frac {\frac {a^{3}}{2 d}-\frac {15 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2 d}-\frac {25 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {25 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}-\frac {24 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {15 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2 d}+\frac {a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{2 d}-\frac {8 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {8 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {24 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 ) \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}\) | \(240\) |
Input:
int(csc(d*x+c)^2*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/2*((6*tan(1/2*d*x+1/2*c)-6)*ln(tan(1/2*d*x+1/2*c))+tan(1/2*d*x+1/2*c)^2+ cot(1/2*d*x+1/2*c)-18)*a^3/d/(tan(1/2*d*x+1/2*c)-1)
Leaf count of result is larger than twice the leaf count of optimal. 194 vs. \(2 (54) = 108\).
Time = 0.08 (sec) , antiderivative size = 194, normalized size of antiderivative = 3.46 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {10 \, a^{3} \cos \left (d x + c\right )^{2} + 2 \, a^{3} \cos \left (d x + c\right ) - 8 \, a^{3} + 3 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3} + {\left (a^{3} \cos \left (d x + c\right ) + 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 ) - 3 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3} + {\left (a^{3} \cos \left (d x + c\right ) + 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 (5 \, a^{3} \cos \left (d x + c\right ) + 4 \, a^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right )^{2} + {\left (d \cos \left (d x + c\right ) + d\right )} \sin \left (d x + c\right ) - d\right )}} \] Input:
integrate(csc(d*x+c)^2*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x, algorithm="frica s")
Output:
-1/2*(10*a^3*cos(d*x + c)^2 + 2*a^3*cos(d*x + c) - 8*a^3 + 3*(a^3*cos(d*x + c)^2 - a^3 + (a^3*cos(d*x + c) + a^3)*sin(d*x + c))*log(1/2*cos(d*x + c) + 1/2) - 3*(a^3*cos(d*x + c)^2 - a^3 + (a^3*cos(d*x + c) + a^3)*sin(d*x + c))*log(-1/2*cos(d*x + c) + 1/2) - 2*(5*a^3*cos(d*x + c) + 4*a^3)*sin(d*x + c))/(d*cos(d*x + c)^2 + (d*cos(d*x + c) + d)*sin(d*x + c) - d)
Timed out. \[ \int \csc ^2(c+d x) \sec ^2(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)**2*(a+a*sin(d*x+c))**3,x)
Output:
Timed out
Time = 0.03 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.57 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {3 \, a^{3} {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 2 \, a^{3} {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )} + 6 \, a^{3} \tan \left (d x + c\right ) + \frac {2 \, a^{3}}{\cos \left (d x + c\right )}}{2 \, d} \] Input:
integrate(csc(d*x+c)^2*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x, algorithm="maxim a")
Output:
1/2*(3*a^3*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1) ) - 2*a^3*(1/tan(d*x + c) - tan(d*x + c)) + 6*a^3*tan(d*x + c) + 2*a^3/cos (d*x + c))/d
Time = 0.16 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.75 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {6 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 14 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \] Input:
integrate(csc(d*x+c)^2*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x, algorithm="giac" )
Output:
1/2*(6*a^3*log(abs(tan(1/2*d*x + 1/2*c))) + a^3*tan(1/2*d*x + 1/2*c) - (3* a^3*tan(1/2*d*x + 1/2*c)^2 + 14*a^3*tan(1/2*d*x + 1/2*c) - a^3)/(tan(1/2*d *x + 1/2*c)^2 - tan(1/2*d*x + 1/2*c)))/d
Time = 31.42 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.54 \[ \int \csc ^2(c+d x) \sec ^2(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 {a^3-17\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\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)^2*sin(c + d*x)^2),x)
Output:
(3*a^3*log(tan(c/2 + (d*x)/2)))/d - (a^3 - 17*a^3*tan(c/2 + (d*x)/2))/(d*( 2*tan(c/2 + (d*x)/2) - 2*tan(c/2 + (d*x)/2)^2)) + (a^3*tan(c/2 + (d*x)/2)) /(2*d)
Time = 0.16 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.82 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (6 \,\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}-6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-18 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(csc(d*x+c)^2*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x)
Output:
(a**3*(6*log(tan((c + d*x)/2))*tan((c + d*x)/2)**2 - 6*log(tan((c + d*x)/2 ))*tan((c + d*x)/2) + tan((c + d*x)/2)**3 - 18*tan((c + d*x)/2)**2 + 1))/( 2*tan((c + d*x)/2)*d*(tan((c + d*x)/2) - 1))