Integrand size = 31, antiderivative size = 123 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {(2 A+B) \text {arctanh}(\sin (c+d x))}{8 a^2 d}-\frac {a (A-B)}{12 d (a+a \sin (c+d x))^3}-\frac {A}{8 d (a+a \sin (c+d x))^2}+\frac {A+B}{16 d \left (a^2-a^2 \sin (c+d x)\right )}-\frac {3 A+B}{16 d \left (a^2+a^2 \sin (c+d x)\right )} \] Output:
1/8*(2*A+B)*arctanh(sin(d*x+c))/a^2/d-1/12*a*(A-B)/d/(a+a*sin(d*x+c))^3-1/ 8*A/d/(a+a*sin(d*x+c))^2+1/16*(A+B)/d/(a^2-a^2*sin(d*x+c))-1/16*(3*A+B)/d/ (a^2+a^2*sin(d*x+c))
Time = 0.78 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.71 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=-\frac {-6 (2 A+B) \text {arctanh}(\sin (c+d x))+\frac {3 (A+B)}{-1+\sin (c+d x)}+\frac {4 (A-B)}{(1+\sin (c+d x))^3}+\frac {6 A}{(1+\sin (c+d x))^2}+\frac {3 (3 A+B)}{1+\sin (c+d x)}}{48 a^2 d} \] Input:
Integrate[(Sec[c + d*x]^3*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x])^2,x]
Output:
-1/48*(-6*(2*A + B)*ArcTanh[Sin[c + d*x]] + (3*(A + B))/(-1 + Sin[c + d*x] ) + (4*(A - B))/(1 + Sin[c + d*x])^3 + (6*A)/(1 + Sin[c + d*x])^2 + (3*(3* A + B))/(1 + Sin[c + d*x]))/(a^2*d)
Time = 0.38 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, 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 ^3(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)^3 (a \sin (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {a^3 \int \frac {a A+a B \sin (c+d x)}{a (a-a \sin (c+d x))^2 (\sin (c+d x) a+a)^4}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a^2 \int \frac {a A+a B \sin (c+d x)}{(a-a \sin (c+d x))^2 (\sin (c+d x) a+a)^4}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {a^2 \int \left (\frac {A}{4 a^2 (\sin (c+d x) a+a)^3}+\frac {2 A+B}{8 a^3 \left (a^2-a^2 \sin ^2(c+d x)\right )}+\frac {A+B}{16 a^3 (a-a \sin (c+d x))^2}+\frac {3 A+B}{16 a^3 (\sin (c+d x) a+a)^2}+\frac {A-B}{4 a (\sin (c+d x) a+a)^4}\right )d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \left (\frac {(2 A+B) \text {arctanh}(\sin (c+d x))}{8 a^4}+\frac {A+B}{16 a^3 (a-a \sin (c+d x))}-\frac {3 A+B}{16 a^3 (a \sin (c+d x)+a)}-\frac {A}{8 a^2 (a \sin (c+d x)+a)^2}-\frac {A-B}{12 a (a \sin (c+d x)+a)^3}\right )}{d}\) |
Input:
Int[(Sec[c + d*x]^3*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x])^2,x]
Output:
(a^2*(((2*A + B)*ArcTanh[Sin[c + d*x]])/(8*a^4) + (A + B)/(16*a^3*(a - a*S in[c + d*x])) - (A - B)/(12*a*(a + a*Sin[c + d*x])^3) - A/(8*a^2*(a + a*Si n[c + d*x])^2) - (3*A + B)/(16*a^3*(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 = 1.31 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.92
method | result | size |
derivativedivides | \(\frac {-\frac {\frac {A}{16}+\frac {B}{16}}{\sin \left (d x +c \right )-1}+\left (-\frac {A}{8}-\frac {B}{16}\right ) \ln \left (\sin \left (d x +c \right )-1\right )-\frac {A}{8 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {\frac {A}{4}-\frac {B}{4}}{3 \left (1+\sin \left (d x +c \right )\right )^{3}}+\left (\frac {A}{8}+\frac {B}{16}\right ) \ln \left (1+\sin \left (d x +c \right )\right )-\frac {\frac {3 A}{16}+\frac {B}{16}}{1+\sin \left (d x +c \right )}}{d \,a^{2}}\) | \(113\) |
default | \(\frac {-\frac {\frac {A}{16}+\frac {B}{16}}{\sin \left (d x +c \right )-1}+\left (-\frac {A}{8}-\frac {B}{16}\right ) \ln \left (\sin \left (d x +c \right )-1\right )-\frac {A}{8 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {\frac {A}{4}-\frac {B}{4}}{3 \left (1+\sin \left (d x +c \right )\right )^{3}}+\left (\frac {A}{8}+\frac {B}{16}\right ) \ln \left (1+\sin \left (d x +c \right )\right )-\frac {\frac {3 A}{16}+\frac {B}{16}}{1+\sin \left (d x +c \right )}}{d \,a^{2}}\) | \(113\) |
parallelrisch | \(\frac {-24 \left (\frac {5}{4}-\frac {\cos \left (4 d x +4 c \right )}{4}+\sin \left (3 d x +3 c \right )+\sin \left (d x +c \right )+\cos \left (2 d x +2 c \right )\right ) \left (A +\frac {B}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+24 \left (\frac {5}{4}-\frac {\cos \left (4 d x +4 c \right )}{4}+\sin \left (3 d x +3 c \right )+\sin \left (d x +c \right )+\cos \left (2 d x +2 c \right )\right ) \left (A +\frac {B}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-16 A -32 B \right ) \cos \left (2 d x +2 c \right )+\left (-8 A +2 B \right ) \cos \left (4 d x +4 c \right )+\left (20 A -14 B \right ) \sin \left (3 d x +3 c \right )+\left (84 A +18 B \right ) \sin \left (d x +c \right )+24 A +30 B}{24 d \,a^{2} \left (-\cos \left (4 d x +4 c \right )+5+4 \sin \left (3 d x +3 c \right )+4 \sin \left (d x +c \right )+4 \cos \left (2 d x +2 c \right )\right )}\) | \(238\) |
risch | \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (24 i A \,{\mathrm e}^{5 i \left (d x +c \right )}+6 A \,{\mathrm e}^{6 i \left (d x +c \right )}+12 i B \,{\mathrm e}^{5 i \left (d x +c \right )}+3 B \,{\mathrm e}^{6 i \left (d x +c \right )}+16 i A \,{\mathrm e}^{3 i \left (d x +c \right )}-26 A \,{\mathrm e}^{4 i \left (d x +c \right )}-40 i B \,{\mathrm e}^{3 i \left (d x +c \right )}-13 B \,{\mathrm e}^{4 i \left (d x +c \right )}+24 i A \,{\mathrm e}^{i \left (d x +c \right )}+26 A \,{\mathrm e}^{2 i \left (d x +c \right )}+12 i B \,{\mathrm e}^{i \left (d x +c \right )}+13 B \,{\mathrm e}^{2 i \left (d x +c \right )}-6 A -3 B \right )}{12 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{6} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{2} 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}{8 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}{8 d \,a^{2}}\) | \(313\) |
norman | \(\frac {\frac {\left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d a}+\frac {\left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d a}+\frac {4 \left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d a}+\frac {4 \left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d a}+\frac {\left (14 A +19 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{6 d a}+\frac {\left (2 A +13 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3 d a}+\frac {\left (2 A +13 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3 d a}+\frac {\left (6 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d a}+\frac {\left (6 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}-\frac {\left (2 A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d \,a^{2}}+\frac {\left (2 A +B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d \,a^{2}}\) | \(320\) |
Input:
int(sec(d*x+c)^3*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBO SE)
Output:
1/d/a^2*(-(1/16*A+1/16*B)/(sin(d*x+c)-1)+(-1/8*A-1/16*B)*ln(sin(d*x+c)-1)- 1/8*A/(1+sin(d*x+c))^2-1/3*(1/4*A-1/4*B)/(1+sin(d*x+c))^3+(1/8*A+1/16*B)*l n(1+sin(d*x+c))-(3/16*A+1/16*B)/(1+sin(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 230 vs. \(2 (114) = 228\).
Time = 0.10 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.87 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {12 \, {\left (2 \, A + B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left ({\left (2 \, A + B\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (2 \, A + B\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - 2 \, {\left (2 \, A + B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (2 \, A + B\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (2 \, A + B\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - 2 \, {\left (2 \, A + B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (3 \, {\left (2 \, A + B\right )} \cos \left (d x + c\right )^{2} - 8 \, A - 4 \, B\right )} \sin \left (d x + c\right ) - 8 \, A - 16 \, B}{48 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} - 2 \, a^{2} d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )^{2}\right )}} \] Input:
integrate(sec(d*x+c)^3*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x, algorithm="f ricas")
Output:
1/48*(12*(2*A + B)*cos(d*x + c)^2 + 3*((2*A + B)*cos(d*x + c)^4 - 2*(2*A + B)*cos(d*x + c)^2*sin(d*x + c) - 2*(2*A + B)*cos(d*x + c)^2)*log(sin(d*x + c) + 1) - 3*((2*A + B)*cos(d*x + c)^4 - 2*(2*A + B)*cos(d*x + c)^2*sin(d *x + c) - 2*(2*A + B)*cos(d*x + c)^2)*log(-sin(d*x + c) + 1) + 2*(3*(2*A + B)*cos(d*x + c)^2 - 8*A - 4*B)*sin(d*x + c) - 8*A - 16*B)/(a^2*d*cos(d*x + c)^4 - 2*a^2*d*cos(d*x + c)^2*sin(d*x + c) - 2*a^2*d*cos(d*x + c)^2)
\[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {\int \frac {A \sec ^{3}{\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 ^{3}{\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)**3*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))**2,x)
Output:
(Integral(A*sec(c + d*x)**3/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x) + I ntegral(B*sin(c + d*x)*sec(c + d*x)**3/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x))/a**2
Time = 0.04 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.13 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {2 \, {\left (3 \, {\left (2 \, A + B\right )} \sin \left (d x + c\right )^{3} + 6 \, {\left (2 \, A + B\right )} \sin \left (d x + c\right )^{2} + {\left (2 \, A + B\right )} \sin \left (d x + c\right ) - 8 \, A + 2 \, B\right )}}{a^{2} \sin \left (d x + c\right )^{4} + 2 \, a^{2} \sin \left (d x + c\right )^{3} - 2 \, a^{2} \sin \left (d x + c\right ) - a^{2}} - \frac {3 \, {\left (2 \, A + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} + \frac {3 \, {\left (2 \, A + B\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{2}}}{48 \, d} \] Input:
integrate(sec(d*x+c)^3*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x, algorithm="m axima")
Output:
-1/48*(2*(3*(2*A + B)*sin(d*x + c)^3 + 6*(2*A + B)*sin(d*x + c)^2 + (2*A + B)*sin(d*x + c) - 8*A + 2*B)/(a^2*sin(d*x + c)^4 + 2*a^2*sin(d*x + c)^3 - 2*a^2*sin(d*x + c) - a^2) - 3*(2*A + B)*log(sin(d*x + c) + 1)/a^2 + 3*(2* A + B)*log(sin(d*x + c) - 1)/a^2)/d
Time = 0.13 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.01 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {{\left (2 \, A + B\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{16 \, a^{2} d} - \frac {{\left (2 \, A + B\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{16 \, a^{2} d} - \frac {3 \, {\left (2 \, A + B\right )} \sin \left (d x + c\right )^{3} + 6 \, {\left (2 \, A + B\right )} \sin \left (d x + c\right )^{2} + {\left (2 \, A + B\right )} \sin \left (d x + c\right ) - 8 \, A + 2 \, B}{24 \, a^{2} d {\left (\sin \left (d x + c\right ) + 1\right )}^{3} {\left (\sin \left (d x + c\right ) - 1\right )}} \] Input:
integrate(sec(d*x+c)^3*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x, algorithm="g iac")
Output:
1/16*(2*A + B)*log(abs(sin(d*x + c) + 1))/(a^2*d) - 1/16*(2*A + B)*log(abs (sin(d*x + c) - 1))/(a^2*d) - 1/24*(3*(2*A + B)*sin(d*x + c)^3 + 6*(2*A + B)*sin(d*x + c)^2 + (2*A + B)*sin(d*x + c) - 8*A + 2*B)/(a^2*d*(sin(d*x + c) + 1)^3*(sin(d*x + c) - 1))
Time = 0.17 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.98 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {\left (\frac {A}{4}+\frac {B}{8}\right )\,{\sin \left (c+d\,x\right )}^3+\left (\frac {A}{2}+\frac {B}{4}\right )\,{\sin \left (c+d\,x\right )}^2+\left (\frac {A}{12}+\frac {B}{24}\right )\,\sin \left (c+d\,x\right )-\frac {A}{3}+\frac {B}{12}}{d\,\left (-a^2\,{\sin \left (c+d\,x\right )}^4-2\,a^2\,{\sin \left (c+d\,x\right )}^3+2\,a^2\,\sin \left (c+d\,x\right )+a^2\right )}+\frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )\,\left (2\,A+B\right )}{8\,a^2\,d} \] Input:
int((A + B*sin(c + d*x))/(cos(c + d*x)^3*(a + a*sin(c + d*x))^2),x)
Output:
(B/12 - A/3 + sin(c + d*x)*(A/12 + B/24) + sin(c + d*x)^2*(A/2 + B/4) + si n(c + d*x)^3*(A/4 + B/8))/(d*(2*a^2*sin(c + d*x) + a^2 - 2*a^2*sin(c + d*x )^3 - a^2*sin(c + d*x)^4)) + (atanh(sin(c + d*x))*(2*A + B))/(8*a^2*d)
Time = 0.19 (sec) , antiderivative size = 439, normalized size of antiderivative = 3.57 \[ \int \frac {\sec ^3(c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx=\frac {-12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4} a -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4} b -24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{3} a -12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{3} b +24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right ) a +12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right ) b +12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b +12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4} a +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4} b +24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{3} a +12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{3} b -24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right ) a -12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right ) b -12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b -2 \sin \left (d x +c \right )^{4} a -\sin \left (d x +c \right )^{4} b -16 \sin \left (d x +c \right )^{3} a -8 \sin \left (d x +c \right )^{3} b -24 \sin \left (d x +c \right )^{2} a -12 \sin \left (d x +c \right )^{2} b +18 a -3 b}{48 a^{2} d \left (\sin \left (d x +c \right )^{4}+2 \sin \left (d x +c \right )^{3}-2 \sin \left (d x +c \right )-1\right )} \] Input:
int(sec(d*x+c)^3*(A+B*sin(d*x+c))/(a+a*sin(d*x+c))^2,x)
Output:
( - 12*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*a - 6*log(tan((c + d*x)/2 ) - 1)*sin(c + d*x)**4*b - 24*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**3*a - 12*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**3*b + 24*log(tan((c + d*x)/2) - 1)*sin(c + d*x)*a + 12*log(tan((c + d*x)/2) - 1)*sin(c + d*x)*b + 12*lo g(tan((c + d*x)/2) - 1)*a + 6*log(tan((c + d*x)/2) - 1)*b + 12*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*a + 6*log(tan((c + d*x)/2) + 1)*sin(c + d*x )**4*b + 24*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**3*a + 12*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**3*b - 24*log(tan((c + d*x)/2) + 1)*sin(c + d*x) *a - 12*log(tan((c + d*x)/2) + 1)*sin(c + d*x)*b - 12*log(tan((c + d*x)/2) + 1)*a - 6*log(tan((c + d*x)/2) + 1)*b - 2*sin(c + d*x)**4*a - sin(c + d* x)**4*b - 16*sin(c + d*x)**3*a - 8*sin(c + d*x)**3*b - 24*sin(c + d*x)**2* a - 12*sin(c + d*x)**2*b + 18*a - 3*b)/(48*a**2*d*(sin(c + d*x)**4 + 2*sin (c + d*x)**3 - 2*sin(c + d*x) - 1))