Integrand size = 29, antiderivative size = 71 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {(A+B) \text {arctanh}(\sin (c+d x))}{4 a^2 d}-\frac {A-B}{4 d (a+a \sin (c+d x))^2}-\frac {A+B}{4 d \left (a^2+a^2 \sin (c+d x)\right )} \] Output:
1/4*(A+B)*arctanh(sin(d*x+c))/a^2/d-1/4*(A-B)/d/(a+a*sin(d*x+c))^2-1/4*(A+ B)/d/(a^2+a^2*sin(d*x+c))
Time = 0.16 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.97 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {a \left (\frac {(A+B) \text {arctanh}(\sin (c+d x))}{4 a^3}-\frac {A-B}{4 a (a+a \sin (c+d x))^2}-\frac {A+B}{4 a^2 (a+a \sin (c+d x))}\right )}{d} \] Input:
Integrate[(Sec[c + d*x]*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x])^2,x]
Output:
(a*(((A + B)*ArcTanh[Sin[c + d*x]])/(4*a^3) - (A - B)/(4*a*(a + a*Sin[c + d*x])^2) - (A + B)/(4*a^2*(a + a*Sin[c + d*x]))))/d
Time = 0.33 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3315, 27, 86, 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 {\sec (c+d x) (A+B \sin (c+d x))}{(a \sin (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sin (c+d x)}{\cos (c+d x) (a \sin (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {a \int \frac {a A+a B \sin (c+d x)}{a (a-a \sin (c+d x)) (\sin (c+d x) a+a)^3}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {a A+a B \sin (c+d x)}{(a-a \sin (c+d x)) (\sin (c+d x) a+a)^3}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {\int \left (\frac {A-B}{2 (\sin (c+d x) a+a)^3}+\frac {A+B}{4 a \left (a^2-a^2 \sin ^2(c+d x)\right )}+\frac {A+B}{4 a (\sin (c+d x) a+a)^2}\right )d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {(A+B) \text {arctanh}(\sin (c+d x))}{4 a^2}-\frac {A-B}{4 (a \sin (c+d x)+a)^2}-\frac {A+B}{4 a (a \sin (c+d x)+a)}}{d}\) |
Input:
Int[(Sec[c + d*x]*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x])^2,x]
Output:
(((A + B)*ArcTanh[Sin[c + d*x]])/(4*a^2) - (A - B)/(4*(a + a*Sin[c + d*x]) ^2) - (A + B)/(4*a*(a + a*Sin[c + d*x])))/d
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_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
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 + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
Time = 0.74 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {\left (-\frac {A}{8}-\frac {B}{8}\right ) \ln \left (\sin \left (d x +c \right )-1\right )-\frac {\frac {A}{2}-\frac {B}{2}}{2 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {\frac {B}{4}+\frac {A}{4}}{1+\sin \left (d x +c \right )}+\left (\frac {A}{8}+\frac {B}{8}\right ) \ln \left (1+\sin \left (d x +c \right )\right )}{d \,a^{2}}\) | \(81\) |
default | \(\frac {\left (-\frac {A}{8}-\frac {B}{8}\right ) \ln \left (\sin \left (d x +c \right )-1\right )-\frac {\frac {A}{2}-\frac {B}{2}}{2 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {\frac {B}{4}+\frac {A}{4}}{1+\sin \left (d x +c \right )}+\left (\frac {A}{8}+\frac {B}{8}\right ) \ln \left (1+\sin \left (d x +c \right )\right )}{d \,a^{2}}\) | \(81\) |
parallelrisch | \(\frac {-\left (-3+\cos \left (2 d x +2 c \right )-4 \sin \left (d x +c \right )\right ) \left (A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (-3+\cos \left (2 d x +2 c \right )-4 \sin \left (d x +c \right )\right ) \left (A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+2 A \cos \left (2 d x +2 c \right )+\left (-6 A +2 B \right ) \sin \left (d x +c \right )-2 A}{4 d \,a^{2} \left (-3+\cos \left (2 d x +2 c \right )-4 \sin \left (d x +c \right )\right )}\) | \(131\) |
risch | \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (4 i A \,{\mathrm e}^{i \left (d x +c \right )}+A \,{\mathrm e}^{2 i \left (d x +c \right )}+B \,{\mathrm e}^{2 i \left (d x +c \right )}-A -B \right )}{2 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{4}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{4 d \,a^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{4 d \,a^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{4 d \,a^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{4 d \,a^{2}}\) | \(168\) |
norman | \(\frac {\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d a}+\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d a}+\frac {\left (3 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d a}+\frac {\left (3 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}+\frac {\left (3 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 d a}}{a \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {\left (A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d \,a^{2}}+\frac {\left (A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4 d \,a^{2}}\) | \(196\) |
Input:
int(sec(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE )
Output:
1/d/a^2*((-1/8*A-1/8*B)*ln(sin(d*x+c)-1)-1/2*(1/2*A-1/2*B)/(1+sin(d*x+c))^ 2-(1/4*B+1/4*A)/(1+sin(d*x+c))+(1/8*A+1/8*B)*ln(1+sin(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (65) = 130\).
Time = 0.09 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.89 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {{\left ({\left (A + B\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (A + B\right )} \sin \left (d x + c\right ) - 2 \, A - 2 \, B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left ({\left (A + B\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (A + B\right )} \sin \left (d x + c\right ) - 2 \, A - 2 \, B\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A + B\right )} \sin \left (d x + c\right ) + 4 \, A}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} - 2 \, a^{2} d \sin \left (d x + c\right ) - 2 \, a^{2} d\right )}} \] Input:
integrate(sec(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x, algorithm="fri cas")
Output:
1/8*(((A + B)*cos(d*x + c)^2 - 2*(A + B)*sin(d*x + c) - 2*A - 2*B)*log(sin (d*x + c) + 1) - ((A + B)*cos(d*x + c)^2 - 2*(A + B)*sin(d*x + c) - 2*A - 2*B)*log(-sin(d*x + c) + 1) + 2*(A + B)*sin(d*x + c) + 4*A)/(a^2*d*cos(d*x + c)^2 - 2*a^2*d*sin(d*x + c) - 2*a^2*d)
\[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {\int \frac {A \sec {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sin {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \] Input:
integrate(sec(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))**2,x)
Output:
(Integral(A*sec(c + d*x)/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x) + Inte gral(B*sin(c + d*x)*sec(c + d*x)/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x ))/a**2
Time = 0.03 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.18 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {2 \, {\left ({\left (A + B\right )} \sin \left (d x + c\right ) + 2 \, A\right )}}{a^{2} \sin \left (d x + c\right )^{2} + 2 \, a^{2} \sin \left (d x + c\right ) + a^{2}} - \frac {{\left (A + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} + \frac {{\left (A + B\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{2}}}{8 \, d} \] Input:
integrate(sec(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x, algorithm="max ima")
Output:
-1/8*(2*((A + B)*sin(d*x + c) + 2*A)/(a^2*sin(d*x + c)^2 + 2*a^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^2)/d
Time = 0.13 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.06 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {{\left (A + B\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{8 \, a^{2} d} - \frac {{\left (A + B\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{8 \, a^{2} d} - \frac {{\left (A + B\right )} \sin \left (d x + c\right ) + 2 \, A}{4 \, a^{2} d {\left (\sin \left (d x + c\right ) + 1\right )}^{2}} \] Input:
integrate(sec(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x, algorithm="gia c")
Output:
1/8*(A + B)*log(abs(sin(d*x + c) + 1))/(a^2*d) - 1/8*(A + B)*log(abs(sin(d *x + c) - 1))/(a^2*d) - 1/4*((A + B)*sin(d*x + c) + 2*A)/(a^2*d*(sin(d*x + c) + 1)^2)
Time = 35.43 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )\,\left (A+B\right )}{4\,a^2\,d}-\frac {\frac {A}{2}+\sin \left (c+d\,x\right )\,\left (\frac {A}{4}+\frac {B}{4}\right )}{d\,\left (a^2\,{\sin \left (c+d\,x\right )}^2+2\,a^2\,\sin \left (c+d\,x\right )+a^2\right )} \] Input:
int((A + B*sin(c + d*x))/(cos(c + d*x)*(a + a*sin(c + d*x))^2),x)
Output:
(atanh(sin(c + d*x))*(A + B))/(4*a^2*d) - (A/2 + sin(c + d*x)*(A/4 + B/4)) /(d*(2*a^2*sin(c + d*x) + a^2 + a^2*sin(c + d*x)^2))
Time = 0.18 (sec) , antiderivative size = 289, normalized size of antiderivative = 4.07 \[ \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b -4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right ) a -4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right ) b -2 \,\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 ) b +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right ) a +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right ) b +2 \,\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 ) b +\sin \left (d x +c \right )^{2} a +\sin \left (d x +c \right )^{2} b -3 a +b}{8 a^{2} d \left (\sin \left (d x +c \right )^{2}+2 \sin \left (d x +c \right )+1\right )} \] Input:
int(sec(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x)
Output:
( - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b - 4*log(tan((c + d*x)/2) - 1)*sin(c + d*x)*a - 4*l og(tan((c + d*x)/2) - 1)*sin(c + d*x)*b - 2*log(tan((c + d*x)/2) - 1)*a - 2*log(tan((c + d*x)/2) - 1)*b + 2*log(tan((c + d*x)/2) + 1)*sin(c + d*x)** 2*a + 2*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b + 4*log(tan((c + d*x)/ 2) + 1)*sin(c + d*x)*a + 4*log(tan((c + d*x)/2) + 1)*sin(c + d*x)*b + 2*lo g(tan((c + d*x)/2) + 1)*a + 2*log(tan((c + d*x)/2) + 1)*b + sin(c + d*x)** 2*a + sin(c + d*x)**2*b - 3*a + b)/(8*a**2*d*(sin(c + d*x)**2 + 2*sin(c + d*x) + 1))