Integrand size = 23, antiderivative size = 161 \[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=-\frac {56 a^4 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {32 a^4 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {66 a^4 \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {8 a^4 \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 a^4 \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{5 d} \] Output:
-56/5*a^4*cos(d*x+c)^(1/2)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))*sec(d*x+c )^(1/2)/d+32/3*a^4*cos(d*x+c)^(1/2)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2)) *sec(d*x+c)^(1/2)/d+66/5*a^4*sec(d*x+c)^(1/2)*sin(d*x+c)/d+8/3*a^4*sec(d*x +c)^(3/2)*sin(d*x+c)/d+2/5*a^4*sec(d*x+c)^(5/2)*sin(d*x+c)/d
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 4.49 (sec) , antiderivative size = 286, normalized size of antiderivative = 1.78 \[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=\frac {a^4 \sec ^8\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^4 \left (-\frac {8 i \sqrt {2} e^{-i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \cos ^4(c+d x) \left (21 \left (1+e^{2 i (c+d x)}\right )+21 \left (-1+e^{2 i c}\right ) \sqrt {1+e^{2 i (c+d x)}} \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},\frac {1}{2},\frac {3}{4},-e^{2 i (c+d x)}\right )+20 e^{i (c+d x)} \left (-1+e^{2 i c}\right ) \sqrt {1+e^{2 i (c+d x)}} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},-e^{2 i (c+d x)}\right )\right )}{-1+e^{2 i c}}+\frac {-3 (-61+5 \cos (2 c)) \cos (d x) \csc (c)+30 \cos (c) \sin (d x)+2 (20+3 \sec (c+d x)) \tan (c+d x)}{\sec ^{\frac {7}{2}}(c+d x)}\right )}{240 d} \] Input:
Integrate[(a + a*Sec[c + d*x])^4/Sqrt[Sec[c + d*x]],x]
Output:
(a^4*Sec[(c + d*x)/2]^8*(1 + Sec[c + d*x])^4*(((-8*I)*Sqrt[2]*Sqrt[E^(I*(c + d*x))/(1 + E^((2*I)*(c + d*x)))]*Cos[c + d*x]^4*(21*(1 + E^((2*I)*(c + d*x))) + 21*(-1 + E^((2*I)*c))*Sqrt[1 + E^((2*I)*(c + d*x))]*Hypergeometri c2F1[-1/4, 1/2, 3/4, -E^((2*I)*(c + d*x))] + 20*E^(I*(c + d*x))*(-1 + E^(( 2*I)*c))*Sqrt[1 + E^((2*I)*(c + d*x))]*Hypergeometric2F1[1/4, 1/2, 5/4, -E ^((2*I)*(c + d*x))]))/(E^(I*(c + d*x))*(-1 + E^((2*I)*c))) + (-3*(-61 + 5* Cos[2*c])*Cos[d*x]*Csc[c] + 30*Cos[c]*Sin[d*x] + 2*(20 + 3*Sec[c + d*x])*T an[c + d*x])/Sec[c + d*x]^(7/2)))/(240*d)
Time = 0.42 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {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 \frac {(a \sec (c+d x)+a)^4}{\sqrt {\sec (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4278 |
\(\displaystyle \int \left (a^4 \sec ^{\frac {7}{2}}(c+d x)+4 a^4 \sec ^{\frac {5}{2}}(c+d x)+6 a^4 \sec ^{\frac {3}{2}}(c+d x)+4 a^4 \sqrt {\sec (c+d x)}+\frac {a^4}{\sqrt {\sec (c+d x)}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 a^4 \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {8 a^4 \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {66 a^4 \sin (c+d x) \sqrt {\sec (c+d x)}}{5 d}+\frac {32 a^4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}-\frac {56 a^4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}\) |
Input:
Int[(a + a*Sec[c + d*x])^4/Sqrt[Sec[c + d*x]],x]
Output:
(-56*a^4*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/ (5*d) + (32*a^4*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (66*a^4*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (8*a^4*Sec [c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*a^4*Sec[c + d*x]^(5/2)*Sin[c + d* x])/(5*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]
Leaf count of result is larger than twice the leaf count of optimal. \(385\) vs. \(2(140)=280\).
Time = 4.95 (sec) , antiderivative size = 386, normalized size of antiderivative = 2.40
method | result | size |
default | \(-\frac {a^{4} \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 (\frac {328 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \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 )}{15 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}-\frac {56 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \left (\operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-\operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{5 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}-\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\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}}}{10 \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {1}{2}\right )^{3}}-\frac {132 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )}{5 \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}}}-\frac {4 \cos \left (\frac {d x}{2}+\frac {c}{2}\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 (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {1}{2}\right )^{2}}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(386\) |
parts | \(\text {Expression too large to display}\) | \(1031\) |
Input:
int((a+a*sec(d*x+c))^4/sec(d*x+c)^(1/2),x,method=_RETURNVERBOSE)
Output:
-a^4*(-(-2*cos(1/2*d*x+1/2*c)^2+1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(328/15*(si n(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(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)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2 ))-56/5*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(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)*(EllipticF(cos(1/2*d*x+1 /2*c),2^(1/2))-EllipticE(cos(1/2*d*x+1/2*c),2^(1/2)))-1/10*cos(1/2*d*x+1/2 *c)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/(cos(1/2*d*x+1/2* c)^2-1/2)^3-132/5*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)/(-(-2*cos(1/2*d* x+1/2*c)^2+1)*sin(1/2*d*x+1/2*c)^2)^(1/2)-4/3*cos(1/2*d*x+1/2*c)*(-2*sin(1 /2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/(cos(1/2*d*x+1/2*c)^2-1/2)^2)/ sin(1/2*d*x+1/2*c)/(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 = 202, normalized size of antiderivative = 1.25 \[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=-\frac {2 \, {\left (40 i \, \sqrt {2} a^{4} \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 ) - 40 i \, \sqrt {2} a^{4} \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 ) + 42 i \, \sqrt {2} a^{4} \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 ) - 42 i \, \sqrt {2} a^{4} \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 ) - \frac {{\left (99 \, a^{4} \cos \left (d x + c\right )^{2} + 20 \, a^{4} \cos \left (d x + c\right ) + 3 \, a^{4}\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}\right )}}{15 \, d \cos \left (d x + c\right )^{2}} \] Input:
integrate((a+a*sec(d*x+c))^4/sec(d*x+c)^(1/2),x, algorithm="fricas")
Output:
-2/15*(40*I*sqrt(2)*a^4*cos(d*x + c)^2*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) - 40*I*sqrt(2)*a^4*cos(d*x + c)^2*weierstrassPInver se(-4, 0, cos(d*x + c) - I*sin(d*x + c)) + 42*I*sqrt(2)*a^4*cos(d*x + c)^2 *weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d* x + c))) - 42*I*sqrt(2)*a^4*cos(d*x + c)^2*weierstrassZeta(-4, 0, weierstr assPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))) - (99*a^4*cos(d*x + c)^ 2 + 20*a^4*cos(d*x + c) + 3*a^4)*sin(d*x + c)/sqrt(cos(d*x + c)))/(d*cos(d *x + c)^2)
Timed out. \[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=\text {Timed out} \] Input:
integrate((a+a*sec(d*x+c))**4/sec(d*x+c)**(1/2),x)
Output:
Timed out
\[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{4}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \] Input:
integrate((a+a*sec(d*x+c))^4/sec(d*x+c)^(1/2),x, algorithm="maxima")
Output:
integrate((a*sec(d*x + c) + a)^4/sqrt(sec(d*x + c)), x)
\[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{4}}{\sqrt {\sec \left (d x + c\right )}} \,d x } \] Input:
integrate((a+a*sec(d*x+c))^4/sec(d*x+c)^(1/2),x, algorithm="giac")
Output:
integrate((a*sec(d*x + c) + a)^4/sqrt(sec(d*x + c)), x)
Timed out. \[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^4}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \] Input:
int((a + a/cos(c + d*x))^4/(1/cos(c + d*x))^(1/2),x)
Output:
int((a + a/cos(c + d*x))^4/(1/cos(c + d*x))^(1/2), x)
\[ \int \frac {(a+a \sec (c+d x))^4}{\sqrt {\sec (c+d x)}} \, dx=a^{4} \left (\int \frac {\sqrt {\sec \left (d x +c \right )}}{\sec \left (d x +c \right )}d x +4 \left (\int \sqrt {\sec \left (d x +c \right )}d x \right )+\int \sqrt {\sec \left (d x +c \right )}\, \sec \left (d x +c \right )^{3}d x +4 \left (\int \sqrt {\sec \left (d x +c \right )}\, \sec \left (d x +c \right )^{2}d x \right )+6 \left (\int \sqrt {\sec \left (d x +c \right )}\, \sec \left (d x +c \right )d x \right )\right ) \] Input:
int((a+a*sec(d*x+c))^4/sec(d*x+c)^(1/2),x)
Output:
a**4*(int(sqrt(sec(c + d*x))/sec(c + d*x),x) + 4*int(sqrt(sec(c + d*x)),x) + int(sqrt(sec(c + d*x))*sec(c + d*x)**3,x) + 4*int(sqrt(sec(c + d*x))*se c(c + d*x)**2,x) + 6*int(sqrt(sec(c + d*x))*sec(c + d*x),x))