Integrand size = 27, antiderivative size = 48 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-a^3 x-\frac {a^3 \text {arctanh}(\cos (c+d x))}{d}+\frac {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))} \] Output:
-a^3*x-a^3*arctanh(cos(d*x+c))/d+4*a^3*cos(d*x+c)/d/(1-sin(d*x+c))
Time = 0.55 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.54 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {a^3 \left (c+d x+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\frac {8 \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 )}\right )}{d} \] Input:
Integrate[Csc[c + d*x]*Sec[c + d*x]^2*(a + a*Sin[c + d*x])^3,x]
Output:
-((a^3*(c + d*x + Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]] - (8*Sin[( c + d*x)/2])/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])))/d)
Time = 0.31 (sec) , antiderivative size = 46, 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.111, 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 (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) \cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3351 |
\(\displaystyle a^2 \int \left (\csc (c+d x) a+\frac {4 a}{1-\sin (c+d x)}-a\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 \left (-\frac {a \text {arctanh}(\cos (c+d x))}{d}+\frac {4 a \cos (c+d x)}{d (1-\sin (c+d x))}-a x\right )\) |
Input:
Int[Csc[c + d*x]*Sec[c + d*x]^2*(a + a*Sin[c + d*x])^3,x]
Output:
a^2*(-(a*x) - (a*ArcTanh[Cos[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.62 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.33
method | result | size |
parallelrisch | \(-\frac {a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (d x -\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-d x +8\right )}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(64\) |
risch | \(-a^{3} x +\frac {8 a^{3}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(69\) |
derivativedivides | \(\frac {a^{3} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {3 a^{3}}{\cos \left (d x +c \right )}+3 a^{3} \tan \left (d x +c \right )+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 )}{d}\) | \(77\) |
default | \(\frac {a^{3} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {3 a^{3}}{\cos \left (d x +c \right )}+3 a^{3} \tan \left (d x +c \right )+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 )}{d}\) | \(77\) |
norman | \(\frac {a^{3} x -\frac {8 a^{3}}{d}+2 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-\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}-\frac {24 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 {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 )^{6}}{d}-\frac {24 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{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 )^{3}}+\frac {a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(246\) |
Input:
int(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
-1/d*a^3*(tan(1/2*d*x+1/2*c)*(d*x-ln(tan(1/2*d*x+1/2*c)))+ln(tan(1/2*d*x+1 /2*c))-d*x+8)/(tan(1/2*d*x+1/2*c)-1)
Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (46) = 92\).
Time = 0.09 (sec) , antiderivative size = 151, normalized size of antiderivative = 3.15 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {2 \, a^{3} d x - 8 \, a^{3} + 2 \, {\left (a^{3} d x - 4 \, a^{3}\right )} \cos \left (d x + c\right ) + {\left (a^{3} \cos \left (d x + c\right ) - a^{3} \sin \left (d x + c\right ) + a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (a^{3} \cos \left (d x + c\right ) - a^{3} \sin \left (d x + c\right ) + a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (a^{3} d x + 4 \, a^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d\right )}} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x, algorithm="fricas" )
Output:
-1/2*(2*a^3*d*x - 8*a^3 + 2*(a^3*d*x - 4*a^3)*cos(d*x + c) + (a^3*cos(d*x + c) - a^3*sin(d*x + c) + a^3)*log(1/2*cos(d*x + c) + 1/2) - (a^3*cos(d*x + c) - a^3*sin(d*x + c) + a^3)*log(-1/2*cos(d*x + c) + 1/2) - 2*(a^3*d*x + 4*a^3)*sin(d*x + c))/(d*cos(d*x + c) - d*sin(d*x + c) + d)
Timed out. \[ \int \csc (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)*sec(d*x+c)**2*(a+a*sin(d*x+c))**3,x)
Output:
Timed out
Time = 0.11 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.75 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {2 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{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 )} - 6 \, a^{3} \tan \left (d x + c\right ) - \frac {6 \, a^{3}}{\cos \left (d x + c\right )}}{2 \, d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x, algorithm="maxima" )
Output:
-1/2*(2*(d*x + c - tan(d*x + c))*a^3 - a^3*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) - 6*a^3*tan(d*x + c) - 6*a^3/cos(d*x + c ))/d
Time = 0.19 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.02 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {{\left (d x + c\right )} a^{3} - a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {8 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}}{d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x, algorithm="giac")
Output:
-((d*x + c)*a^3 - a^3*log(abs(tan(1/2*d*x + 1/2*c))) + 8*a^3/(tan(1/2*d*x + 1/2*c) - 1))/d
Time = 31.34 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.33 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {2\,a^3\,\mathrm {atan}\left (\frac {4\,a^6}{4\,a^6+4\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {4\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^6+4\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {8\,a^3}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \] Input:
int((a + a*sin(c + d*x))^3/(cos(c + d*x)^2*sin(c + d*x)),x)
Output:
(a^3*log(tan(c/2 + (d*x)/2)))/d + (2*a^3*atan((4*a^6)/(4*a^6 + 4*a^6*tan(c /2 + (d*x)/2)) - (4*a^6*tan(c/2 + (d*x)/2))/(4*a^6 + 4*a^6*tan(c/2 + (d*x) /2))))/d - (8*a^3)/(d*(tan(c/2 + (d*x)/2) - 1))
Time = 0.17 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.67 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d x -8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+d x \right )}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c))^3,x)
Output:
(a**3*(log(tan((c + d*x)/2))*tan((c + d*x)/2) - log(tan((c + d*x)/2)) - ta n((c + d*x)/2)*d*x - 8*tan((c + d*x)/2) + d*x))/(d*(tan((c + d*x)/2) - 1))