Integrand size = 27, antiderivative size = 70 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {3 a \text {arctanh}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x)}{d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}+\frac {a \sec (c+d x)}{d}+\frac {a \tan (c+d x)}{d} \] Output:
-3/2*a*arctanh(cos(d*x+c))/d-a*cot(d*x+c)/d-1/2*a*cot(d*x+c)*csc(d*x+c)/d+ a*sec(d*x+c)/d+a*tan(d*x+c)/d
Leaf count is larger than twice the leaf count of optimal. \(172\) vs. \(2(70)=140\).
Time = 2.07 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.46 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {2 a \cot (2 (c+d x))}{d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a \sin \left (\frac {1}{2} (c+d x)\right )}{d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}-\frac {a \sin \left (\frac {1}{2} (c+d x)\right )}{d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \] Input:
Integrate[Csc[c + d*x]^3*Sec[c + d*x]^2*(a + a*Sin[c + d*x]),x]
Output:
(-2*a*Cot[2*(c + d*x)])/d - (a*Csc[(c + d*x)/2]^2)/(8*d) - (3*a*Log[Cos[(c + d*x)/2]])/(2*d) + (3*a*Log[Sin[(c + d*x)/2]])/(2*d) + (a*Sec[(c + d*x)/ 2]^2)/(8*d) + (a*Sin[(c + d*x)/2])/(d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2] )) - (a*Sin[(c + d*x)/2])/(d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))
Time = 0.44 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.04, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {3042, 3317, 3042, 3100, 244, 2009, 3102, 252, 262, 219}
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 ^3(c+d x) \sec ^2(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a \sin (c+d x)+a}{\sin (c+d x)^3 \cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \csc ^3(c+d x) \sec ^2(c+d x)dx+a \int \csc ^2(c+d x) \sec ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc (c+d x)^2 \sec (c+d x)^2dx+a \int \csc (c+d x)^3 \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 3100 |
\(\displaystyle \frac {a \int \cot ^2(c+d x) \left (\tan ^2(c+d x)+1\right )d\tan (c+d x)}{d}+a \int \csc (c+d x)^3 \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 244 |
\(\displaystyle \frac {a \int \left (\cot ^2(c+d x)+1\right )d\tan (c+d x)}{d}+a \int \csc (c+d x)^3 \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a \int \csc (c+d x)^3 \sec (c+d x)^2dx+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 3102 |
\(\displaystyle \frac {a \int \frac {\sec ^4(c+d x)}{\left (1-\sec ^2(c+d x)\right )^2}d\sec (c+d x)}{d}+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 252 |
\(\displaystyle \frac {a \left (\frac {\sec ^3(c+d x)}{2 \left (1-\sec ^2(c+d x)\right )}-\frac {3}{2} \int \frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)\right )}{d}+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle \frac {a \left (\frac {\sec ^3(c+d x)}{2 \left (1-\sec ^2(c+d x)\right )}-\frac {3}{2} \left (\int \frac {1}{1-\sec ^2(c+d x)}d\sec (c+d x)-\sec (c+d x)\right )\right )}{d}+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {a \left (\frac {\sec ^3(c+d x)}{2 \left (1-\sec ^2(c+d x)\right )}-\frac {3}{2} (\text {arctanh}(\sec (c+d x))-\sec (c+d x))\right )}{d}+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
Input:
Int[Csc[c + d*x]^3*Sec[c + d*x]^2*(a + a*Sin[c + d*x]),x]
Output:
(a*((-3*(ArcTanh[Sec[c + d*x]] - Sec[c + d*x]))/2 + Sec[c + d*x]^3/(2*(1 - Sec[c + d*x]^2))))/d + (a*(-Cot[c + d*x] + Tan[c + d*x]))/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && IGtQ[p , 0]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x )^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* (p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c }, x] && LtQ[p, -1] && GtQ[m, 1] && !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi alQ[a, b, c, 2, m, p, x]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Simp[1/f Subst[Int[(1 + x^2)^((m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]] , x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_S ymbol] :> Simp[1/(f*a^n) Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/ 2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1 )/2] && !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Time = 0.66 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.19
method | result | size |
derivativedivides | \(\frac {a \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+a \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(83\) |
default | \(\frac {a \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+a \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(83\) |
parallelrisch | \(\frac {\left (-24+12 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+3 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a}{8 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(91\) |
risch | \(\frac {a \left (-3 i {\mathrm e}^{3 i \left (d x +c \right )}+3 \,{\mathrm e}^{4 i \left (d x +c \right )}+i {\mathrm e}^{i \left (d x +c \right )}-5 \,{\mathrm e}^{2 i \left (d x +c \right )}+4\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}\) | \(118\) |
norman | \(\frac {\frac {a}{8 d}+\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}-\frac {5 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 d}-\frac {9 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4 d}-\frac {5 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 d}+\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{2 d}+\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8 d}-\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \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 )}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(184\) |
Input:
int(csc(d*x+c)^3*sec(d*x+c)^2*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(a*(1/sin(d*x+c)/cos(d*x+c)-2*cot(d*x+c))+a*(-1/2/sin(d*x+c)^2/cos(d*x +c)+3/2/cos(d*x+c)+3/2*ln(csc(d*x+c)-cot(d*x+c))))
Leaf count of result is larger than twice the leaf count of optimal. 261 vs. \(2 (66) = 132\).
Time = 0.08 (sec) , antiderivative size = 261, normalized size of antiderivative = 3.73 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {8 \, a \cos \left (d x + c\right )^{3} + 6 \, a \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - {\left (a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right ) - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - {\left (a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right ) - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (4 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) - 2 \, a\right )} \sin \left (d x + c\right ) - 4 \, a}{4 \, {\left (d \cos \left (d x + c\right )^{3} + 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\right )} \sin \left (d x + c\right ) - d\right )}} \] Input:
integrate(csc(d*x+c)^3*sec(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="fricas" )
Output:
1/4*(8*a*cos(d*x + c)^3 + 6*a*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 3*(a*cos (d*x + c)^3 + a*cos(d*x + c)^2 - a*cos(d*x + c) - (a*cos(d*x + c)^2 - a)*s in(d*x + c) - a)*log(1/2*cos(d*x + c) + 1/2) + 3*(a*cos(d*x + c)^3 + a*cos (d*x + c)^2 - a*cos(d*x + c) - (a*cos(d*x + c)^2 - a)*sin(d*x + c) - a)*lo g(-1/2*cos(d*x + c) + 1/2) + 2*(4*a*cos(d*x + c)^2 + a*cos(d*x + c) - 2*a) *sin(d*x + c) - 4*a)/(d*cos(d*x + c)^3 + d*cos(d*x + c)^2 - d*cos(d*x + c) - (d*cos(d*x + c)^2 - d)*sin(d*x + c) - d)
Timed out. \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\text {Timed out} \] Input:
integrate(csc(d*x+c)**3*sec(d*x+c)**2*(a+a*sin(d*x+c)),x)
Output:
Timed out
Time = 0.03 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.20 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 2\right )}}{\cos \left (d x + c\right )^{3} - \cos \left (d x + c\right )} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 4 \, a {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )}}{4 \, d} \] Input:
integrate(csc(d*x+c)^3*sec(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="maxima" )
Output:
1/4*(a*(2*(3*cos(d*x + c)^2 - 2)/(cos(d*x + c)^3 - cos(d*x + c)) - 3*log(c os(d*x + c) + 1) + 3*log(cos(d*x + c) - 1)) - 4*a*(1/tan(d*x + c) - tan(d* x + c)))/d
Time = 0.17 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.46 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {16 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1} - \frac {18 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \] Input:
integrate(csc(d*x+c)^3*sec(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
1/8*(a*tan(1/2*d*x + 1/2*c)^2 + 12*a*log(abs(tan(1/2*d*x + 1/2*c))) + 4*a* tan(1/2*d*x + 1/2*c) - 16*a/(tan(1/2*d*x + 1/2*c) - 1) - (18*a*tan(1/2*d*x + 1/2*c)^2 + 4*a*tan(1/2*d*x + 1/2*c) + a)/tan(1/2*d*x + 1/2*c)^2)/d
Time = 29.34 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.61 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {-10\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {a}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d} \] Input:
int((a + a*sin(c + d*x))/(cos(c + d*x)^2*sin(c + d*x)^3),x)
Output:
(a*tan(c/2 + (d*x)/2))/(2*d) - (a/2 + (3*a*tan(c/2 + (d*x)/2))/2 - 10*a*ta n(c/2 + (d*x)/2)^2)/(d*(4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^3)) + (a*tan(c/2 + (d*x)/2)^2)/(8*d) + (3*a*log(tan(c/2 + (d*x)/2)))/(2*d)
Time = 0.17 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.80 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (12 \,\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}-12 \,\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}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-24 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(csc(d*x+c)^3*sec(d*x+c)^2*(a+a*sin(d*x+c)),x)
Output:
(a*(12*log(tan((c + d*x)/2))*tan((c + d*x)/2)**3 - 12*log(tan((c + d*x)/2) )*tan((c + d*x)/2)**2 + tan((c + d*x)/2)**5 + 3*tan((c + d*x)/2)**4 - 24*t an((c + d*x)/2)**3 + 3*tan((c + d*x)/2) + 1))/(8*tan((c + d*x)/2)**2*d*(ta n((c + d*x)/2) - 1))