Integrand size = 19, antiderivative size = 64 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=-\frac {b \text {arctanh}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x)}{f}-\frac {a \cot ^3(e+f x)}{3 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f} \] Output:
-1/2*b*arctanh(cos(f*x+e))/f-a*cot(f*x+e)/f-1/3*a*cot(f*x+e)^3/f-1/2*b*cot (f*x+e)*csc(f*x+e)/f
Time = 0.12 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.80 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=-\frac {2 a \cot (e+f x)}{3 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}-\frac {a \cot (e+f x) \csc ^2(e+f x)}{3 f}-\frac {b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f} \] Input:
Integrate[Csc[e + f*x]^4*(a + b*Sin[e + f*x]),x]
Output:
(-2*a*Cot[e + f*x])/(3*f) - (b*Csc[(e + f*x)/2]^2)/(8*f) - (a*Cot[e + f*x] *Csc[e + f*x]^2)/(3*f) - (b*Log[Cos[(e + f*x)/2]])/(2*f) + (b*Log[Sin[(e + f*x)/2]])/(2*f) + (b*Sec[(e + f*x)/2]^2)/(8*f)
Time = 0.40 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.97, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.421, Rules used = {3042, 3227, 3042, 4254, 2009, 4255, 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 ^4(e+f x) (a+b \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sin (e+f x)}{\sin (e+f x)^4}dx\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle a \int \csc ^4(e+f x)dx+b \int \csc ^3(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc (e+f x)^4dx+b \int \csc (e+f x)^3dx\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle b \int \csc (e+f x)^3dx-\frac {a \int \left (\cot ^2(e+f x)+1\right )d\cot (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle b \int \csc (e+f x)^3dx-\frac {a \left (\frac {1}{3} \cot ^3(e+f x)+\cot (e+f x)\right )}{f}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle b \left (\frac {1}{2} \int \csc (e+f x)dx-\frac {\cot (e+f x) \csc (e+f x)}{2 f}\right )-\frac {a \left (\frac {1}{3} \cot ^3(e+f x)+\cot (e+f x)\right )}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle b \left (\frac {1}{2} \int \csc (e+f x)dx-\frac {\cot (e+f x) \csc (e+f x)}{2 f}\right )-\frac {a \left (\frac {1}{3} \cot ^3(e+f x)+\cot (e+f x)\right )}{f}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle b \left (-\frac {\text {arctanh}(\cos (e+f x))}{2 f}-\frac {\cot (e+f x) \csc (e+f x)}{2 f}\right )-\frac {a \left (\frac {1}{3} \cot ^3(e+f x)+\cot (e+f x)\right )}{f}\) |
Input:
Int[Csc[e + f*x]^4*(a + b*Sin[e + f*x]),x]
Output:
-((a*(Cot[e + f*x] + Cot[e + f*x]^3/3))/f) + b*(-1/2*ArcTanh[Cos[e + f*x]] /f - (Cot[e + f*x]*Csc[e + f*x])/(2*f))
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.76 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.95
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {2}{3}-\frac {\csc \left (f x +e \right )^{2}}{3}\right ) \cot \left (f x +e \right )+b \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(61\) |
default | \(\frac {a \left (-\frac {2}{3}-\frac {\csc \left (f x +e \right )^{2}}{3}\right ) \cot \left (f x +e \right )+b \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(61\) |
risch | \(\frac {3 b \,{\mathrm e}^{5 i \left (f x +e \right )}+12 i a \,{\mathrm e}^{2 i \left (f x +e \right )}-4 i a -3 b \,{\mathrm e}^{i \left (f x +e \right )}}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3}}+\frac {b \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{2 f}-\frac {b \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{2 f}\) | \(98\) |
parallelrisch | \(\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} a -\cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} a +3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b -3 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b +9 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+12 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) b -9 \cot \left (\frac {f x}{2}+\frac {e}{2}\right ) a}{24 f}\) | \(99\) |
norman | \(\frac {-\frac {a}{24 f}-\frac {5 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{12 f}+\frac {5 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{12 f}+\frac {a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{24 f}-\frac {b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{8 f}+\frac {b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{8 f}-\frac {b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{4 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} \left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )}+\frac {b \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}\) | \(152\) |
Input:
int(csc(f*x+e)^4*(a+b*sin(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/f*(a*(-2/3-1/3*csc(f*x+e)^2)*cot(f*x+e)+b*(-1/2*csc(f*x+e)*cot(f*x+e)+1/ 2*ln(csc(f*x+e)-cot(f*x+e))))
Leaf count of result is larger than twice the leaf count of optimal. 128 vs. \(2 (58) = 116\).
Time = 0.09 (sec) , antiderivative size = 128, normalized size of antiderivative = 2.00 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=-\frac {8 \, a \cos \left (f x + e\right )^{3} - 6 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, {\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, {\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 12 \, a \cos \left (f x + e\right )}{12 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )} \sin \left (f x + e\right )} \] Input:
integrate(csc(f*x+e)^4*(a+b*sin(f*x+e)),x, algorithm="fricas")
Output:
-1/12*(8*a*cos(f*x + e)^3 - 6*b*cos(f*x + e)*sin(f*x + e) + 3*(b*cos(f*x + e)^2 - b)*log(1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 3*(b*cos(f*x + e)^2 - b)*log(-1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 12*a*cos(f*x + e))/((f*co s(f*x + e)^2 - f)*sin(f*x + e))
\[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right ) \csc ^{4}{\left (e + f x \right )}\, dx \] Input:
integrate(csc(f*x+e)**4*(a+b*sin(f*x+e)),x)
Output:
Integral((a + b*sin(e + f*x))*csc(e + f*x)**4, x)
Time = 0.03 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.14 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=\frac {3 \, b {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {4 \, {\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a}{\tan \left (f x + e\right )^{3}}}{12 \, f} \] Input:
integrate(csc(f*x+e)^4*(a+b*sin(f*x+e)),x, algorithm="maxima")
Output:
1/12*(3*b*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + l og(cos(f*x + e) - 1)) - 4*(3*tan(f*x + e)^2 + 1)*a/tan(f*x + e)^3)/f
Time = 0.13 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.78 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 3 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 12 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) + 9 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \frac {22 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 9 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + a}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3}}}{24 \, f} \] Input:
integrate(csc(f*x+e)^4*(a+b*sin(f*x+e)),x, algorithm="giac")
Output:
1/24*(a*tan(1/2*f*x + 1/2*e)^3 + 3*b*tan(1/2*f*x + 1/2*e)^2 + 12*b*log(abs (tan(1/2*f*x + 1/2*e))) + 9*a*tan(1/2*f*x + 1/2*e) - (22*b*tan(1/2*f*x + 1 /2*e)^3 + 9*a*tan(1/2*f*x + 1/2*e)^2 + 3*b*tan(1/2*f*x + 1/2*e) + a)/tan(1 /2*f*x + 1/2*e)^3)/f
Time = 17.12 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.73 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=\frac {3\,a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8\,f}+\frac {a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{24\,f}+\frac {b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{2\,f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+\frac {a}{3}\right )}{8\,f} \] Input:
int((a + b*sin(e + f*x))/sin(e + f*x)^4,x)
Output:
(3*a*tan(e/2 + (f*x)/2))/(8*f) + (a*tan(e/2 + (f*x)/2)^3)/(24*f) + (b*tan( e/2 + (f*x)/2)^2)/(8*f) + (b*log(tan(e/2 + (f*x)/2)))/(2*f) - (cot(e/2 + ( f*x)/2)^3*(a/3 + b*tan(e/2 + (f*x)/2) + 3*a*tan(e/2 + (f*x)/2)^2))/(8*f)
Time = 0.17 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.19 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx=\frac {-4 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a -3 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b -2 \cos \left (f x +e \right ) a +3 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{3} b}{6 \sin \left (f x +e \right )^{3} f} \] Input:
int(csc(f*x+e)^4*(a+b*sin(f*x+e)),x)
Output:
( - 4*cos(e + f*x)*sin(e + f*x)**2*a - 3*cos(e + f*x)*sin(e + f*x)*b - 2*c os(e + f*x)*a + 3*log(tan((e + f*x)/2))*sin(e + f*x)**3*b)/(6*sin(e + f*x) **3*f)