Integrand size = 42, antiderivative size = 213 \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=-\frac {B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {(a B+2 b C) \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 )}{d \sqrt {a+b \cos (c+d x)}}+\frac {(b B+2 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}+\frac {B \sqrt {a+b \cos (c+d x)} \tan (c+d x)}{d} \] Output:
-B*(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))/d/((a+b*cos(d*x+c))/(a+b))^(1/2)+(B*a+2*C*b)*((a+b*cos(d*x+c))/(a+b) )^(1/2)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2)*(b/(a+b))^(1/2))/d/(a+b*cos( d*x+c))^(1/2)+(B*b+2*C*a)*((a+b*cos(d*x+c))/(a+b))^(1/2)*EllipticPi(sin(1/ 2*d*x+1/2*c),2,2^(1/2)*(b/(a+b))^(1/2))/d/(a+b*cos(d*x+c))^(1/2)+B*(a+b*co s(d*x+c))^(1/2)*tan(d*x+c)/d
Result contains complex when optimal does not.
Time = 17.87 (sec) , antiderivative size = 372, normalized size of antiderivative = 1.75 \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\frac {\frac {8 b C \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 )}{\sqrt {a+b \cos (c+d x)}}+\frac {2 (b B+4 a C) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{\sqrt {a+b \cos (c+d x)}}-\frac {2 i B \sqrt {-\frac {b (-1+\cos (c+d x))}{a+b}} \sqrt {\frac {b (1+\cos (c+d x))}{-a+b}} \csc (c+d x) \left (-2 a (a-b) E\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \cos (c+d x)}\right )|\frac {a+b}{a-b}\right )+b \left (-2 a \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \cos (c+d x)}\right ),\frac {a+b}{a-b}\right )+b \operatorname {EllipticPi}\left (\frac {a+b}{a},i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \cos (c+d x)}\right ),\frac {a+b}{a-b}\right )\right )\right )}{a b \sqrt {-\frac {1}{a+b}}}+4 B \sqrt {a+b \cos (c+d x)} \tan (c+d x)}{4 d} \] Input:
Integrate[Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec [c + d*x]^3,x]
Output:
((8*b*C*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/Sqrt[a + b*Cos[c + d*x]] + (2*(b*B + 4*a*C)*Sqrt[(a + b*Cos[c + d* x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*b)/(a + b)])/Sqrt[a + b*Cos[c + d*x]] - ((2*I)*B*Sqrt[-((b*(-1 + Cos[c + d*x]))/(a + b))]*Sqrt[(b*(1 + Co s[c + d*x]))/(-a + b)]*Csc[c + d*x]*(-2*a*(a - b)*EllipticE[I*ArcSinh[Sqrt [-(a + b)^(-1)]*Sqrt[a + b*Cos[c + d*x]]], (a + b)/(a - b)] + b*(-2*a*Elli pticF[I*ArcSinh[Sqrt[-(a + b)^(-1)]*Sqrt[a + b*Cos[c + d*x]]], (a + b)/(a - b)] + b*EllipticPi[(a + b)/a, I*ArcSinh[Sqrt[-(a + b)^(-1)]*Sqrt[a + b*C os[c + d*x]]], (a + b)/(a - b)])))/(a*b*Sqrt[-(a + b)^(-1)]) + 4*B*Sqrt[a + b*Cos[c + d*x]]*Tan[c + d*x])/(4*d)
Time = 1.98 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.07, number of steps used = 20, number of rules used = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3042, 3508, 3042, 3478, 27, 3042, 3538, 25, 3042, 3134, 3042, 3132, 3481, 3042, 3142, 3042, 3140, 3286, 3042, 3284}
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 \sec ^3(c+d x) \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )} \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int \sec ^2(c+d x) \sqrt {a+b \cos (c+d x)} (B+C \cos (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )} \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 3478 |
\(\displaystyle \int \frac {\left (-b B \cos ^2(c+d x)+2 b C \cos (c+d x)+b B+2 a C\right ) \sec (c+d x)}{2 \sqrt {a+b \cos (c+d x)}}dx+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \int \frac {\left (-b B \cos ^2(c+d x)+2 b C \cos (c+d x)+b B+2 a C\right ) \sec (c+d x)}{\sqrt {a+b \cos (c+d x)}}dx+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {-b B \sin \left (c+d x+\frac {\pi }{2}\right )^2+2 b C \sin \left (c+d x+\frac {\pi }{2}\right )+b B+2 a C}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3538 |
\(\displaystyle \frac {1}{2} \left (-\frac {\int -\frac {(b (b B+2 a C)+b (a B+2 b C) \cos (c+d x)) \sec (c+d x)}{\sqrt {a+b \cos (c+d x)}}dx}{b}-B \int \sqrt {a+b \cos (c+d x)}dx\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {\int \frac {(b (b B+2 a C)+b (a B+2 b C) \cos (c+d x)) \sec (c+d x)}{\sqrt {a+b \cos (c+d x)}}dx}{b}-B \int \sqrt {a+b \cos (c+d x)}dx\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {\int \frac {b (b B+2 a C)+b (a B+2 b C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}-B \int \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3134 |
\(\displaystyle \frac {1}{2} \left (\frac {\int \frac {b (b B+2 a C)+b (a B+2 b C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}-\frac {B \sqrt {a+b \cos (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}dx}{\sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {\int \frac {b (b B+2 a C)+b (a B+2 b C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}-\frac {B \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}{\sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3132 |
\(\displaystyle \frac {1}{2} \left (\frac {\int \frac {b (b B+2 a C)+b (a B+2 b C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3481 |
\(\displaystyle \frac {1}{2} \left (\frac {b (a B+2 b C) \int \frac {1}{\sqrt {a+b \cos (c+d x)}}dx+b (2 a C+b B) \int \frac {\sec (c+d x)}{\sqrt {a+b \cos (c+d x)}}dx}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {b (a B+2 b C) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx+b (2 a C+b B) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3142 |
\(\displaystyle \frac {1}{2} \left (\frac {b (2 a C+b B) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {b (a B+2 b C) \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}{\sqrt {a+b \cos (c+d x)}}}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {b (2 a C+b B) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {b (a B+2 b C) \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}{\sqrt {a+b \cos (c+d x)}}}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3140 |
\(\displaystyle \frac {1}{2} \left (\frac {b (2 a C+b B) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 b (a B+2 b C) \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 )}{d \sqrt {a+b \cos (c+d x)}}}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3286 |
\(\displaystyle \frac {1}{2} \left (\frac {\frac {b (2 a C+b B) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \int \frac {\sec (c+d x)}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}}dx}{\sqrt {a+b \cos (c+d x)}}+\frac {2 b (a B+2 b C) \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 )}{d \sqrt {a+b \cos (c+d x)}}}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {\frac {b (2 a C+b B) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {\frac {a}{a+b}+\frac {b \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b}}}dx}{\sqrt {a+b \cos (c+d x)}}+\frac {2 b (a B+2 b C) \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 )}{d \sqrt {a+b \cos (c+d x)}}}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
\(\Big \downarrow \) 3284 |
\(\displaystyle \frac {1}{2} \left (\frac {\frac {2 b (a B+2 b C) \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 )}{d \sqrt {a+b \cos (c+d x)}}+\frac {2 b (2 a C+b B) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}}{b}-\frac {2 B \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}\right )+\frac {B \tan (c+d x) \sqrt {a+b \cos (c+d x)}}{d}\) |
Input:
Int[Sqrt[a + b*Cos[c + d*x]]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d *x]^3,x]
Output:
((-2*B*Sqrt[a + b*Cos[c + d*x]]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(d* Sqrt[(a + b*Cos[c + d*x])/(a + b)]) + ((2*b*(a*B + 2*b*C)*Sqrt[(a + b*Cos[ c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Co s[c + d*x]]) + (2*b*(b*B + 2*a*C)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*Ellip ticPi[2, (c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[c + d*x]]))/b)/2 + (B*Sqrt[a + b*Cos[c + d*x]]*Tan[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[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[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[(2/(f*(a + b)*Sqrt[c + d]))*EllipticPi[ 2*(b/(a + b)), (1/2)*(e - Pi/2 + f*x), 2*(d/(c + d))], x] /; FreeQ[{a, b, c , d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[c + d, 0]
Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[Sqrt[(c + d*Sin[e + f*x])/(c + d)]/Sqrt [c + d*Sin[e + f*x]] Int[1/((a + b*Sin[e + f*x])*Sqrt[c/(c + d) + (d/(c + d))*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] && NeQ[c^2 - d^2, 0] && !GtQ[c + d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si mp[(B*a - A*b)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((c + d*Sin[e + f* x])^n/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[c*(a*A - b*B)*( m + 1) + d*n*(A*b - a*B) + (d*(a*A - b*B)*(m + 1) - c*(A*b - a*B)*(m + 2))* Sin[e + f*x] - d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x]^2, x], x], x] /; Free Q[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && GtQ[n, 0]
Int[(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]))/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[ B/d Int[(a + b*Sin[e + f*x])^m, x], x] - Simp[(B*c - A*d)/d Int[(a + b* Sin[e + f*x])^m/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
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[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^ 2)/(Sqrt[(a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[C/(b*d) Int[Sqrt[a + b*Sin[e + f*x]], x] , x] - Simp[1/(b*d) Int[Simp[a*c*C - A*b*d + (b*c*C - b*B*d + a*C*d)*Sin[ e + f*x], x]/(Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x], x] /; Fre eQ[{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]
Leaf count of result is larger than twice the leaf count of optimal. \(745\) vs. \(2(213)=426\).
Time = 3.10 (sec) , antiderivative size = 746, normalized size of antiderivative = 3.50
method | result | size |
default | \(-\frac {\sqrt {-\left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (\frac {2 C b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a -b}{a -b}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right )}{\sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}-\frac {2 \left (B b +C a \right ) \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a -b}{a -b}}\, \operatorname {EllipticPi}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), 2, \sqrt {-\frac {2 b}{a -b}}\right )}{\sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}+2 B a \left (-\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}{a \left (-1+2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a -b}{a -b}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right )}{2 \sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}-\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a -b}{a -b}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right )}{2 \sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a -b}{a -b}}\, b \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right )}{2 a \sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}+\frac {b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a -b}{a -b}}\, \operatorname {EllipticPi}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), 2, \sqrt {-\frac {2 b}{a -b}}\right )}{2 a \sqrt {-2 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (a +b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}\right )\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b}\, d}\) | \(746\) |
parts | \(\text {Expression too large to display}\) | \(818\) |
Input:
int((a+b*cos(d*x+c))^(1/2)*(B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^3,x,me thod=_RETURNVERBOSE)
Output:
-(-(-2*cos(1/2*d*x+1/2*c)^2*b-a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*C*b*(sin (1/2*d*x+1/2*c)^2)^(1/2)*((2*cos(1/2*d*x+1/2*c)^2*b+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))-2*(B*b+C*a)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*( (2*cos(1/2*d*x+1/2*c)^2*b+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)*EllipticPi(cos(1/2*d*x+1/2*c),2,(-2*b/(a-b) )^(1/2))+2*B*a*(-cos(1/2*d*x+1/2*c)/a*(-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+2*cos(1/2*d*x+1/2*c)^2)+1/2*(sin(1/2*d*x+1/2* c)^2)^(1/2)*((2*cos(1/2*d*x+1/2*c)^2*b+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/2*(sin(1/2*d*x+1/2*c)^2)^(1/2)*((2*cos(1/2*d*x+1/2*c) ^2*b+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)*EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))+1/2/a*(sin(1/2* d*x+1/2*c)^2)^(1/2)*((2*cos(1/2*d*x+1/2*c)^2*b+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)*b*EllipticE(cos(1/2*d* x+1/2*c),(-2*b/(a-b))^(1/2))+1/2*b/a*(sin(1/2*d*x+1/2*c)^2)^(1/2)*((2*cos( 1/2*d*x+1/2*c)^2*b+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)*EllipticPi(cos(1/2*d*x+1/2*c),2,(-2*b/(a-b))^(1/2) )))/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2*b+a+b)^(1/2)/d
Timed out. \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\text {Timed out} \] Input:
integrate((a+b*cos(d*x+c))^(1/2)*(B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^ 3,x, algorithm="fricas")
Output:
Timed out
Timed out. \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\text {Timed out} \] Input:
integrate((a+b*cos(d*x+c))**(1/2)*(B*cos(d*x+c)+C*cos(d*x+c)**2)*sec(d*x+c )**3,x)
Output:
Timed out
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sec \left (d x + c\right )^{3} \,d x } \] Input:
integrate((a+b*cos(d*x+c))^(1/2)*(B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^ 3,x, algorithm="maxima")
Output:
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c))*sqrt(b*cos(d*x + c) + a)*sec (d*x + c)^3, x)
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sec \left (d x + c\right )^{3} \,d x } \] Input:
integrate((a+b*cos(d*x+c))^(1/2)*(B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^ 3,x, algorithm="giac")
Output:
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c))*sqrt(b*cos(d*x + c) + a)*sec (d*x + c)^3, x)
Timed out. \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\int \frac {\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+b\,\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^3} \,d x \] Input:
int(((B*cos(c + d*x) + C*cos(c + d*x)^2)*(a + b*cos(c + d*x))^(1/2))/cos(c + d*x)^3,x)
Output:
int(((B*cos(c + d*x) + C*cos(c + d*x)^2)*(a + b*cos(c + d*x))^(1/2))/cos(c + d*x)^3, x)
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx=\left (\int \sqrt {\cos \left (d x +c \right ) b +a}\, \cos \left (d x +c \right ) \sec \left (d x +c \right )^{3}d x \right ) b +\left (\int \sqrt {\cos \left (d x +c \right ) b +a}\, \cos \left (d x +c \right )^{2} \sec \left (d x +c \right )^{3}d x \right ) c \] Input:
int((a+b*cos(d*x+c))^(1/2)*(B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^3,x)
Output:
int(sqrt(cos(c + d*x)*b + a)*cos(c + d*x)*sec(c + d*x)**3,x)*b + int(sqrt( cos(c + d*x)*b + a)*cos(c + d*x)**2*sec(c + d*x)**3,x)*c