Integrand size = 24, antiderivative size = 125 \[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=-\frac {\sqrt {\sqrt {a}-\sqrt {b}} \arctan \left (\frac {\sqrt {\sqrt {a}-\sqrt {b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt {b} d}+\frac {\sqrt {\sqrt {a}+\sqrt {b}} \arctan \left (\frac {\sqrt {\sqrt {a}+\sqrt {b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt {b} d} \] Output:
-1/2*(a^(1/2)-b^(1/2))^(1/2)*arctan((a^(1/2)-b^(1/2))^(1/2)*tan(d*x+c)/a^( 1/4))/a^(3/4)/b^(1/2)/d+1/2*(a^(1/2)+b^(1/2))^(1/2)*arctan((a^(1/2)+b^(1/2 ))^(1/2)*tan(d*x+c)/a^(1/4))/a^(3/4)/b^(1/2)/d
Time = 0.64 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.26 \[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\frac {\left (\sqrt {a} \sqrt {b}+b\right ) \arctan \left (\frac {\left (\sqrt {a}+\sqrt {b}\right ) \tan (c+d x)}{\sqrt {a+\sqrt {a} \sqrt {b}}}\right )}{\sqrt {a+\sqrt {a} \sqrt {b}}}+\frac {\left (\sqrt {a} \sqrt {b}-b\right ) \text {arctanh}\left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \tan (c+d x)}{\sqrt {-a+\sqrt {a} \sqrt {b}}}\right )}{\sqrt {-a+\sqrt {a} \sqrt {b}}}}{2 \sqrt {a} b d} \] Input:
Integrate[Cos[c + d*x]^2/(a - b*Sin[c + d*x]^4),x]
Output:
(((Sqrt[a]*Sqrt[b] + b)*ArcTan[((Sqrt[a] + Sqrt[b])*Tan[c + d*x])/Sqrt[a + Sqrt[a]*Sqrt[b]]])/Sqrt[a + Sqrt[a]*Sqrt[b]] + ((Sqrt[a]*Sqrt[b] - b)*Arc Tanh[((Sqrt[a] - Sqrt[b])*Tan[c + d*x])/Sqrt[-a + Sqrt[a]*Sqrt[b]]])/Sqrt[ -a + Sqrt[a]*Sqrt[b]])/(2*Sqrt[a]*b*d)
Time = 0.31 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.29, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3703, 1406, 218}
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 {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2}{a-b \sin (c+d x)^4}dx\) |
\(\Big \downarrow \) 3703 |
\(\displaystyle \frac {\int \frac {1}{(a-b) \tan ^4(c+d x)+2 a \tan ^2(c+d x)+a}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 1406 |
\(\displaystyle \frac {\frac {(a-b) \int \frac {1}{(a-b) \tan ^2(c+d x)+\sqrt {a} \left (\sqrt {a}-\sqrt {b}\right )}d\tan (c+d x)}{2 \sqrt {a} \sqrt {b}}-\frac {(a-b) \int \frac {1}{(a-b) \tan ^2(c+d x)+\sqrt {a} \left (\sqrt {a}+\sqrt {b}\right )}d\tan (c+d x)}{2 \sqrt {a} \sqrt {b}}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {(a-b) \arctan \left (\frac {\sqrt {\sqrt {a}+\sqrt {b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt {b} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {\sqrt {a}+\sqrt {b}}}-\frac {(a-b) \arctan \left (\frac {\sqrt {\sqrt {a}-\sqrt {b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt {b} \sqrt {\sqrt {a}-\sqrt {b}} \left (\sqrt {a}+\sqrt {b}\right )}}{d}\) |
Input:
Int[Cos[c + d*x]^2/(a - b*Sin[c + d*x]^4),x]
Output:
(-1/2*((a - b)*ArcTan[(Sqrt[Sqrt[a] - Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(a^ (3/4)*Sqrt[Sqrt[a] - Sqrt[b]]*(Sqrt[a] + Sqrt[b])*Sqrt[b]) + ((a - b)*ArcT an[(Sqrt[Sqrt[a] + Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*(Sqrt[a] - Sqrt[b])*Sqrt[Sqrt[a] + Sqrt[b]]*Sqrt[b]))/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^ 2 - 4*a*c, 2]}, Simp[c/q Int[1/(b/2 - q/2 + c*x^2), x], x] - Simp[c/q I nt[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c , 0] && PosQ[b^2 - 4*a*c]
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^4)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Su bst[Int[(a + 2*a*ff^2*x^2 + (a + b)*ff^4*x^4)^p/(1 + ff^2*x^2)^(m/2 + 2*p + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2 ] && IntegerQ[p]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.79 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.58
method | result | size |
risch | \(\munderset {\textit {\_R} =\operatorname {RootOf}\left (256 a^{3} b^{2} d^{4} \textit {\_Z}^{4}+32 a^{2} b \,d^{2} \textit {\_Z}^{2}+a -b \right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+32 a^{2} d^{2} \textit {\_R}^{2}+8 i a d \textit {\_R} +\frac {2 a}{b}-1\right )\) | \(73\) |
derivativedivides | \(\frac {\left (a -b \right ) \left (-\frac {\arctan \left (\frac {\left (a -b \right ) \tan \left (d x +c \right )}{\sqrt {\left (\sqrt {a b}+a \right ) \left (a -b \right )}}\right )}{2 \sqrt {a b}\, \sqrt {\left (\sqrt {a b}+a \right ) \left (a -b \right )}}+\frac {\operatorname {arctanh}\left (\frac {\left (-a +b \right ) \tan \left (d x +c \right )}{\sqrt {\left (\sqrt {a b}-a \right ) \left (a -b \right )}}\right )}{2 \sqrt {a b}\, \sqrt {\left (\sqrt {a b}-a \right ) \left (a -b \right )}}\right )}{d}\) | \(115\) |
default | \(\frac {\left (a -b \right ) \left (-\frac {\arctan \left (\frac {\left (a -b \right ) \tan \left (d x +c \right )}{\sqrt {\left (\sqrt {a b}+a \right ) \left (a -b \right )}}\right )}{2 \sqrt {a b}\, \sqrt {\left (\sqrt {a b}+a \right ) \left (a -b \right )}}+\frac {\operatorname {arctanh}\left (\frac {\left (-a +b \right ) \tan \left (d x +c \right )}{\sqrt {\left (\sqrt {a b}-a \right ) \left (a -b \right )}}\right )}{2 \sqrt {a b}\, \sqrt {\left (\sqrt {a b}-a \right ) \left (a -b \right )}}\right )}{d}\) | \(115\) |
Input:
int(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x,method=_RETURNVERBOSE)
Output:
sum(_R*ln(exp(2*I*(d*x+c))+32*a^2*d^2*_R^2+8*I*a*d*_R+2/b*a-1),_R=RootOf(2 56*_Z^4*a^3*b^2*d^4+32*_Z^2*a^2*b*d^2+a-b))
Leaf count of result is larger than twice the leaf count of optimal. 541 vs. \(2 (85) = 170\).
Time = 0.20 (sec) , antiderivative size = 541, normalized size of antiderivative = 4.33 \[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=-\frac {1}{8} \, \sqrt {-\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \log \left (\frac {1}{2} \, a d \sqrt {-\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + \frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4} \, {\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt {\frac {1}{a^{3} b d^{4}}} - \frac {1}{4}\right ) + \frac {1}{8} \, \sqrt {-\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \log \left (-\frac {1}{2} \, a d \sqrt {-\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} + 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + \frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4} \, {\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt {\frac {1}{a^{3} b d^{4}}} - \frac {1}{4}\right ) + \frac {1}{8} \, \sqrt {\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \log \left (\frac {1}{2} \, a d \sqrt {\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4} \, {\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt {\frac {1}{a^{3} b d^{4}}} + \frac {1}{4}\right ) - \frac {1}{8} \, \sqrt {\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \log \left (-\frac {1}{2} \, a d \sqrt {\frac {a b d^{2} \sqrt {\frac {1}{a^{3} b d^{4}}} - 1}{a b d^{2}}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4} \, {\left (2 \, a^{2} d^{2} \cos \left (d x + c\right )^{2} - a^{2} d^{2}\right )} \sqrt {\frac {1}{a^{3} b d^{4}}} + \frac {1}{4}\right ) \] Input:
integrate(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x, algorithm="fricas")
Output:
-1/8*sqrt(-(a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a*b*d^2))*log(1/2*a*d*sqrt(- (a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a*b*d^2))*cos(d*x + c)*sin(d*x + c) + 1 /4*cos(d*x + c)^2 + 1/4*(2*a^2*d^2*cos(d*x + c)^2 - a^2*d^2)*sqrt(1/(a^3*b *d^4)) - 1/4) + 1/8*sqrt(-(a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a*b*d^2))*log (-1/2*a*d*sqrt(-(a*b*d^2*sqrt(1/(a^3*b*d^4)) + 1)/(a*b*d^2))*cos(d*x + c)* sin(d*x + c) + 1/4*cos(d*x + c)^2 + 1/4*(2*a^2*d^2*cos(d*x + c)^2 - a^2*d^ 2)*sqrt(1/(a^3*b*d^4)) - 1/4) + 1/8*sqrt((a*b*d^2*sqrt(1/(a^3*b*d^4)) - 1) /(a*b*d^2))*log(1/2*a*d*sqrt((a*b*d^2*sqrt(1/(a^3*b*d^4)) - 1)/(a*b*d^2))* cos(d*x + c)*sin(d*x + c) - 1/4*cos(d*x + c)^2 + 1/4*(2*a^2*d^2*cos(d*x + c)^2 - a^2*d^2)*sqrt(1/(a^3*b*d^4)) + 1/4) - 1/8*sqrt((a*b*d^2*sqrt(1/(a^3 *b*d^4)) - 1)/(a*b*d^2))*log(-1/2*a*d*sqrt((a*b*d^2*sqrt(1/(a^3*b*d^4)) - 1)/(a*b*d^2))*cos(d*x + c)*sin(d*x + c) - 1/4*cos(d*x + c)^2 + 1/4*(2*a^2* d^2*cos(d*x + c)^2 - a^2*d^2)*sqrt(1/(a^3*b*d^4)) + 1/4)
Timed out. \[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**2/(a-b*sin(d*x+c)**4),x)
Output:
Timed out
\[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\int { -\frac {\cos \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{4} - a} \,d x } \] Input:
integrate(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x, algorithm="maxima")
Output:
-integrate(cos(d*x + c)^2/(b*sin(d*x + c)^4 - a), x)
Leaf count of result is larger than twice the leaf count of optimal. 560 vs. \(2 (85) = 170\).
Time = 0.72 (sec) , antiderivative size = 560, normalized size of antiderivative = 4.48 \[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\frac {{\left (3 \, \sqrt {a^{2} - a b + \sqrt {a b} {\left (a - b\right )}} a^{2} b - 6 \, \sqrt {a^{2} - a b + \sqrt {a b} {\left (a - b\right )}} a b^{2} - \sqrt {a^{2} - a b + \sqrt {a b} {\left (a - b\right )}} b^{3} + 3 \, \sqrt {a^{2} - a b + \sqrt {a b} {\left (a - b\right )}} \sqrt {a b} a^{2} - 6 \, \sqrt {a^{2} - a b + \sqrt {a b} {\left (a - b\right )}} \sqrt {a b} a b - \sqrt {a^{2} - a b + \sqrt {a b} {\left (a - b\right )}} \sqrt {a b} b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {2 \, \tan \left (d x + c\right )}{\sqrt {\frac {4 \, a + \sqrt {-16 \, {\left (a - b\right )} a + 16 \, a^{2}}}{a - b}}}\right )\right )} {\left | a - b \right |}}{3 \, a^{5} b - 12 \, a^{4} b^{2} + 14 \, a^{3} b^{3} - 4 \, a^{2} b^{4} - a b^{5}} + \frac {{\left (3 \, \sqrt {a^{2} - a b - \sqrt {a b} {\left (a - b\right )}} a^{2} b - 6 \, \sqrt {a^{2} - a b - \sqrt {a b} {\left (a - b\right )}} a b^{2} - \sqrt {a^{2} - a b - \sqrt {a b} {\left (a - b\right )}} b^{3} + 3 \, \sqrt {a^{2} - a b - \sqrt {a b} {\left (a - b\right )}} \sqrt {a b} a^{2} - 6 \, \sqrt {a^{2} - a b - \sqrt {a b} {\left (a - b\right )}} \sqrt {a b} a b - \sqrt {a^{2} - a b - \sqrt {a b} {\left (a - b\right )}} \sqrt {a b} b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {2 \, \tan \left (d x + c\right )}{\sqrt {\frac {4 \, a - \sqrt {-16 \, {\left (a - b\right )} a + 16 \, a^{2}}}{a - b}}}\right )\right )} {\left | a - b \right |}}{3 \, a^{5} b - 12 \, a^{4} b^{2} + 14 \, a^{3} b^{3} - 4 \, a^{2} b^{4} - a b^{5}}}{2 \, d} \] Input:
integrate(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x, algorithm="giac")
Output:
1/2*((3*sqrt(a^2 - a*b + sqrt(a*b)*(a - b))*a^2*b - 6*sqrt(a^2 - a*b + sqr t(a*b)*(a - b))*a*b^2 - sqrt(a^2 - a*b + sqrt(a*b)*(a - b))*b^3 + 3*sqrt(a ^2 - a*b + sqrt(a*b)*(a - b))*sqrt(a*b)*a^2 - 6*sqrt(a^2 - a*b + sqrt(a*b) *(a - b))*sqrt(a*b)*a*b - sqrt(a^2 - a*b + sqrt(a*b)*(a - b))*sqrt(a*b)*b^ 2)*(pi*floor((d*x + c)/pi + 1/2) + arctan(2*tan(d*x + c)/sqrt((4*a + sqrt( -16*(a - b)*a + 16*a^2))/(a - b))))*abs(a - b)/(3*a^5*b - 12*a^4*b^2 + 14* a^3*b^3 - 4*a^2*b^4 - a*b^5) + (3*sqrt(a^2 - a*b - sqrt(a*b)*(a - b))*a^2* b - 6*sqrt(a^2 - a*b - sqrt(a*b)*(a - b))*a*b^2 - sqrt(a^2 - a*b - sqrt(a* b)*(a - b))*b^3 + 3*sqrt(a^2 - a*b - sqrt(a*b)*(a - b))*sqrt(a*b)*a^2 - 6* sqrt(a^2 - a*b - sqrt(a*b)*(a - b))*sqrt(a*b)*a*b - sqrt(a^2 - a*b - sqrt( a*b)*(a - b))*sqrt(a*b)*b^2)*(pi*floor((d*x + c)/pi + 1/2) + arctan(2*tan( d*x + c)/sqrt((4*a - sqrt(-16*(a - b)*a + 16*a^2))/(a - b))))*abs(a - b)/( 3*a^5*b - 12*a^4*b^2 + 14*a^3*b^3 - 4*a^2*b^4 - a*b^5))/d
Time = 36.27 (sec) , antiderivative size = 1409, normalized size of antiderivative = 11.27 \[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\text {Too large to display} \] Input:
int(cos(c + d*x)^2/(a - b*sin(c + d*x)^4),x)
Output:
(atan(((tan(c + d*x)*(12*a*b^2 - 12*a^2*b + 4*a^3 - 4*b^3) + (-((a^3*b^3)^ (1/2) + a^2*b)/(16*a^3*b^2))^(1/2)*(16*a*b^3 + 16*a^3*b - 32*a^2*b^2 + tan (c + d*x)*(64*a^4*b + 64*a^2*b^3 - 128*a^3*b^2)*(-((a^3*b^3)^(1/2) + a^2*b )/(16*a^3*b^2))^(1/2)))*(-((a^3*b^3)^(1/2) + a^2*b)/(16*a^3*b^2))^(1/2)*1i + (tan(c + d*x)*(12*a*b^2 - 12*a^2*b + 4*a^3 - 4*b^3) - (-((a^3*b^3)^(1/2 ) + a^2*b)/(16*a^3*b^2))^(1/2)*(16*a*b^3 + 16*a^3*b - 32*a^2*b^2 - tan(c + d*x)*(64*a^4*b + 64*a^2*b^3 - 128*a^3*b^2)*(-((a^3*b^3)^(1/2) + a^2*b)/(1 6*a^3*b^2))^(1/2)))*(-((a^3*b^3)^(1/2) + a^2*b)/(16*a^3*b^2))^(1/2)*1i)/(( tan(c + d*x)*(12*a*b^2 - 12*a^2*b + 4*a^3 - 4*b^3) + (-((a^3*b^3)^(1/2) + a^2*b)/(16*a^3*b^2))^(1/2)*(16*a*b^3 + 16*a^3*b - 32*a^2*b^2 + tan(c + d*x )*(64*a^4*b + 64*a^2*b^3 - 128*a^3*b^2)*(-((a^3*b^3)^(1/2) + a^2*b)/(16*a^ 3*b^2))^(1/2)))*(-((a^3*b^3)^(1/2) + a^2*b)/(16*a^3*b^2))^(1/2) - (tan(c + d*x)*(12*a*b^2 - 12*a^2*b + 4*a^3 - 4*b^3) - (-((a^3*b^3)^(1/2) + a^2*b)/ (16*a^3*b^2))^(1/2)*(16*a*b^3 + 16*a^3*b - 32*a^2*b^2 - tan(c + d*x)*(64*a ^4*b + 64*a^2*b^3 - 128*a^3*b^2)*(-((a^3*b^3)^(1/2) + a^2*b)/(16*a^3*b^2)) ^(1/2)))*(-((a^3*b^3)^(1/2) + a^2*b)/(16*a^3*b^2))^(1/2)))*(-((a^3*b^3)^(1 /2) + a^2*b)/(16*a^3*b^2))^(1/2)*2i)/d + (atan(((tan(c + d*x)*(12*a*b^2 - 12*a^2*b + 4*a^3 - 4*b^3) + (((a^3*b^3)^(1/2) - a^2*b)/(16*a^3*b^2))^(1/2) *(16*a*b^3 + 16*a^3*b - 32*a^2*b^2 + tan(c + d*x)*(64*a^4*b + 64*a^2*b^3 - 128*a^3*b^2)*(((a^3*b^3)^(1/2) - a^2*b)/(16*a^3*b^2))^(1/2)))*(((a^3*b...
\[ \int \frac {\cos ^2(c+d x)}{a-b \sin ^4(c+d x)} \, dx=-\left (\int \frac {\cos \left (d x +c \right )^{2}}{\sin \left (d x +c \right )^{4} b -a}d x \right ) \] Input:
int(cos(d*x+c)^2/(a-b*sin(d*x+c)^4),x)
Output:
- int(cos(c + d*x)**2/(sin(c + d*x)**4*b - a),x)