Integrand size = 27, antiderivative size = 46 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {\left (a^2+b^2\right ) \sec (c+d x)}{d}+\frac {2 a b \tan (c+d x)}{d} \] Output:
-a^2*arctanh(cos(d*x+c))/d+(a^2+b^2)*sec(d*x+c)/d+2*a*b*tan(d*x+c)/d
Time = 1.18 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.26 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\left (a^2+b^2\right ) \sec (c+d x)+a \left (a \left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+2 b \tan (c+d x)\right )}{d} \] Input:
Integrate[Csc[c + d*x]*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^2,x]
Output:
((a^2 + b^2)*Sec[c + d*x] + a*(a*(-Log[Cos[(c + d*x)/2]] + Log[Sin[(c + d* x)/2]]) + 2*b*Tan[c + d*x]))/d
Time = 0.48 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.89, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {3042, 3390, 3042, 3680, 354, 87, 73, 219, 4254, 24}
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+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (c+d x))^2}{\sin (c+d x) \cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3390 |
\(\displaystyle \int \csc (c+d x) \sec ^2(c+d x) \left (a^2+b^2 \sin ^2(c+d x)\right )dx+2 a b \int \sec ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a^2+b^2 \sin (c+d x)^2}{\cos (c+d x)^2 \sin (c+d x)}dx+2 a b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3680 |
\(\displaystyle \frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \int \frac {\csc (c+d x) \left (a^2+b^2 \sin ^2(c+d x)\right )}{\left (1-\sin ^2(c+d x)\right )^{3/2}}d\sin (c+d x)}{d}+2 a b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 354 |
\(\displaystyle \frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \int \frac {\csc (c+d x) \left (a^2+b^2 \sin ^2(c+d x)\right )}{\left (1-\sin ^2(c+d x)\right )^{3/2}}d\sin ^2(c+d x)}{2 d}+2 a b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 87 |
\(\displaystyle \frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \left (a^2 \int \frac {\csc (c+d x)}{\sqrt {1-\sin ^2(c+d x)}}d\sin ^2(c+d x)+\frac {2 \left (a^2+b^2\right )}{\sqrt {1-\sin ^2(c+d x)}}\right )}{2 d}+2 a b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \left (\frac {2 \left (a^2+b^2\right )}{\sqrt {1-\sin ^2(c+d x)}}-2 a^2 \int \frac {1}{1-\sin ^4(c+d x)}d\sqrt {1-\sin ^2(c+d x)}\right )}{2 d}+2 a b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 219 |
\(\displaystyle 2 a b \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \left (\frac {2 \left (a^2+b^2\right )}{\sqrt {1-\sin ^2(c+d x)}}-2 a^2 \text {arctanh}\left (\sqrt {1-\sin ^2(c+d x)}\right )\right )}{2 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \left (\frac {2 \left (a^2+b^2\right )}{\sqrt {1-\sin ^2(c+d x)}}-2 a^2 \text {arctanh}\left (\sqrt {1-\sin ^2(c+d x)}\right )\right )}{2 d}-\frac {2 a b \int 1d(-\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\sqrt {\cos ^2(c+d x)} \sec (c+d x) \left (\frac {2 \left (a^2+b^2\right )}{\sqrt {1-\sin ^2(c+d x)}}-2 a^2 \text {arctanh}\left (\sqrt {1-\sin ^2(c+d x)}\right )\right )}{2 d}+\frac {2 a b \tan (c+d x)}{d}\) |
Input:
Int[Csc[c + d*x]*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^2,x]
Output:
(Sqrt[Cos[c + d*x]^2]*Sec[c + d*x]*(-2*a^2*ArcTanh[Sqrt[1 - Sin[c + d*x]^2 ]] + (2*(a^2 + b^2))/Sqrt[1 - Sin[c + d*x]^2]))/(2*d) + (2*a*b*Tan[c + d*x ])/d
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p _.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)) Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege rQ[p] || !(IntegerQ[n] || !(EqQ[e, 0] || !(EqQ[c, 0] || LtQ[p, n]))))
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[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[2*a*(b/d) Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^(n + 1), x], x] + Int[(g*Cos[e + f* x])^p*(d*Sin[e + f*x])^n*(a^2 + b^2*Sin[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && NeQ[a^2 - b^2, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_ ) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeFac tors[Sin[e + f*x], x]}, Simp[ff*(Sqrt[Cos[e + f*x]^2]/(f*Cos[e + f*x])) S ubst[Int[(d*ff*x)^n*(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, S in[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[m/2]
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]
Time = 1.17 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.24
method | result | size |
derivativedivides | \(\frac {a^{2} \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 )+2 \tan \left (d x +c \right ) a b +\frac {b^{2}}{\cos \left (d x +c \right )}}{d}\) | \(57\) |
default | \(\frac {a^{2} \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 )+2 \tan \left (d x +c \right ) a b +\frac {b^{2}}{\cos \left (d x +c \right )}}{d}\) | \(57\) |
parallelrisch | \(\frac {a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a b -2 a^{2}-2 b^{2}}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\) | \(71\) |
risch | \(\frac {4 i a b +2 a^{2} {\mathrm e}^{i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\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}\) | \(91\) |
norman | \(\frac {-\frac {2 a^{2}+2 b^{2}}{d}-\frac {\left (2 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}-\frac {\left (4 a^{2}+4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{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 )^{2}}+\frac {a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(173\) |
Input:
int(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(1/cos(d*x+c)+ln(csc(d*x+c)-cot(d*x+c)))+2*tan(d*x+c)*a*b+b^2/cos (d*x+c))
Time = 0.09 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.67 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {a^{2} \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - a^{2} \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 4 \, a b \sin \left (d x + c\right ) - 2 \, a^{2} - 2 \, b^{2}}{2 \, d \cos \left (d x + c\right )} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
-1/2*(a^2*cos(d*x + c)*log(1/2*cos(d*x + c) + 1/2) - a^2*cos(d*x + c)*log( -1/2*cos(d*x + c) + 1/2) - 4*a*b*sin(d*x + c) - 2*a^2 - 2*b^2)/(d*cos(d*x + c))
\[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(csc(d*x+c)*sec(d*x+c)**2*(a+b*sin(d*x+c))**2,x)
Output:
Integral((a + b*sin(c + d*x))**2*csc(c + d*x)*sec(c + d*x)**2, x)
Time = 0.03 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.39 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a^{2} {\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 )} + 4 \, a b \tan \left (d x + c\right ) + \frac {2 \, b^{2}}{\cos \left (d x + c\right )}}{2 \, d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
1/2*(a^2*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) + 4*a*b*tan(d*x + c) + 2*b^2/cos(d*x + c))/d
Time = 0.40 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.24 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (2 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2} + b^{2}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
(a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 2*(2*a*b*tan(1/2*d*x + 1/2*c) + a^2 + b^2)/(tan(1/2*d*x + 1/2*c)^2 - 1))/d
Time = 19.89 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.35 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \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 {2\,a^2+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b+2\,b^2}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \] Input:
int((a + b*sin(c + d*x))^2/(cos(c + d*x)^2*sin(c + d*x)),x)
Output:
(a^2*log(tan(c/2 + (d*x)/2)))/d - (2*a^2 + 2*b^2 + 4*a*b*tan(c/2 + (d*x)/2 ))/(d*(tan(c/2 + (d*x)/2)^2 - 1))
Time = 0.19 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.54 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}-\cos \left (d x +c \right ) a^{2}-\cos \left (d x +c \right ) b^{2}+2 \sin \left (d x +c \right ) a b +a^{2}+b^{2}}{\cos \left (d x +c \right ) d} \] Input:
int(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^2,x)
Output:
(cos(c + d*x)*log(tan((c + d*x)/2))*a**2 - cos(c + d*x)*a**2 - cos(c + d*x )*b**2 + 2*sin(c + d*x)*a*b + a**2 + b**2)/(cos(c + d*x)*d)