Integrand size = 21, antiderivative size = 267 \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {\left (a^2-12 b^2\right ) x}{2 a^5}-\frac {b \left (6 a^4-19 a^2 b^2+12 b^4\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^5 (a-b)^{3/2} (a+b)^{3/2} d}+\frac {b \left (11 a^2-12 b^2\right ) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right ) d}-\frac {\left (5 a^2-6 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right ) d}+\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a d (b+a \cos (c+d x))^2}+\frac {\left (3 a^2-4 b^2\right ) \cos ^2(c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right ) d (b+a \cos (c+d x))} \] Output:
1/2*(a^2-12*b^2)*x/a^5-b*(6*a^4-19*a^2*b^2+12*b^4)*arctanh((a-b)^(1/2)*tan (1/2*d*x+1/2*c)/(a+b)^(1/2))/a^5/(a-b)^(3/2)/(a+b)^(3/2)/d+1/2*b*(11*a^2-1 2*b^2)*sin(d*x+c)/a^4/(a^2-b^2)/d-1/2*(5*a^2-6*b^2)*cos(d*x+c)*sin(d*x+c)/ a^3/(a^2-b^2)/d+1/2*cos(d*x+c)^3*sin(d*x+c)/a/d/(b+a*cos(d*x+c))^2+1/2*(3* a^2-4*b^2)*cos(d*x+c)^2*sin(d*x+c)/a^2/(a^2-b^2)/d/(b+a*cos(d*x+c))
Time = 2.44 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.06 \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {\frac {4 b \left (6 a^4-19 a^2 b^2+12 b^4\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {4 a b \left (a^4-13 a^2 b^2+12 b^4\right ) (c+d x) \cos (c+d x)-2 a^4 \left (a^2-b^2\right ) \cos ^3(c+d x) \sin (c+d x)+2 a^2 \left (a^2-b^2\right ) \cos ^2(c+d x) \left (\left (a^2-12 b^2\right ) (c+d x)+4 a b \sin (c+d x)\right )+b^2 \left (2 \left (a^4-13 a^2 b^2+12 b^4\right ) (c+d x)+\left (22 a^3 b-24 a b^3\right ) \sin (c+d x)+\left (17 a^4-18 a^2 b^2\right ) \sin (2 (c+d x))\right )}{(b+a \cos (c+d x))^2}}{4 a^5 (a-b) (a+b) d} \] Input:
Integrate[Sin[c + d*x]^2/(a + b*Sec[c + d*x])^3,x]
Output:
((4*b*(6*a^4 - 19*a^2*b^2 + 12*b^4)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sq rt[a^2 - b^2]])/Sqrt[a^2 - b^2] + (4*a*b*(a^4 - 13*a^2*b^2 + 12*b^4)*(c + d*x)*Cos[c + d*x] - 2*a^4*(a^2 - b^2)*Cos[c + d*x]^3*Sin[c + d*x] + 2*a^2* (a^2 - b^2)*Cos[c + d*x]^2*((a^2 - 12*b^2)*(c + d*x) + 4*a*b*Sin[c + d*x]) + b^2*(2*(a^4 - 13*a^2*b^2 + 12*b^4)*(c + d*x) + (22*a^3*b - 24*a*b^3)*Si n[c + d*x] + (17*a^4 - 18*a^2*b^2)*Sin[2*(c + d*x)]))/(b + a*Cos[c + d*x]) ^2)/(4*a^5*(a - b)*(a + b)*d)
Time = 1.87 (sec) , antiderivative size = 308, normalized size of antiderivative = 1.15, number of steps used = 21, number of rules used = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.952, Rules used = {3042, 4360, 25, 25, 3042, 3368, 3042, 3527, 3042, 3527, 3042, 3528, 27, 3042, 3502, 3042, 3214, 3042, 3138, 221}
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 {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos \left (c+d x-\frac {\pi }{2}\right )^2}{\left (a-b \csc \left (c+d x-\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int -\frac {\sin ^2(c+d x) \cos ^3(c+d x)}{(-a \cos (c+d x)-b)^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int -\frac {\cos ^3(c+d x) \sin ^2(c+d x)}{(b+a \cos (c+d x))^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {\sin ^2(c+d x) \cos ^3(c+d x)}{(a \cos (c+d x)+b)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^3 \cos \left (c+d x+\frac {\pi }{2}\right )^2}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+b\right )^3}dx\) |
\(\Big \downarrow \) 3368 |
\(\displaystyle \int \frac {\cos ^3(c+d x) \left (1-\cos ^2(c+d x)\right )}{(a \cos (c+d x)+b)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (1-\sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+b\right )^3}dx\) |
\(\Big \downarrow \) 3527 |
\(\displaystyle \frac {\int \frac {\cos ^2(c+d x) \left (3 \left (a^2-b^2\right )-4 \left (a^2-b^2\right ) \cos ^2(c+d x)\right )}{(b+a \cos (c+d x))^2}dx}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (3 \left (a^2-b^2\right )-4 \left (a^2-b^2\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (b+a \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3527 |
\(\displaystyle \frac {\frac {\int \frac {\cos (c+d x) \left (-2 \left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \cos ^2(c+d x)+a b \left (a^2-b^2\right ) \cos (c+d x)+2 \left (3 a^4-7 b^2 a^2+4 b^4\right )\right )}{b+a \cos (c+d x)}dx}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (-2 \left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2+a b \left (a^2-b^2\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+2 \left (3 a^4-7 b^2 a^2+4 b^4\right )\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3528 |
\(\displaystyle \frac {\frac {\frac {\int -\frac {2 \left (-b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \cos ^2(c+d x)-a \left (a^4-3 b^2 a^2+2 b^4\right ) \cos (c+d x)+b \left (5 a^4-11 b^2 a^2+6 b^4\right )\right )}{b+a \cos (c+d x)}dx}{2 a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {-\frac {\int \frac {-b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \cos ^2(c+d x)-a \left (a^4-3 b^2 a^2+2 b^4\right ) \cos (c+d x)+b \left (5 a^4-11 b^2 a^2+6 b^4\right )}{b+a \cos (c+d x)}dx}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {-\frac {\int \frac {-b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2-a \left (a^4-3 b^2 a^2+2 b^4\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+b \left (5 a^4-11 b^2 a^2+6 b^4\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {-\frac {\frac {\int \frac {a b \left (5 a^4-11 b^2 a^2+6 b^4\right )-\left (a^2-12 b^2\right ) \left (a^2-b^2\right )^2 \cos (c+d x)}{b+a \cos (c+d x)}dx}{a}-\frac {b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x)}{a d}}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {-\frac {\frac {\int \frac {a b \left (5 a^4-11 b^2 a^2+6 b^4\right )-\left (a^2-12 b^2\right ) \left (a^2-b^2\right )^2 \sin \left (c+d x+\frac {\pi }{2}\right )}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a}-\frac {b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x)}{a d}}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {-\frac {\frac {\frac {b \left (6 a^6-25 a^4 b^2+31 a^2 b^4-12 b^6\right ) \int \frac {1}{b+a \cos (c+d x)}dx}{a}-\frac {x \left (a^2-12 b^2\right ) \left (a^2-b^2\right )^2}{a}}{a}-\frac {b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x)}{a d}}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {-\frac {\frac {\frac {b \left (6 a^6-25 a^4 b^2+31 a^2 b^4-12 b^6\right ) \int \frac {1}{b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a}-\frac {x \left (a^2-12 b^2\right ) \left (a^2-b^2\right )^2}{a}}{a}-\frac {b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x)}{a d}}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {-\frac {\frac {\frac {2 b \left (6 a^6-25 a^4 b^2+31 a^2 b^4-12 b^6\right ) \int \frac {1}{-\left ((a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{a d}-\frac {x \left (a^2-12 b^2\right ) \left (a^2-b^2\right )^2}{a}}{a}-\frac {b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x)}{a d}}{a}-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\left (3 a^2-4 b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{a d (a \cos (c+d x)+b)}+\frac {-\frac {\left (5 a^2-6 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {\frac {2 b \left (6 a^6-25 a^4 b^2+31 a^2 b^4-12 b^6\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}-\frac {x \left (a^2-12 b^2\right ) \left (a^2-b^2\right )^2}{a}}{a}-\frac {b \left (11 a^2-12 b^2\right ) \left (a^2-b^2\right ) \sin (c+d x)}{a d}}{a}}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a d (a \cos (c+d x)+b)^2}\) |
Input:
Int[Sin[c + d*x]^2/(a + b*Sec[c + d*x])^3,x]
Output:
(Cos[c + d*x]^3*Sin[c + d*x])/(2*a*d*(b + a*Cos[c + d*x])^2) + (((3*a^2 - 4*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(a*d*(b + a*Cos[c + d*x])) + (-(((5*a^ 2 - 6*b^2)*(a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(a*d)) - ((-(((a^2 - 12* b^2)*(a^2 - b^2)^2*x)/a) + (2*b*(6*a^6 - 25*a^4*b^2 + 31*a^2*b^4 - 12*b^6) *ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[ a + b]*d))/a - (b*(11*a^2 - 12*b^2)*(a^2 - b^2)*Sin[c + d*x])/(a*d))/a)/(a *(a^2 - b^2)))/(2*a*(a^2 - b^2))
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_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
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[cos[(e_.) + (f_.)*(x_)]^2*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^m*(1 - Sin[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, m, n }, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n])
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C + A*d^2))*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^ 2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A* d*(b*d*m + a*c*(n + 1)) + c*C*(b*c*m + a*d*(n + 1)) - (A*d*(a*d*(n + 2) - b *c*(n + 1)) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b*( A*d^2*(m + n + 2) + C*(c^2*(m + 1) + d^2*(n + 1)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e + f*x ])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Simp[1/(d*(m + n + 2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A* d*(m + n + 2) + C*(b*c*m + a*d*(n + 1)) + (d*(A*b + a*B)*(m + n + 2) - C*(a *c - b*d*(m + n + 1)))*Sin[e + f*x] + (C*(a*d*m - b*c*(m + 1)) + b*B*d*(m + n + 2))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n} , x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[ m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
Time = 0.86 (sec) , antiderivative size = 276, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {\frac {\frac {2 \left (\left (\frac {1}{2} a^{2}+3 a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (3 a b -\frac {1}{2} a^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\left (a^{2}-12 b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{5}}+\frac {2 b \left (\frac {-\frac {\left (6 a^{2}+a b -6 b^{2}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a +b \right )}+\frac {\left (6 a^{2}-a b -6 b^{2}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a -2 b}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (6 a^{4}-19 a^{2} b^{2}+12 b^{4}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{2}-b^{2}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{5}}}{d}\) | \(276\) |
default | \(\frac {\frac {\frac {2 \left (\left (\frac {1}{2} a^{2}+3 a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (3 a b -\frac {1}{2} a^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\left (a^{2}-12 b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{5}}+\frac {2 b \left (\frac {-\frac {\left (6 a^{2}+a b -6 b^{2}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a +b \right )}+\frac {\left (6 a^{2}-a b -6 b^{2}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a -2 b}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (6 a^{4}-19 a^{2} b^{2}+12 b^{4}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{2}-b^{2}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{5}}}{d}\) | \(276\) |
risch | \(\frac {x}{2 a^{3}}-\frac {6 x \,b^{2}}{a^{5}}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 a^{3} d}-\frac {3 i b \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{4} d}+\frac {3 i b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{4} d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{3} d}+\frac {i b^{2} \left (-7 a^{3} b \,{\mathrm e}^{3 i \left (d x +c \right )}+8 a \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-6 a^{4} {\mathrm e}^{2 i \left (d x +c \right )}-5 a^{2} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+14 b^{4} {\mathrm e}^{2 i \left (d x +c \right )}-17 a^{3} b \,{\mathrm e}^{i \left (d x +c \right )}+20 a \,b^{3} {\mathrm e}^{i \left (d x +c \right )}-6 a^{4}+7 a^{2} b^{2}\right )}{a^{5} \left (-a^{2}+b^{2}\right ) d \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )^{2}}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d a}+\frac {19 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,a^{3}}-\frac {6 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,a^{5}}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d a}-\frac {19 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right )}{2 \sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,a^{3}}+\frac {6 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,a^{5}}\) | \(778\) |
Input:
int(sin(d*x+c)^2/(a+b*sec(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/d*(2/a^5*(((1/2*a^2+3*a*b)*tan(1/2*d*x+1/2*c)^3+(3*a*b-1/2*a^2)*tan(1/2* d*x+1/2*c))/(1+tan(1/2*d*x+1/2*c)^2)^2+1/2*(a^2-12*b^2)*arctan(tan(1/2*d*x +1/2*c)))+2*b/a^5*((-1/2*(6*a^2+a*b-6*b^2)*a*b/(a+b)*tan(1/2*d*x+1/2*c)^3+ 1/2*(6*a^2-a*b-6*b^2)*a*b/(a-b)*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2* a-tan(1/2*d*x+1/2*c)^2*b-a-b)^2-1/2*(6*a^4-19*a^2*b^2+12*b^4)/(a^2-b^2)/(( a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))))
Time = 0.15 (sec) , antiderivative size = 984, normalized size of antiderivative = 3.69 \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx =\text {Too large to display} \] Input:
integrate(sin(d*x+c)^2/(a+b*sec(d*x+c))^3,x, algorithm="fricas")
Output:
[1/4*(2*(a^8 - 14*a^6*b^2 + 25*a^4*b^4 - 12*a^2*b^6)*d*x*cos(d*x + c)^2 + 4*(a^7*b - 14*a^5*b^3 + 25*a^3*b^5 - 12*a*b^7)*d*x*cos(d*x + c) + 2*(a^6*b ^2 - 14*a^4*b^4 + 25*a^2*b^6 - 12*b^8)*d*x - (6*a^4*b^3 - 19*a^2*b^5 + 12* b^7 + (6*a^6*b - 19*a^4*b^3 + 12*a^2*b^5)*cos(d*x + c)^2 + 2*(6*a^5*b^2 - 19*a^3*b^4 + 12*a*b^6)*cos(d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a) *sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^ 2)) + 2*(11*a^5*b^3 - 23*a^3*b^5 + 12*a*b^7 - (a^8 - 2*a^6*b^2 + a^4*b^4)* cos(d*x + c)^3 + 4*(a^7*b - 2*a^5*b^3 + a^3*b^5)*cos(d*x + c)^2 + (17*a^6* b^2 - 35*a^4*b^4 + 18*a^2*b^6)*cos(d*x + c))*sin(d*x + c))/((a^11 - 2*a^9* b^2 + a^7*b^4)*d*cos(d*x + c)^2 + 2*(a^10*b - 2*a^8*b^3 + a^6*b^5)*d*cos(d *x + c) + (a^9*b^2 - 2*a^7*b^4 + a^5*b^6)*d), 1/2*((a^8 - 14*a^6*b^2 + 25* a^4*b^4 - 12*a^2*b^6)*d*x*cos(d*x + c)^2 + 2*(a^7*b - 14*a^5*b^3 + 25*a^3* b^5 - 12*a*b^7)*d*x*cos(d*x + c) + (a^6*b^2 - 14*a^4*b^4 + 25*a^2*b^6 - 12 *b^8)*d*x - (6*a^4*b^3 - 19*a^2*b^5 + 12*b^7 + (6*a^6*b - 19*a^4*b^3 + 12* a^2*b^5)*cos(d*x + c)^2 + 2*(6*a^5*b^2 - 19*a^3*b^4 + 12*a*b^6)*cos(d*x + c))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c))) + (11*a^5*b^3 - 23*a^3*b^5 + 12*a*b^7 - (a^8 - 2*a^6* b^2 + a^4*b^4)*cos(d*x + c)^3 + 4*(a^7*b - 2*a^5*b^3 + a^3*b^5)*cos(d*x + c)^2 + (17*a^6*b^2 - 35*a^4*b^4 + 18*a^2*b^6)*cos(d*x + c))*sin(d*x + c...
\[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx=\int \frac {\sin ^{2}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{3}}\, dx \] Input:
integrate(sin(d*x+c)**2/(a+b*sec(d*x+c))**3,x)
Output:
Integral(sin(c + d*x)**2/(a + b*sec(c + d*x))**3, x)
Exception generated. \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sin(d*x+c)^2/(a+b*sec(d*x+c))^3,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 1193 vs. \(2 (248) = 496\).
Time = 0.31 (sec) , antiderivative size = 1193, normalized size of antiderivative = 4.47 \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \] Input:
integrate(sin(d*x+c)^2/(a+b*sec(d*x+c))^3,x, algorithm="giac")
Output:
1/2*((a^11 - 7*a^10*b - 14*a^9*b^2 + 39*a^8*b^3 + 25*a^7*b^4 - 56*a^6*b^5 - 12*a^5*b^6 + 24*a^4*b^7 - a^4*abs(-a^7 + a^5*b^2) - 5*a^3*b*abs(-a^7 + a ^5*b^2) + 13*a^2*b^2*abs(-a^7 + a^5*b^2) + 6*a*b^3*abs(-a^7 + a^5*b^2) - 1 2*b^4*abs(-a^7 + a^5*b^2))*(pi*floor(1/2*(d*x + c)/pi + 1/2) + arctan(tan( 1/2*d*x + 1/2*c)/sqrt(-(a^6*b - a^4*b^3 + sqrt((a^7 + a^6*b - a^5*b^2 - a^ 4*b^3)*(a^7 - a^6*b - a^5*b^2 + a^4*b^3) + (a^6*b - a^4*b^3)^2))/(a^7 - a^ 6*b - a^5*b^2 + a^4*b^3))))/(a^6*b*abs(-a^7 + a^5*b^2) - a^4*b^3*abs(-a^7 + a^5*b^2) + (a^7 - a^5*b^2)^2) + ((a^4 + 5*a^3*b - 13*a^2*b^2 - 6*a*b^3 + 12*b^4)*sqrt(-a^2 + b^2)*abs(-a^7 + a^5*b^2)*abs(-a + b) + (a^11 - 7*a^10 *b - 14*a^9*b^2 + 39*a^8*b^3 + 25*a^7*b^4 - 56*a^6*b^5 - 12*a^5*b^6 + 24*a ^4*b^7)*sqrt(-a^2 + b^2)*abs(-a + b))*(pi*floor(1/2*(d*x + c)/pi + 1/2) + arctan(tan(1/2*d*x + 1/2*c)/sqrt(-(a^6*b - a^4*b^3 - sqrt((a^7 + a^6*b - a ^5*b^2 - a^4*b^3)*(a^7 - a^6*b - a^5*b^2 + a^4*b^3) + (a^6*b - a^4*b^3)^2) )/(a^7 - a^6*b - a^5*b^2 + a^4*b^3))))/((a^7 - a^5*b^2)^2*(a^2 - 2*a*b + b ^2) - (a^8*b - 2*a^7*b^2 + 2*a^5*b^4 - a^4*b^5)*abs(-a^7 + a^5*b^2)) + 2*( a^5*tan(1/2*d*x + 1/2*c)^7 + 4*a^4*b*tan(1/2*d*x + 1/2*c)^7 - 18*a^3*b^2*t an(1/2*d*x + 1/2*c)^7 + 7*a^2*b^3*tan(1/2*d*x + 1/2*c)^7 + 18*a*b^4*tan(1/ 2*d*x + 1/2*c)^7 - 12*b^5*tan(1/2*d*x + 1/2*c)^7 - 3*a^5*tan(1/2*d*x + 1/2 *c)^5 - 4*a^4*b*tan(1/2*d*x + 1/2*c)^5 - 14*a^3*b^2*tan(1/2*d*x + 1/2*c)^5 + 37*a^2*b^3*tan(1/2*d*x + 1/2*c)^5 + 18*a*b^4*tan(1/2*d*x + 1/2*c)^5 ...
Time = 19.68 (sec) , antiderivative size = 4026, normalized size of antiderivative = 15.08 \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \] Input:
int(sin(c + d*x)^2/(a + b/cos(c + d*x))^3,x)
Output:
((tan(c/2 + (d*x)/2)*(6*a*b^3 - 5*a^3*b + a^4 + 12*b^4 - 13*a^2*b^2))/(a^4 *b - a^5) + (tan(c/2 + (d*x)/2)^3*(18*a*b^4 + 4*a^4*b - 3*a^5 + 36*b^5 - 3 7*a^2*b^3 - 14*a^3*b^2))/((a^4*b - a^5)*(a + b)) + (tan(c/2 + (d*x)/2)^5*( 4*a^4*b - 18*a*b^4 + 3*a^5 + 36*b^5 - 37*a^2*b^3 + 14*a^3*b^2))/((a^4*b - a^5)*(a + b)) + (tan(c/2 + (d*x)/2)^7*(5*a^3*b - 6*a*b^3 + a^4 + 12*b^4 - 13*a^2*b^2))/(a^4*(a + b)))/(d*(2*a*b - tan(c/2 + (d*x)/2)^4*(2*a^2 - 6*b^ 2) + tan(c/2 + (d*x)/2)^2*(4*a*b + 4*b^2) - tan(c/2 + (d*x)/2)^6*(4*a*b - 4*b^2) + tan(c/2 + (d*x)/2)^8*(a^2 - 2*a*b + b^2) + a^2 + b^2)) + (atan((( (a^2*1i - b^2*12i)*((((4*(24*a^16*b - 4*a^17 - 48*a^10*b^7 + 24*a^11*b^6 + 124*a^12*b^5 - 56*a^13*b^4 - 100*a^14*b^3 + 36*a^15*b^2))/(a^14*b + a^15 - a^12*b^3 - a^13*b^2) - (4*tan(c/2 + (d*x)/2)*(a^2*1i - b^2*12i)*(8*a^15* b - 8*a^10*b^6 + 8*a^11*b^5 + 16*a^12*b^4 - 16*a^13*b^3 - 8*a^14*b^2))/(a^ 5*(a^10*b + a^11 - a^8*b^3 - a^9*b^2)))*(a^2*1i - b^2*12i))/(2*a^5) + (8*t an(c/2 + (d*x)/2)*(a^10 - 2*a^9*b - 288*a*b^9 + 288*b^10 - 624*a^2*b^8 + 6 24*a^3*b^7 + 386*a^4*b^6 - 386*a^5*b^5 - 61*a^6*b^4 + 52*a^7*b^3 + 11*a^8* b^2))/(a^10*b + a^11 - a^8*b^3 - a^9*b^2))*1i)/(2*a^5) - ((a^2*1i - b^2*12 i)*((((4*(24*a^16*b - 4*a^17 - 48*a^10*b^7 + 24*a^11*b^6 + 124*a^12*b^5 - 56*a^13*b^4 - 100*a^14*b^3 + 36*a^15*b^2))/(a^14*b + a^15 - a^12*b^3 - a^1 3*b^2) + (4*tan(c/2 + (d*x)/2)*(a^2*1i - b^2*12i)*(8*a^15*b - 8*a^10*b^6 + 8*a^11*b^5 + 16*a^12*b^4 - 16*a^13*b^3 - 8*a^14*b^2))/(a^5*(a^10*b + a...
Time = 0.18 (sec) , antiderivative size = 1277, normalized size of antiderivative = 4.78 \[ \int \frac {\sin ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx =\text {Too large to display} \] Input:
int(sin(d*x+c)^2/(a+b*sec(d*x+c))^3,x)
Output:
( - 24*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b) /sqrt( - a**2 + b**2))*cos(c + d*x)*a**5*b**2 + 76*sqrt( - a**2 + b**2)*at an((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*cos(c + d*x)*a**3*b**4 - 48*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan(( c + d*x)/2)*b)/sqrt( - a**2 + b**2))*cos(c + d*x)*a*b**6 + 12*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b** 2))*sin(c + d*x)**2*a**6*b - 38*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2 )*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*sin(c + d*x)**2*a**4*b**3 + 24*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/s qrt( - a**2 + b**2))*sin(c + d*x)**2*a**2*b**5 - 12*sqrt( - a**2 + b**2)*a tan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*a**6*b + 26*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/ sqrt( - a**2 + b**2))*a**4*b**3 + 14*sqrt( - a**2 + b**2)*atan((tan((c + d *x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*a**2*b**5 - 24*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*b**7 + cos(c + d*x)*sin(c + d*x)**3*a**8 - 2*cos(c + d*x)*sin(c + d*x)**3*a**6*b**2 + cos(c + d*x)*sin(c + d*x)**3*a**4*b**4 - cos(c + d*x )*sin(c + d*x)*a**8 + 19*cos(c + d*x)*sin(c + d*x)*a**6*b**2 - 36*cos(c + d*x)*sin(c + d*x)*a**4*b**4 + 18*cos(c + d*x)*sin(c + d*x)*a**2*b**6 + 2*c os(c + d*x)*a**7*b*c + 2*cos(c + d*x)*a**7*b*d*x - 28*cos(c + d*x)*a**5...