Integrand size = 43, antiderivative size = 426 \[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=-\frac {2 \left (40 a^3 b B-25 a b^3 B-6 a^2 b^2 (5 A-4 C)-48 a^4 C+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 b B+5 b^3 B-48 a^3 C-6 a b^2 (5 A+2 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d} \] Output:
-2/15*(40*B*a^3*b-25*B*a*b^3-6*a^2*b^2*(5*A-4*C)-48*a^4*C+3*b^4*(5*A+3*C)) *(a+b*cos(d*x+c))^(1/2)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2)*(b/(a+b))^(1/ 2))/b^4/(a^2-b^2)/d/((a+b*cos(d*x+c))/(a+b))^(1/2)+2/15*(40*B*a^2*b+5*B*b^ 3-48*a^3*C-6*a*b^2*(5*A+2*C))*((a+b*cos(d*x+c))/(a+b))^(1/2)*InverseJacobi AM(1/2*d*x+1/2*c,2^(1/2)*(b/(a+b))^(1/2))/b^4/d/(a+b*cos(d*x+c))^(1/2)-2*( A*b^2-a*(B*b-C*a))*cos(d*x+c)^2*sin(d*x+c)/b/(a^2-b^2)/d/(a+b*cos(d*x+c))^ (1/2)+2/15*(20*B*a^2*b-5*B*b^3-3*a*b^2*(5*A-3*C)-24*a^3*C)*(a+b*cos(d*x+c) )^(1/2)*sin(d*x+c)/b^3/(a^2-b^2)/d+2/5*(5*A*b^2-5*B*a*b+6*C*a^2-C*b^2)*cos (d*x+c)*(a+b*cos(d*x+c))^(1/2)*sin(d*x+c)/b^2/(a^2-b^2)/d
Time = 3.73 (sec) , antiderivative size = 328, normalized size of antiderivative = 0.77 \[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {\frac {2 b^2 \left (-10 a^2 b B-5 b^3 B+12 a^3 C+3 a b^2 (5 A+C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{(a-b) (a+b)}+\frac {2 \left (-40 a^3 b B+25 a b^3 B+6 a^2 b^2 (5 A-4 C)+48 a^4 C-3 b^4 (5 A+3 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )\right )}{(a-b) (a+b)}+\frac {30 a^2 b \left (A b^2+a (-b B+a C)\right ) \sin (c+d x)}{-a^2+b^2}+2 b (5 b B-9 a C) (a+b \cos (c+d x)) \sin (c+d x)+3 b^2 C (a+b \cos (c+d x)) \sin (2 (c+d x))}{15 b^4 d \sqrt {a+b \cos (c+d x)}} \] Input:
Integrate[(Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b* Cos[c + d*x])^(3/2),x]
Output:
((2*b^2*(-10*a^2*b*B - 5*b^3*B + 12*a^3*C + 3*a*b^2*(5*A + C))*Sqrt[(a + b *Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/((a - b)*(a + b)) + (2*(-40*a^3*b*B + 25*a*b^3*B + 6*a^2*b^2*(5*A - 4*C) + 48*a^4*C - 3*b^4*(5*A + 3*C))*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*((a + b)*EllipticE[ (c + d*x)/2, (2*b)/(a + b)] - a*EllipticF[(c + d*x)/2, (2*b)/(a + b)]))/(( a - b)*(a + b)) + (30*a^2*b*(A*b^2 + a*(-(b*B) + a*C))*Sin[c + d*x])/(-a^2 + b^2) + 2*b*(5*b*B - 9*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x] + 3*b^2*C* (a + b*Cos[c + d*x])*Sin[2*(c + d*x)])/(15*b^4*d*Sqrt[a + b*Cos[c + d*x]])
Time = 2.39 (sec) , antiderivative size = 431, normalized size of antiderivative = 1.01, number of steps used = 18, number of rules used = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.419, Rules used = {3042, 3526, 27, 3042, 3528, 27, 3042, 3502, 27, 3042, 3231, 3042, 3134, 3042, 3132, 3142, 3042, 3140}
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) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3526 |
\(\displaystyle -\frac {2 \int \frac {\cos (c+d x) \left (-\left (\left (6 C a^2-5 b B a+5 A b^2-b^2 C\right ) \cos ^2(c+d x)\right )+b (b B-a (A+C)) \cos (c+d x)+4 \left (A b^2-a (b B-a C)\right )\right )}{2 \sqrt {a+b \cos (c+d x)}}dx}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {\cos (c+d x) \left (-\left (\left (6 C a^2-5 b B a+5 A b^2-b^2 C\right ) \cos ^2(c+d x)\right )+b (b B-a (A+C)) \cos (c+d x)+4 \left (A b^2-a (b B-a C)\right )\right )}{\sqrt {a+b \cos (c+d x)}}dx}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (\left (-6 C a^2+5 b B a-5 A b^2+b^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2+b (b B-a (A+C)) \sin \left (c+d x+\frac {\pi }{2}\right )+4 \left (A b^2-a (b B-a C)\right )\right )}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3528 |
\(\displaystyle -\frac {\frac {2 \int -\frac {\left (-24 C a^3+20 b B a^2-3 b^2 (5 A-3 C) a-5 b^3 B\right ) \cos ^2(c+d x)-b \left (2 C a^2-5 b B a+5 A b^2+3 b^2 C\right ) \cos (c+d x)+2 a \left (6 C a^2-5 b B a+5 A b^2-b^2 C\right )}{2 \sqrt {a+b \cos (c+d x)}}dx}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {-\frac {\int \frac {\left (-24 C a^3+20 b B a^2-3 b^2 (5 A-3 C) a-5 b^3 B\right ) \cos ^2(c+d x)-b \left (2 C a^2-5 b B a+5 A b^2+3 b^2 C\right ) \cos (c+d x)+2 a \left (6 C a^2-5 b B a+5 A b^2-b^2 C\right )}{\sqrt {a+b \cos (c+d x)}}dx}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\int \frac {\left (-24 C a^3+20 b B a^2-3 b^2 (5 A-3 C) a-5 b^3 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2-b \left (2 C a^2-5 b B a+5 A b^2+3 b^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+2 a \left (6 C a^2-5 b B a+5 A b^2-b^2 C\right )}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle -\frac {-\frac {\frac {2 \int -\frac {b \left (-12 C a^3+10 b B a^2-3 b^2 (5 A+C) a+5 b^3 B\right )+\left (-48 C a^4+40 b B a^3-6 b^2 (5 A-4 C) a^2-25 b^3 B a+3 b^4 (5 A+3 C)\right ) \cos (c+d x)}{2 \sqrt {a+b \cos (c+d x)}}dx}{3 b}+\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\int \frac {b \left (-12 C a^3+10 b B a^2-3 b^2 (5 A+C) a+5 b^3 B\right )+\left (-48 C a^4+40 b B a^3-6 b^2 (5 A-4 C) a^2-25 b^3 B a+3 b^4 (5 A+3 C)\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}}dx}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\int \frac {b \left (-12 C a^3+10 b B a^2-3 b^2 (5 A+C) a+5 b^3 B\right )+\left (-48 C a^4+40 b B a^3-6 b^2 (5 A-4 C) a^2-25 b^3 B a+3 b^4 (5 A+3 C)\right ) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3231 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {\left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \int \sqrt {a+b \cos (c+d x)}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}}dx}{b}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {\left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \int \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3134 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {\left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}dx}{b \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {\left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b}}dx}{b \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3132 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {2 \left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3142 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {2 \left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}}dx}{b \sqrt {a+b \cos (c+d x)}}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {2 \left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b}}}dx}{b \sqrt {a+b \cos (c+d x)}}}{3 b}}{5 b}-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}}{b \left (a^2-b^2\right )}-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3140 |
\(\displaystyle -\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {-\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b d}-\frac {\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{3 b d}-\frac {\frac {2 \left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{b d \sqrt {a+b \cos (c+d x)}}}{3 b}}{5 b}}{b \left (a^2-b^2\right )}\) |
Input:
Int[(Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2),x]
Output:
(-2*(A*b^2 - a*(b*B - a*C))*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d* Sqrt[a + b*Cos[c + d*x]]) - ((-2*(5*A*b^2 - 5*a*b*B + 6*a^2*C - b^2*C)*Cos [c + d*x]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b*d) - (-1/3*((2*(40*a ^3*b*B - 25*a*b^3*B - 6*a^2*b^2*(5*A - 4*C) - 48*a^4*C + 3*b^4*(5*A + 3*C) )*Sqrt[a + b*Cos[c + d*x]]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqr t[(a + b*Cos[c + d*x])/(a + b)]) - (2*(a^2 - b^2)*(40*a^2*b*B + 5*b^3*B - 48*a^3*C - 6*a*b^2*(5*A + 2*C))*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*Ellipti cF[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos[c + d*x]]))/b + (2*(20 *a^2*b*B - 5*b^3*B - 3*a*b^2*(5*A - 3*C) - 24*a^3*C)*Sqrt[a + b*Cos[c + d* x]]*Sin[c + d*x])/(3*b*d))/(5*b))/(b*(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[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[a + b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c + d*x])/(a + b)] Int[Sqrt[a/(a + b) + ( b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2 , 0] && !GtQ[a + b, 0]
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*S qrt[a + b]))*EllipticF[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[ {a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[(a + b*Sin[c + d*x])/(a + b)]/Sqrt[a + b*Sin[c + d*x]] Int[1/Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && !GtQ[a + b, 0]
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*sin[(e_.) + ( f_.)*(x_)]], x_Symbol] :> Simp[(b*c - a*d)/b Int[1/Sqrt[a + b*Sin[e + f*x ]], x], x] + Simp[d/b Int[Sqrt[a + b*Sin[e + f*x]], x], x] /; FreeQ[{a, b , c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0]
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_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C - B*c*d + 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* d)*(b*c*m + a*d*(n + 1)) - (d*(A*(a*d*(n + 2) - b*c*(n + 1)) + B*(b*d*(n + 1) - a*c*(n + 2))) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x ] + b*(d*(B*c - A*d)*(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, B, 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])))
Leaf count of result is larger than twice the leaf count of optimal. \(1334\) vs. \(2(413)=826\).
Time = 11.61 (sec) , antiderivative size = 1335, normalized size of antiderivative = 3.13
method | result | size |
default | \(\text {Expression too large to display}\) | \(1335\) |
parts | \(\text {Expression too large to display}\) | \(2560\) |
Input:
int(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3/2),x, method=_RETURNVERBOSE)
Output:
-(-(-2*b*cos(1/2*d*x+1/2*c)^2-a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*a^2*(A* b^2-B*a*b+C*a^2)/b^4/sin(1/2*d*x+1/2*c)^2/(2*sin(1/2*d*x+1/2*c)^2*b-a-b)/( a^2-b^2)*(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*b *sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)+(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2* b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*EllipticE(cos(1/2*d*x+1/2* c),(-2*b/(a-b))^(1/2))*a-(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*b/(a-b)*sin(1/2* d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*b*EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b) )^(1/2)))-2*(A*a*b^2+A*b^3-B*a^2*b-B*a*b^2-B*b^3+C*a^3+C*a^2*b+C*a*b^2+C*b ^3)/b^4*(sin(1/2*d*x+1/2*c)^2)^(1/2)*((2*b*cos(1/2*d*x+1/2*c)^2+a-b)/(a-b) )^(1/2)/(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*Ellip ticF(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))+16*C/b*(-1/10/b*cos(1/2*d*x+1/ 2*c)^3*(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)-1/60/b ^2*(-4*a+12*b)*cos(1/2*d*x+1/2*c)*(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2 *d*x+1/2*c)^2)^(1/2)+1/60/b^2*(-4*a+12*b)*(a-b)*(sin(1/2*d*x+1/2*c)^2)^(1/ 2)*((2*b*cos(1/2*d*x+1/2*c)^2+a-b)/(a-b))^(1/2)/(-2*b*sin(1/2*d*x+1/2*c)^4 +(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),(-2*b/(a-b ))^(1/2))-1/60*(4*a^2-15*a*b+27*b^2)/b^3*(a-b)*(sin(1/2*d*x+1/2*c)^2)^(1/2 )*((2*b*cos(1/2*d*x+1/2*c)^2+a-b)/(a-b))^(1/2)/(-2*b*sin(1/2*d*x+1/2*c)^4+ (a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(EllipticF(cos(1/2*d*x+1/2*c),(-2*b/(a-b ))^(1/2))-EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))))-2/b^4*(A*b...
Result contains complex when optimal does not.
Time = 0.17 (sec) , antiderivative size = 992, normalized size of antiderivative = 2.33 \[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3 /2),x, algorithm="fricas")
Output:
2/45*(sqrt(1/2)*(96*I*C*a^6 - 80*I*B*a^5*b + 12*I*(5*A - 7*C)*a^4*b^2 + 80 *I*B*a^3*b^3 - 3*I*(25*A + 9*C)*a^2*b^4 + 15*I*B*a*b^5 + (96*I*C*a^5*b - 8 0*I*B*a^4*b^2 + 12*I*(5*A - 7*C)*a^3*b^3 + 80*I*B*a^2*b^4 - 3*I*(25*A + 9* C)*a*b^5 + 15*I*B*b^6)*cos(d*x + c))*sqrt(b)*weierstrassPInverse(4/3*(4*a^ 2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b *sin(d*x + c) + 2*a)/b) + sqrt(1/2)*(-96*I*C*a^6 + 80*I*B*a^5*b - 12*I*(5* A - 7*C)*a^4*b^2 - 80*I*B*a^3*b^3 + 3*I*(25*A + 9*C)*a^2*b^4 - 15*I*B*a*b^ 5 + (-96*I*C*a^5*b + 80*I*B*a^4*b^2 - 12*I*(5*A - 7*C)*a^3*b^3 - 80*I*B*a^ 2*b^4 + 3*I*(25*A + 9*C)*a*b^5 - 15*I*B*b^6)*cos(d*x + c))*sqrt(b)*weierst rassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3* b*cos(d*x + c) - 3*I*b*sin(d*x + c) + 2*a)/b) + 3*sqrt(1/2)*(48*I*C*a^5*b - 40*I*B*a^4*b^2 + 6*I*(5*A - 4*C)*a^3*b^3 + 25*I*B*a^2*b^4 - 3*I*(5*A + 3 *C)*a*b^5 + (48*I*C*a^4*b^2 - 40*I*B*a^3*b^3 + 6*I*(5*A - 4*C)*a^2*b^4 + 2 5*I*B*a*b^5 - 3*I*(5*A + 3*C)*b^6)*cos(d*x + c))*sqrt(b)*weierstrassZeta(4 /3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, weierstrassPInverse(4 /3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*a)/b)) + 3*sqrt(1/2)*(-48*I*C*a^5*b + 40*I*B*a^4 *b^2 - 6*I*(5*A - 4*C)*a^3*b^3 - 25*I*B*a^2*b^4 + 3*I*(5*A + 3*C)*a*b^5 + (-48*I*C*a^4*b^2 + 40*I*B*a^3*b^3 - 6*I*(5*A - 4*C)*a^2*b^4 - 25*I*B*a*b^5 + 3*I*(5*A + 3*C)*b^6)*cos(d*x + c))*sqrt(b)*weierstrassZeta(4/3*(4*a^...
Timed out. \[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**2*(A+B*cos(d*x+c)+C*cos(d*x+c)**2)/(a+b*cos(d*x+c))* *(3/2),x)
Output:
Timed out
\[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \] Input:
integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3 /2),x, algorithm="maxima")
Output:
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)*cos(d*x + c)^2/(b*cos(d* x + c) + a)^(3/2), x)
\[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \] Input:
integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3 /2),x, algorithm="giac")
Output:
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)*cos(d*x + c)^2/(b*cos(d* x + c) + a)^(3/2), x)
Timed out. \[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^2\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \] Input:
int((cos(c + d*x)^2*(A + B*cos(c + d*x) + C*cos(c + d*x)^2))/(a + b*cos(c + d*x))^(3/2),x)
Output:
int((cos(c + d*x)^2*(A + B*cos(c + d*x) + C*cos(c + d*x)^2))/(a + b*cos(c + d*x))^(3/2), x)
\[ \int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\left (\int \frac {\sqrt {\cos \left (d x +c \right ) b +a}\, \cos \left (d x +c \right )^{4}}{\cos \left (d x +c \right )^{2} b^{2}+2 \cos \left (d x +c \right ) a b +a^{2}}d x \right ) c +\left (\int \frac {\sqrt {\cos \left (d x +c \right ) b +a}\, \cos \left (d x +c \right )^{3}}{\cos \left (d x +c \right )^{2} b^{2}+2 \cos \left (d x +c \right ) a b +a^{2}}d x \right ) b +\left (\int \frac {\sqrt {\cos \left (d x +c \right ) b +a}\, \cos \left (d x +c \right )^{2}}{\cos \left (d x +c \right )^{2} b^{2}+2 \cos \left (d x +c \right ) a b +a^{2}}d x \right ) a \] Input:
int(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3/2),x)
Output:
int((sqrt(cos(c + d*x)*b + a)*cos(c + d*x)**4)/(cos(c + d*x)**2*b**2 + 2*c os(c + d*x)*a*b + a**2),x)*c + int((sqrt(cos(c + d*x)*b + a)*cos(c + d*x)* *3)/(cos(c + d*x)**2*b**2 + 2*cos(c + d*x)*a*b + a**2),x)*b + int((sqrt(co s(c + d*x)*b + a)*cos(c + d*x)**2)/(cos(c + d*x)**2*b**2 + 2*cos(c + d*x)* a*b + a**2),x)*a