Integrand size = 27, antiderivative size = 73 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {4 a^2 \cos (c+d x)}{3 d (1-\sin (c+d x))}+\frac {a^4 \cos (c+d x)}{3 d (a-a \sin (c+d x))^2} \] Output:
-a^2*arctanh(cos(d*x+c))/d+4/3*a^2*cos(d*x+c)/d/(1-sin(d*x+c))+1/3*a^4*cos (d*x+c)/d/(a-a*sin(d*x+c))^2
Time = 2.31 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.45 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 (1+\sin (c+d x))^2 \left (-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 )+6 \sec (c+d x)+4 \sec ^3(c+d x)+12 \tan (c+d x)+4 \tan ^3(c+d x)\right )}{6 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4} \] Input:
Integrate[Csc[c + d*x]*Sec[c + d*x]^4*(a + a*Sin[c + d*x])^2,x]
Output:
(a^2*(1 + Sin[c + d*x])^2*(-6*Log[Cos[(c + d*x)/2]] + 6*Log[Sin[(c + d*x)/ 2]] + 6*Sec[c + d*x] + 4*Sec[c + d*x]^3 + 12*Tan[c + d*x] + 4*Tan[c + d*x] ^3))/(6*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4)
Time = 0.56 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3348, 3042, 3245, 3042, 3457, 27, 3042, 4257}
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 ^4(c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (c+d x)+a)^2}{\sin (c+d x) \cos (c+d x)^4}dx\) |
\(\Big \downarrow \) 3348 |
\(\displaystyle a^4 \int \frac {\csc (c+d x)}{(a-a \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \int \frac {1}{\sin (c+d x) (a-a \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3245 |
\(\displaystyle a^4 \left (\frac {\int \frac {\csc (c+d x) (\sin (c+d x) a+3 a)}{a-a \sin (c+d x)}dx}{3 a^2}+\frac {\cos (c+d x)}{3 d (a-a \sin (c+d x))^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \left (\frac {\int \frac {\sin (c+d x) a+3 a}{\sin (c+d x) (a-a \sin (c+d x))}dx}{3 a^2}+\frac {\cos (c+d x)}{3 d (a-a \sin (c+d x))^2}\right )\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle a^4 \left (\frac {\frac {\int 3 a^2 \csc (c+d x)dx}{a^2}+\frac {4 \cos (c+d x)}{d (1-\sin (c+d x))}}{3 a^2}+\frac {\cos (c+d x)}{3 d (a-a \sin (c+d x))^2}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle a^4 \left (\frac {3 \int \csc (c+d x)dx+\frac {4 \cos (c+d x)}{d (1-\sin (c+d x))}}{3 a^2}+\frac {\cos (c+d x)}{3 d (a-a \sin (c+d x))^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \left (\frac {3 \int \csc (c+d x)dx+\frac {4 \cos (c+d x)}{d (1-\sin (c+d x))}}{3 a^2}+\frac {\cos (c+d x)}{3 d (a-a \sin (c+d x))^2}\right )\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle a^4 \left (\frac {\frac {4 \cos (c+d x)}{d (1-\sin (c+d x))}-\frac {3 \text {arctanh}(\cos (c+d x))}{d}}{3 a^2}+\frac {\cos (c+d x)}{3 d (a-a \sin (c+d x))^2}\right )\) |
Input:
Int[Csc[c + d*x]*Sec[c + d*x]^4*(a + a*Sin[c + d*x])^2,x]
Output:
a^4*(((-3*ArcTanh[Cos[c + d*x]])/d + (4*Cos[c + d*x])/(d*(1 - Sin[c + d*x] )))/(3*a^2) + Cos[c + d*x]/(3*d*(a - a*Sin[c + d*x])^2))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^ m*((c + d*Sin[e + f*x])^(n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/( a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[b*c*(m + 1) - a*d*(2*m + n + 2) + b*d*(m + n + 2)*Sin[e + f*x] , x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ [a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && !GtQ[n, 0] && (Intege rsQ[2*m, 2*n] || (IntegerQ[m] && EqQ[c, 0]))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[a^(2*m) Int[(d* Sin[e + f*x])^n/(a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p] && EqQ[2*m + p, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.68 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.97
method | result | size |
parallelrisch | \(\frac {\left (\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 )-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {10}{3}\right ) a^{2}}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}\) | \(71\) |
derivativedivides | \(\frac {\frac {a^{2}}{3 \cos \left (d x +c \right )^{3}}-2 a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{2} \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 )}{d}\) | \(81\) |
default | \(\frac {\frac {a^{2}}{3 \cos \left (d x +c \right )^{3}}-2 a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{2} \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 )}{d}\) | \(81\) |
risch | \(\frac {2 a^{2} \left (-9 i {\mathrm e}^{i \left (d x +c \right )}+3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4\right )}{3 d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(88\) |
norman | \(\frac {-\frac {10 a^{2}}{3 d}-\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {16 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}-\frac {8 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}-\frac {16 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}-\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3 d}-\frac {8 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {6 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {8 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3 d}}{\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 )^{2}}+\frac {a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(228\) |
Input:
int(csc(d*x+c)*sec(d*x+c)^4*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
((tan(1/2*d*x+1/2*c)-1)^3*ln(tan(1/2*d*x+1/2*c))-4*tan(1/2*d*x+1/2*c)^2+6* tan(1/2*d*x+1/2*c)-10/3)*a^2/d/(tan(1/2*d*x+1/2*c)-1)^3
Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (68) = 136\).
Time = 0.08 (sec) , antiderivative size = 231, normalized size of antiderivative = 3.16 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {8 \, a^{2} \cos \left (d x + c\right )^{2} + 10 \, a^{2} \cos \left (d x + c\right ) + 2 \, a^{2} + 3 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right ) - 2 \, a^{2} + {\left (a^{2} \cos \left (d x + c\right ) + 2 \, a^{2}\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^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right ) - 2 \, a^{2} + {\left (a^{2} \cos \left (d x + c\right ) + 2 \, a^{2}\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 (4 \, a^{2} \cos \left (d x + c\right ) - a^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (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 ) - 2 \, d\right )}} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^4*(a+a*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
-1/6*(8*a^2*cos(d*x + c)^2 + 10*a^2*cos(d*x + c) + 2*a^2 + 3*(a^2*cos(d*x + c)^2 - a^2*cos(d*x + c) - 2*a^2 + (a^2*cos(d*x + c) + 2*a^2)*sin(d*x + c ))*log(1/2*cos(d*x + c) + 1/2) - 3*(a^2*cos(d*x + c)^2 - a^2*cos(d*x + c) - 2*a^2 + (a^2*cos(d*x + c) + 2*a^2)*sin(d*x + c))*log(-1/2*cos(d*x + c) + 1/2) - 2*(4*a^2*cos(d*x + c) - a^2)*sin(d*x + c))/(d*cos(d*x + c)^2 - d*c os(d*x + c) + (d*cos(d*x + c) + 2*d)*sin(d*x + c) - 2*d)
Timed out. \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=\text {Timed out} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)**4*(a+a*sin(d*x+c))**2,x)
Output:
Timed out
Time = 0.03 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.23 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {4 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{2} + a^{2} {\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^{2}}{\cos \left (d x + c\right )^{3}}}{6 \, d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^4*(a+a*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
1/6*(4*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^2 + a^2*(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^2/cos(d*x + c)^3)/d
Time = 0.16 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (6 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{3 \, d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^4*(a+a*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/3*(3*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 2*(6*a^2*tan(1/2*d*x + 1/2*c)^ 2 - 9*a^2*tan(1/2*d*x + 1/2*c) + 5*a^2)/(tan(1/2*d*x + 1/2*c) - 1)^3)/d
Time = 31.94 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.34 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-6\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {10\,a^2}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \] Input:
int((a + a*sin(c + d*x))^2/(cos(c + d*x)^4*sin(c + d*x)),x)
Output:
(a^2*log(tan(c/2 + (d*x)/2)))/d - (4*a^2*tan(c/2 + (d*x)/2)^2 + (10*a^2)/3 - 6*a^2*tan(c/2 + (d*x)/2))/(d*(3*tan(c/2 + (d*x)/2) - 3*tan(c/2 + (d*x)/ 2)^2 + tan(c/2 + (d*x)/2)^3 - 1))
Time = 0.28 (sec) , antiderivative size = 152, normalized size of antiderivative = 2.08 \[ \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \left (3 \,\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}-9 \,\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}+9 \,\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 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-6\right )}{3 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)*sec(d*x+c)^4*(a+a*sin(d*x+c))^2,x)
Output:
(a**2*(3*log(tan((c + d*x)/2))*tan((c + d*x)/2)**3 - 9*log(tan((c + d*x)/2 ))*tan((c + d*x)/2)**2 + 9*log(tan((c + d*x)/2))*tan((c + d*x)/2) - 3*log( tan((c + d*x)/2)) - 4*tan((c + d*x)/2)**3 + 6*tan((c + d*x)/2) - 6))/(3*d* (tan((c + d*x)/2)**3 - 3*tan((c + d*x)/2)**2 + 3*tan((c + d*x)/2) - 1))