Integrand size = 23, antiderivative size = 44 \[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 (A-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \] Output:
2*(A-C)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+2*C*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 = 2.85 (sec) , antiderivative size = 192, normalized size of antiderivative = 4.36 \[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {\cos ^{\frac {3}{2}}(c+d x) \left (A+C \sec ^2(c+d x)\right ) \left (-2 (A-C) \, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sec (c) \sin (d x+\arctan (\tan (c)))+\csc (c) \left (3 (A-C) \cos (c-d x-\arctan (\tan (c))) \sec (c)+(A-C) \cos (c+d x+\arctan (\tan (c))) \sec (c)-2 ((A-2 C) \cos (d x)+A \cos (2 c+d x)) \sqrt {\sec ^2(c)}\right ) \sqrt {\sin ^2(d x+\arctan (\tan (c)))}\right )}{d (A+2 C+A \cos (2 (c+d x))) \sqrt {\sec ^2(c)} \sqrt {\sin ^2(d x+\arctan (\tan (c)))}} \] Input:
Integrate[Sqrt[Cos[c + d*x]]*(A + C*Sec[c + d*x]^2),x]
Output:
(Cos[c + d*x]^(3/2)*(A + C*Sec[c + d*x]^2)*(-2*(A - C)*HypergeometricPFQ[{ -1/2, -1/4}, {3/4}, Cos[d*x + ArcTan[Tan[c]]]^2]*Sec[c]*Sin[d*x + ArcTan[T an[c]]] + Csc[c]*(3*(A - C)*Cos[c - d*x - ArcTan[Tan[c]]]*Sec[c] + (A - C) *Cos[c + d*x + ArcTan[Tan[c]]]*Sec[c] - 2*((A - 2*C)*Cos[d*x] + A*Cos[2*c + d*x])*Sqrt[Sec[c]^2])*Sqrt[Sin[d*x + ArcTan[Tan[c]]]^2]))/(d*(A + 2*C + A*Cos[2*(c + d*x)])*Sqrt[Sec[c]^2]*Sqrt[Sin[d*x + ArcTan[Tan[c]]]^2])
Time = 0.34 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4554, 3042, 3491, 3042, 3119}
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)} \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\cos (c+d x)} \left (A+C \sec (c+d x)^2\right )dx\) |
\(\Big \downarrow \) 4554 |
\(\displaystyle \int \frac {A \cos ^2(c+d x)+C}{\cos ^{\frac {3}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A \sin \left (c+d x+\frac {\pi }{2}\right )^2+C}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3491 |
\(\displaystyle (A-C) \int \sqrt {\cos (c+d x)}dx+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-C) \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {2 (A-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\) |
Input:
Int[Sqrt[Cos[c + d*x]]*(A + C*Sec[c + d*x]^2),x]
Output:
(2*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*C*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x _)]^2), x_Symbol] :> Simp[A*Cos[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Simp[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)) Int[(b*Sin[e + f* x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]
Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(m_)*((A_.) + (C_.)*sec[(e_.) + (f_.)*( x_)]^2), x_Symbol] :> Simp[b^2 Int[(b*Cos[e + f*x])^(m - 2)*(C + A*Cos[e + f*x]^2), x], x] /; FreeQ[{b, e, f, A, C, m}, x] && !IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(148\) vs. \(2(44)=88\).
Time = 2.37 (sec) , antiderivative size = 149, normalized size of antiderivative = 3.39
method | result | size |
default | \(\frac {2 A \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 {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) C -2 C \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 {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {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}\) | \(149\) |
Input:
int(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
2*(A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*Ellipti cE(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)*C -C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE (cos(1/2*d*x+1/2*c),2^(1/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.09 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.41 \[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {\sqrt {2} {\left (i \, A - i \, C\right )} \cos \left (d x + c\right ) {\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 ) + \sqrt {2} {\left (-i \, A + i \, C\right )} \cos \left (d x + c\right ) {\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 ) + 2 \, C \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \] Input:
integrate(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="fricas")
Output:
(sqrt(2)*(I*A - I*C)*cos(d*x + c)*weierstrassZeta(-4, 0, weierstrassPInver se(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + sqrt(2)*(-I*A + I*C)*cos(d*x + c)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin (d*x + c))) + 2*C*sqrt(cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c))
\[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}}\, dx \] Input:
integrate(cos(d*x+c)**(1/2)*(A+C*sec(d*x+c)**2),x)
Output:
Integral((A + C*sec(c + d*x)**2)*sqrt(cos(c + d*x)), x)
\[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} \sqrt {\cos \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="maxima")
Output:
integrate((C*sec(d*x + c)^2 + A)*sqrt(cos(d*x + c)), x)
\[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} \sqrt {\cos \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
integrate((C*sec(d*x + c)^2 + A)*sqrt(cos(d*x + c)), x)
Time = 13.21 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.36 \[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,A\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,\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}} \] Input:
int(cos(c + d*x)^(1/2)*(A + C/cos(c + d*x)^2),x)
Output:
(2*A*ellipticE(c/2 + (d*x)/2, 2))/d + (2*C*sin(c + d*x)*hypergeom([-1/4, 1 /2], 3/4, cos(c + d*x)^2))/(d*cos(c + d*x)^(1/2)*(sin(c + d*x)^2)^(1/2))
\[ \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\left (\int \sqrt {\cos \left (d x +c \right )}d x \right ) a +\left (\int \sqrt {\cos \left (d x +c \right )}\, \sec \left (d x +c \right )^{2}d x \right ) c \] Input:
int(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x)
Output:
int(sqrt(cos(c + d*x)),x)*a + int(sqrt(cos(c + d*x))*sec(c + d*x)**2,x)*c