Integrand size = 23, antiderivative size = 91 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=-\frac {4 a^3 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {20 a^3 \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a^3 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {6 a^3 \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \] Output:
-4*a^3*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+20/3*a^3*InverseJacobiAM(1/ 2*d*x+1/2*c,2^(1/2))/d+2/3*a^3*sin(d*x+c)/d/cos(d*x+c)^(3/2)+6*a^3*sin(d*x +c)/d/cos(d*x+c)^(1/2)
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 0.35 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.53 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=\frac {2 a^3 \csc (c+d x) \left (\operatorname {Hypergeometric2F1}\left (-\frac {3}{4},\frac {1}{2},\frac {1}{4},\cos ^2(c+d x)\right )+9 \cos (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},\frac {1}{2},\frac {3}{4},\cos ^2(c+d x)\right )-\cos ^2(c+d x) \left (9 \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},\cos ^2(c+d x)\right )+\cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {7}{4},\cos ^2(c+d x)\right )\right )\right ) \sqrt {\sin ^2(c+d x)}}{3 d \cos ^{\frac {3}{2}}(c+d x)} \] Input:
Integrate[Sqrt[Cos[c + d*x]]*(a + a*Sec[c + d*x])^3,x]
Output:
(2*a^3*Csc[c + d*x]*(Hypergeometric2F1[-3/4, 1/2, 1/4, Cos[c + d*x]^2] + 9 *Cos[c + d*x]*Hypergeometric2F1[-1/4, 1/2, 3/4, Cos[c + d*x]^2] - Cos[c + d*x]^2*(9*Hypergeometric2F1[1/4, 1/2, 5/4, Cos[c + d*x]^2] + Cos[c + d*x]* Hypergeometric2F1[1/2, 3/4, 7/4, Cos[c + d*x]^2]))*Sqrt[Sin[c + d*x]^2])/( 3*d*Cos[c + d*x]^(3/2))
Time = 0.52 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.67, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4752, 3042, 4278, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {\cos (c+d x)} (a \sec (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3dx\) |
\(\Big \downarrow \) 4752 |
\(\displaystyle \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \int \frac {(\sec (c+d x) a+a)^3}{\sqrt {\sec (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4278 |
\(\displaystyle \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \int \left (\sec ^{\frac {5}{2}}(c+d x) a^3+3 \sec ^{\frac {3}{2}}(c+d x) a^3+3 \sqrt {\sec (c+d x)} a^3+\frac {a^3}{\sqrt {\sec (c+d x)}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \left (\frac {2 a^3 \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {6 a^3 \sin (c+d x) \sqrt {\sec (c+d x)}}{d}+\frac {20 a^3 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}-\frac {4 a^3 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )\) |
Input:
Int[Sqrt[Cos[c + d*x]]*(a + a*Sec[c + d*x])^3,x]
Output:
Sqrt[Cos[c + d*x]]*Sqrt[Sec[c + d*x]]*((-4*a^3*Sqrt[Cos[c + d*x]]*Elliptic E[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (20*a^3*Sqrt[Cos[c + d*x]]*Ellip ticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (6*a^3*Sqrt[Sec[c + d*x]] *Sin[c + d*x])/d + (2*a^3*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d))
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Int[ExpandTrig[(a + b*csc[e + f*x])^m*(d*csc[e + f *x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && I GtQ[m, 0] && RationalQ[n]
Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Simp[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m Int[ActivateTrig[u]/(c*Csc[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownSecantIntegrandQ[u, x ]
Leaf count of result is larger than twice the leaf count of optimal. \(370\) vs. \(2(86)=172\).
Time = 2.62 (sec) , antiderivative size = 371, normalized size of antiderivative = 4.08
method | result | size |
default | \(-\frac {4 a^{3} \sqrt {-\left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (18 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-10 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-6 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-10 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+5 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}{3 \left (4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(371\) |
Input:
int(cos(d*x+c)^(1/2)*(a+a*sec(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
-4/3*a^3*(-(-2*cos(1/2*d*x+1/2*c)^2+1)*sin(1/2*d*x+1/2*c)^2)^(1/2)/(4*sin( 1/2*d*x+1/2*c)^4-4*sin(1/2*d*x+1/2*c)^2+1)/sin(1/2*d*x+1/2*c)^3*(18*sin(1/ 2*d*x+1/2*c)^4*cos(1/2*d*x+1/2*c)-10*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1 /2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*sin(1/2*d*x +1/2*c)^2-6*(sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1 /2))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*sin(1/2*d*x+1/2*c)^2-10*cos(1/2*d*x+ 1/2*c)*sin(1/2*d*x+1/2*c)^2+5*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+ 1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))+3*(sin(1/2*d*x+1/2 *c)^2)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*(2*sin(1/2*d*x+1/2*c)^2 -1)^(1/2))*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/(2*cos(1/2 *d*x+1/2*c)^2-1)^(1/2)/d
Result contains complex when optimal does not.
Time = 0.10 (sec) , antiderivative size = 187, normalized size of antiderivative = 2.05 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=-\frac {2 \, {\left (5 i \, \sqrt {2} a^{3} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 i \, \sqrt {2} a^{3} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 i \, \sqrt {2} a^{3} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 i \, \sqrt {2} a^{3} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - {\left (9 \, a^{3} \cos \left (d x + c\right ) + a^{3}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )\right )}}{3 \, d \cos \left (d x + c\right )^{2}} \] Input:
integrate(cos(d*x+c)^(1/2)*(a+a*sec(d*x+c))^3,x, algorithm="fricas")
Output:
-2/3*(5*I*sqrt(2)*a^3*cos(d*x + c)^2*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) - 5*I*sqrt(2)*a^3*cos(d*x + c)^2*weierstrassPInverse( -4, 0, cos(d*x + c) - I*sin(d*x + c)) + 3*I*sqrt(2)*a^3*cos(d*x + c)^2*wei erstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - 3*I*sqrt(2)*a^3*cos(d*x + c)^2*weierstrassZeta(-4, 0, weierstrassPI nverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))) - (9*a^3*cos(d*x + c) + a^3) *sqrt(cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^2)
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=a^{3} \left (\int 3 \sqrt {\cos {\left (c + d x \right )}} \sec {\left (c + d x \right )}\, dx + \int 3 \sqrt {\cos {\left (c + d x \right )}} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sqrt {\cos {\left (c + d x \right )}} \sec ^{3}{\left (c + d x \right )}\, dx + \int \sqrt {\cos {\left (c + d x \right )}}\, dx\right ) \] Input:
integrate(cos(d*x+c)**(1/2)*(a+a*sec(d*x+c))**3,x)
Output:
a**3*(Integral(3*sqrt(cos(c + d*x))*sec(c + d*x), x) + Integral(3*sqrt(cos (c + d*x))*sec(c + d*x)**2, x) + Integral(sqrt(cos(c + d*x))*sec(c + d*x)* *3, x) + Integral(sqrt(cos(c + d*x)), x))
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{3} \sqrt {\cos \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^(1/2)*(a+a*sec(d*x+c))^3,x, algorithm="maxima")
Output:
integrate((a*sec(d*x + c) + a)^3*sqrt(cos(d*x + c)), x)
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{3} \sqrt {\cos \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^(1/2)*(a+a*sec(d*x+c))^3,x, algorithm="giac")
Output:
integrate((a*sec(d*x + c) + a)^3*sqrt(cos(d*x + c)), x)
Time = 10.72 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.38 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=\frac {2\,\left (a^3\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )+3\,a^3\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )\right )}{d}+\frac {6\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \] Input:
int(cos(c + d*x)^(1/2)*(a + a/cos(c + d*x))^3,x)
Output:
(2*(a^3*ellipticE(c/2 + (d*x)/2, 2) + 3*a^3*ellipticF(c/2 + (d*x)/2, 2)))/ d + (6*a^3*sin(c + d*x)*hypergeom([-1/4, 1/2], 3/4, cos(c + d*x)^2))/(d*co s(c + d*x)^(1/2)*(sin(c + d*x)^2)^(1/2)) + (2*a^3*sin(c + d*x)*hypergeom([ -3/4, 1/2], 1/4, cos(c + d*x)^2))/(3*d*cos(c + d*x)^(3/2)*(sin(c + d*x)^2) ^(1/2))
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x))^3 \, dx=a^{3} \left (\int \sqrt {\cos \left (d x +c \right )}d x +\int \sqrt {\cos \left (d x +c \right )}\, \sec \left (d x +c \right )^{3}d x +3 \left (\int \sqrt {\cos \left (d x +c \right )}\, \sec \left (d x +c \right )^{2}d x \right )+3 \left (\int \sqrt {\cos \left (d x +c \right )}\, \sec \left (d x +c \right )d x \right )\right ) \] Input:
int(cos(d*x+c)^(1/2)*(a+a*sec(d*x+c))^3,x)
Output:
a**3*(int(sqrt(cos(c + d*x)),x) + int(sqrt(cos(c + d*x))*sec(c + d*x)**3,x ) + 3*int(sqrt(cos(c + d*x))*sec(c + d*x)**2,x) + 3*int(sqrt(cos(c + d*x)) *sec(c + d*x),x))