Integrand size = 25, antiderivative size = 93 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\log (1-\sin (c+d x))}{2 (a+b) d}+\frac {\log (\sin (c+d x))}{a d}-\frac {\log (1+\sin (c+d x))}{2 (a-b) d}+\frac {b^2 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right ) d} \] Output:
-1/2*ln(1-sin(d*x+c))/(a+b)/d+ln(sin(d*x+c))/a/d-1/2*ln(1+sin(d*x+c))/(a-b )/d+b^2*ln(a+b*sin(d*x+c))/a/(a^2-b^2)/d
Time = 0.13 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.90 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\frac {\log (1-\sin (c+d x))}{a+b}-\frac {2 \log (\sin (c+d x))}{a}+\frac {\log (1+\sin (c+d x))}{a-b}-\frac {2 b^2 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right )}}{2 d} \] Input:
Integrate[(Csc[c + d*x]*Sec[c + d*x])/(a + b*Sin[c + d*x]),x]
Output:
-1/2*(Log[1 - Sin[c + d*x]]/(a + b) - (2*Log[Sin[c + d*x]])/a + Log[1 + Si n[c + d*x]]/(a - b) - (2*b^2*Log[a + b*Sin[c + d*x]])/(a*(a^2 - b^2)))/d
Time = 0.36 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.06, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3316, 27, 615, 2009}
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 \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))}dx\) |
\(\Big \downarrow \) 3316 |
\(\displaystyle \frac {b \int \frac {\csc (c+d x)}{(a+b \sin (c+d x)) \left (b^2-b^2 \sin ^2(c+d x)\right )}d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b^2 \int \frac {\csc (c+d x)}{b (a+b \sin (c+d x)) \left (b^2-b^2 \sin ^2(c+d x)\right )}d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 615 |
\(\displaystyle \frac {b^2 \int \left (\frac {\csc (c+d x)}{a b^3}+\frac {1}{2 b^2 (a+b) (b-b \sin (c+d x))}+\frac {1}{a (a-b) (a+b) (a+b \sin (c+d x))}-\frac {1}{2 (a-b) b^2 (\sin (c+d x) b+b)}\right )d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b^2 \left (\frac {\log (a+b \sin (c+d x))}{a \left (a^2-b^2\right )}+\frac {\log (b \sin (c+d x))}{a b^2}-\frac {\log (b-b \sin (c+d x))}{2 b^2 (a+b)}-\frac {\log (b \sin (c+d x)+b)}{2 b^2 (a-b)}\right )}{d}\) |
Input:
Int[(Csc[c + d*x]*Sec[c + d*x])/(a + b*Sin[c + d*x]),x]
Output:
(b^2*(Log[b*Sin[c + d*x]]/(a*b^2) - Log[b - b*Sin[c + d*x]]/(2*b^2*(a + b) ) + Log[a + b*Sin[c + d*x]]/(a*(a^2 - b^2)) - Log[b + b*Sin[c + d*x]]/(2*( a - b)*b^2)))/d
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) /2] && NeQ[a^2 - b^2, 0]
Time = 0.53 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{2 a +2 b}+\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right ) \left (a -b \right ) a}-\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{2 a -2 b}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}}{d}\) | \(87\) |
default | \(\frac {-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{2 a +2 b}+\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right ) \left (a -b \right ) a}-\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{2 a -2 b}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}}{d}\) | \(87\) |
parallelrisch | \(\frac {b^{2} \ln \left (2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )-a \left (a -b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\left (a +b \right ) \left (a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (a -b \right )\right )}{d \left (a^{3}-a \,b^{2}\right )}\) | \(106\) |
norman | \(\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {b^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a d \left (a^{2}-b^{2}\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \left (a -b \right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d \left (a +b \right )}\) | \(114\) |
risch | \(\frac {i x}{a -b}+\frac {i c}{d \left (a -b \right )}+\frac {i x}{a +b}+\frac {i c}{d \left (a +b \right )}-\frac {2 i b^{2} x}{a \left (a^{2}-b^{2}\right )}-\frac {2 i b^{2} c}{a d \left (a^{2}-b^{2}\right )}-\frac {2 i x}{a}-\frac {2 i c}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \left (a -b \right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d \left (a +b \right )}+\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a d \left (a^{2}-b^{2}\right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d a}\) | \(226\) |
Input:
int(csc(d*x+c)*sec(d*x+c)/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(-1/(2*a+2*b)*ln(sin(d*x+c)-1)+b^2/(a+b)/(a-b)/a*ln(a+b*sin(d*x+c))-1/ (2*a-2*b)*ln(1+sin(d*x+c))+1/a*ln(sin(d*x+c)))
Time = 0.14 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.00 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {2 \, b^{2} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, {\left (a^{2} - b^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) - {\left (a^{2} + a b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a^{2} - a b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)/(a+b*sin(d*x+c)),x, algorithm="fricas")
Output:
1/2*(2*b^2*log(b*sin(d*x + c) + a) + 2*(a^2 - b^2)*log(-1/2*sin(d*x + c)) - (a^2 + a*b)*log(sin(d*x + c) + 1) - (a^2 - a*b)*log(-sin(d*x + c) + 1))/ ((a^3 - a*b^2)*d)
\[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\csc {\left (c + d x \right )} \sec {\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \] Input:
integrate(csc(d*x+c)*sec(d*x+c)/(a+b*sin(d*x+c)),x)
Output:
Integral(csc(c + d*x)*sec(c + d*x)/(a + b*sin(c + d*x)), x)
Time = 0.03 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.86 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {2 \, b^{2} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3} - a b^{2}} - \frac {\log \left (\sin \left (d x + c\right ) + 1\right )}{a - b} - \frac {\log \left (\sin \left (d x + c\right ) - 1\right )}{a + b} + \frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a}}{2 \, d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)/(a+b*sin(d*x+c)),x, algorithm="maxima")
Output:
1/2*(2*b^2*log(b*sin(d*x + c) + a)/(a^3 - a*b^2) - log(sin(d*x + c) + 1)/( a - b) - log(sin(d*x + c) - 1)/(a + b) + 2*log(sin(d*x + c))/a)/d
Time = 0.19 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.98 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {b^{3} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3} b d - a b^{3} d} - \frac {\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{2 \, {\left (a d - b d\right )}} - \frac {\log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, {\left (a d + b d\right )}} + \frac {\log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)/(a+b*sin(d*x+c)),x, algorithm="giac")
Output:
b^3*log(abs(b*sin(d*x + c) + a))/(a^3*b*d - a*b^3*d) - 1/2*log(abs(sin(d*x + c) + 1))/(a*d - b*d) - 1/2*log(abs(sin(d*x + c) - 1))/(a*d + b*d) + log (abs(sin(d*x + c)))/(a*d)
Time = 0.10 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.94 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\ln \left (\sin \left (c+d\,x\right )\right )}{a\,d}-\frac {\ln \left (\sin \left (c+d\,x\right )+1\right )}{2\,d\,\left (a-b\right )}-\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )}{2\,d\,\left (a+b\right )}+\frac {b^2\,\ln \left (a+b\,\sin \left (c+d\,x\right )\right )}{a\,d\,\left (a^2-b^2\right )} \] Input:
int(1/(cos(c + d*x)*sin(c + d*x)*(a + b*sin(c + d*x))),x)
Output:
log(sin(c + d*x))/(a*d) - log(sin(c + d*x) + 1)/(2*d*(a - b)) - log(sin(c + d*x) - 1)/(2*d*(a + b)) + (b^2*log(a + b*sin(c + d*x)))/(a*d*(a^2 - b^2) )
Time = 0.18 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.56 \[ \int \frac {\csc (c+d x) \sec (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a b -\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2}-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a b +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) b^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}}{a d \left (a^{2}-b^{2}\right )} \] Input:
int(csc(d*x+c)*sec(d*x+c)/(a+b*sin(d*x+c)),x)
Output:
( - log(tan((c + d*x)/2) - 1)*a**2 + log(tan((c + d*x)/2) - 1)*a*b - log(t an((c + d*x)/2) + 1)*a**2 - log(tan((c + d*x)/2) + 1)*a*b + log(tan((c + d *x)/2)**2*a + 2*tan((c + d*x)/2)*b + a)*b**2 + log(tan((c + d*x)/2))*a**2 - log(tan((c + d*x)/2))*b**2)/(a*d*(a**2 - b**2))