Integrand size = 19, antiderivative size = 35 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=2 a b x-\frac {a^2 \text {arctanh}(\cos (e+f x))}{f}-\frac {b^2 \cos (e+f x)}{f} \] Output:
2*a*b*x-a^2*arctanh(cos(f*x+e))/f-b^2*cos(f*x+e)/f
Time = 0.04 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.37 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=2 a b x-\frac {a^2 \text {arctanh}(\cos (e+f x))}{f}-\frac {b^2 \cos (e) \cos (f x)}{f}+\frac {b^2 \sin (e) \sin (f x)}{f} \] Input:
Integrate[Csc[e + f*x]*(a + b*Sin[e + f*x])^2,x]
Output:
2*a*b*x - (a^2*ArcTanh[Cos[e + f*x]])/f - (b^2*Cos[e]*Cos[f*x])/f + (b^2*S in[e]*Sin[f*x])/f
Time = 0.34 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 3225, 3042, 3214, 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 (e+f x) (a+b \sin (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (e+f x))^2}{\sin (e+f x)}dx\) |
\(\Big \downarrow \) 3225 |
\(\displaystyle \int \csc (e+f x) \left (a^2+2 b \sin (e+f x) a\right )dx-\frac {b^2 \cos (e+f x)}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a^2+2 b \sin (e+f x) a}{\sin (e+f x)}dx-\frac {b^2 \cos (e+f x)}{f}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle a^2 \int \csc (e+f x)dx+2 a b x-\frac {b^2 \cos (e+f x)}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 \int \csc (e+f x)dx+2 a b x-\frac {b^2 \cos (e+f x)}{f}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {a^2 \text {arctanh}(\cos (e+f x))}{f}+2 a b x-\frac {b^2 \cos (e+f x)}{f}\) |
Input:
Int[Csc[e + f*x]*(a + b*Sin[e + f*x])^2,x]
Output:
2*a*b*x - (a^2*ArcTanh[Cos[e + f*x]])/f - (b^2*Cos[e + f*x])/f
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2/((c_.) + (d_.)*sin[(e_.) + (f _.)*(x_)]), x_Symbol] :> Simp[(-b^2)*(Cos[e + f*x]/(d*f)), x] + Simp[1/d Int[Simp[a^2*d - b*(b*c - 2*a*d)*Sin[e + f*x], x]/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.34 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.14
method | result | size |
parallelrisch | \(\frac {2 a b x f +b^{2}-\cos \left (f x +e \right ) b^{2}+a^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) | \(40\) |
derivativedivides | \(\frac {a^{2} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+2 a b \left (f x +e \right )-\cos \left (f x +e \right ) b^{2}}{f}\) | \(46\) |
default | \(\frac {a^{2} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+2 a b \left (f x +e \right )-\cos \left (f x +e \right ) b^{2}}{f}\) | \(46\) |
risch | \(2 a b x -\frac {b^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 f}-\frac {b^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 f}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}\) | \(80\) |
norman | \(\frac {\frac {2 b^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{f}+2 a b x +\frac {2 b^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{f}+4 a b x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+2 a b x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}+\frac {a^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) | \(111\) |
Input:
int(csc(f*x+e)*(a+b*sin(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
1/f*(2*a*b*x*f+b^2-cos(f*x+e)*b^2+a^2*ln(tan(1/2*f*x+1/2*e)))
Time = 0.09 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.54 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {4 \, a b f x - 2 \, b^{2} \cos \left (f x + e\right ) - a^{2} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + a^{2} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, f} \] Input:
integrate(csc(f*x+e)*(a+b*sin(f*x+e))^2,x, algorithm="fricas")
Output:
1/2*(4*a*b*f*x - 2*b^2*cos(f*x + e) - a^2*log(1/2*cos(f*x + e) + 1/2) + a^ 2*log(-1/2*cos(f*x + e) + 1/2))/f
\[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \csc {\left (e + f x \right )}\, dx \] Input:
integrate(csc(f*x+e)*(a+b*sin(f*x+e))**2,x)
Output:
Integral((a + b*sin(e + f*x))**2*csc(e + f*x), x)
Time = 0.03 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.26 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {2 \, {\left (f x + e\right )} a b - b^{2} \cos \left (f x + e\right ) - a^{2} \log \left (\cot \left (f x + e\right ) + \csc \left (f x + e\right )\right )}{f} \] Input:
integrate(csc(f*x+e)*(a+b*sin(f*x+e))^2,x, algorithm="maxima")
Output:
(2*(f*x + e)*a*b - b^2*cos(f*x + e) - a^2*log(cot(f*x + e) + csc(f*x + e)) )/f
Time = 0.13 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.40 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {2 \, {\left (f x + e\right )} a b + a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) - \frac {2 \, b^{2}}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1}}{f} \] Input:
integrate(csc(f*x+e)*(a+b*sin(f*x+e))^2,x, algorithm="giac")
Output:
(2*(f*x + e)*a*b + a^2*log(abs(tan(1/2*f*x + 1/2*e))) - 2*b^2/(tan(1/2*f*x + 1/2*e)^2 + 1))/f
Time = 16.86 (sec) , antiderivative size = 125, normalized size of antiderivative = 3.57 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f}-\frac {2\,b^2}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {4\,a\,b\,\mathrm {atan}\left (\frac {16\,a^2\,b^2}{8\,a^3\,b-16\,a^2\,b^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}+\frac {8\,a^3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8\,a^3\,b-16\,a^2\,b^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f} \] Input:
int((a + b*sin(e + f*x))^2/sin(e + f*x),x)
Output:
(a^2*log(tan(e/2 + (f*x)/2)))/f - (2*b^2)/(f*(tan(e/2 + (f*x)/2)^2 + 1)) + (4*a*b*atan((16*a^2*b^2)/(8*a^3*b - 16*a^2*b^2*tan(e/2 + (f*x)/2)) + (8*a ^3*b*tan(e/2 + (f*x)/2))/(8*a^3*b - 16*a^2*b^2*tan(e/2 + (f*x)/2))))/f
Time = 0.16 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.26 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {-\cos \left (f x +e \right ) b^{2}+\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) a^{2}+2 a b e +2 a b f x +b^{2}}{f} \] Input:
int(csc(f*x+e)*(a+b*sin(f*x+e))^2,x)
Output:
( - cos(e + f*x)*b**2 + log(tan((e + f*x)/2))*a**2 + 2*a*b*e + 2*a*b*f*x + b**2)/f