Integrand size = 27, antiderivative size = 96 \[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \sqrt {a} A \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a C \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d} \] Output:
2*a^(1/2)*A*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/d+2/3*a*C*ta n(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/3*C*(a+a*sec(d*x+c))^(1/2)*tan(d*x+c)/ d
Time = 0.97 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.00 \[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \left (3 A \arctan \left (\sqrt {-1+\sec (c+d x)}\right ) \cos (c+d x)+C (1+2 \cos (c+d x)) \sqrt {-1+\sec (c+d x)}\right ) \sec (c+d x) \sqrt {a (1+\sec (c+d x))} \tan \left (\frac {1}{2} (c+d x)\right )}{3 d \sqrt {-1+\sec (c+d x)}} \] Input:
Integrate[Sqrt[a + a*Sec[c + d*x]]*(A + C*Sec[c + d*x]^2),x]
Output:
(2*(3*A*ArcTan[Sqrt[-1 + Sec[c + d*x]]]*Cos[c + d*x] + C*(1 + 2*Cos[c + d* x])*Sqrt[-1 + Sec[c + d*x]])*Sec[c + d*x]*Sqrt[a*(1 + Sec[c + d*x])]*Tan[( c + d*x)/2])/(3*d*Sqrt[-1 + Sec[c + d*x]])
Time = 0.59 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.08, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4543, 27, 3042, 4403, 3042, 4261, 216, 4279}
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 {a \sec (c+d x)+a} \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a \csc \left (c+d x+\frac {\pi }{2}\right )+a} \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4543 |
\(\displaystyle \frac {2 \int \frac {1}{2} \sqrt {\sec (c+d x) a+a} (3 a A+a C \sec (c+d x))dx}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \sqrt {\sec (c+d x) a+a} (3 a A+a C \sec (c+d x))dx}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a} \left (3 a A+a C \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 4403 |
\(\displaystyle \frac {3 a A \int \sqrt {\sec (c+d x) a+a}dx+a C \int \sec (c+d x) \sqrt {\sec (c+d x) a+a}dx}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 a A \int \sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+a C \int \csc \left (c+d x+\frac {\pi }{2}\right ) \sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 4261 |
\(\displaystyle \frac {a C \int \csc \left (c+d x+\frac {\pi }{2}\right ) \sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx-\frac {6 a^2 A \int \frac {1}{\frac {a^2 \tan ^2(c+d x)}{\sec (c+d x) a+a}+a}d\left (-\frac {a \tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{d}}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {a C \int \csc \left (c+d x+\frac {\pi }{2}\right ) \sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+\frac {6 a^{3/2} A \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
\(\Big \downarrow \) 4279 |
\(\displaystyle \frac {\frac {6 a^{3/2} A \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {2 a^2 C \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}\) |
Input:
Int[Sqrt[a + a*Sec[c + d*x]]*(A + C*Sec[c + d*x]^2),x]
Output:
(2*C*Sqrt[a + a*Sec[c + d*x]]*Tan[c + d*x])/(3*d) + ((6*a^(3/2)*A*ArcTan[( Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d + (2*a^2*C*Tan[c + d*x] )/(d*Sqrt[a + a*Sec[c + d*x]]))/(3*a)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*(b/d) Subst[Int[1/(a + x^2), x], x, b*(Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_S ymbol] :> Simp[-2*b*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]])), x] /; Free Q[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]
Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(d_ .) + (c_)), x_Symbol] :> Simp[c Int[Sqrt[a + b*Csc[e + f*x]], x], x] + Si mp[d Int[Sqrt[a + b*Csc[e + f*x]]*Csc[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_. ) + (a_))^(m_.), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^ m/(f*(m + 1))), x] + Simp[1/(b*(m + 1)) Int[(a + b*Csc[e + f*x])^m*Simp[A *b*(m + 1) + a*C*m*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Time = 0.68 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.39
method | result | size |
default | \(-\frac {2 \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (C \left (-2 \sin \left (d x +c \right )-\tan \left (d x +c \right )\right )+3 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\csc \left (d x +c \right )+\cot \left (d x +c \right )\right )}{\sqrt {\csc \left (d x +c \right )^{2}-2 \csc \left (d x +c \right ) \cot \left (d x +c \right )+\cot \left (d x +c \right )^{2}-1}}\right ) A \right )}{3 d \left (\cos \left (d x +c \right )+1\right )}\) | \(133\) |
parts | \(\frac {A \sqrt {2}\, \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\right )}{d}+\frac {C \left (4 \sin \left (d x +c \right )+2 \tan \left (d x +c \right )\right ) \sqrt {a \left (1+\sec \left (d x +c \right )\right )}}{d \left (3 \cos \left (d x +c \right )+3\right )}\) | \(133\) |
Input:
int((a+a*sec(d*x+c))^(1/2)*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
-2/3/d*(a*(1+sec(d*x+c)))^(1/2)/(cos(d*x+c)+1)*(C*(-2*sin(d*x+c)-tan(d*x+c ))+3*(cos(d*x+c)+1)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(2^(1/2)*(-c sc(d*x+c)+cot(d*x+c))/(csc(d*x+c)^2-2*csc(d*x+c)*cot(d*x+c)+cot(d*x+c)^2-1 )^(1/2))*A)
Time = 0.10 (sec) , antiderivative size = 294, normalized size of antiderivative = 3.06 \[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\left [\frac {3 \, {\left (A \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (2 \, C \cos \left (d x + c\right ) + C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}}, -\frac {2 \, {\left (3 \, {\left (A \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (2 \, C \cos \left (d x + c\right ) + C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )\right )}}{3 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}}\right ] \] Input:
integrate((a+a*sec(d*x+c))^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="fricas")
Output:
[1/3*(3*(A*cos(d*x + c)^2 + A*cos(d*x + c))*sqrt(-a)*log((2*a*cos(d*x + c) ^2 - 2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d *x + c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1)) + 2*(2*C*cos(d*x + c) + C)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^2 + d*cos(d*x + c)), -2/3*(3*(A*cos(d*x + c)^2 + A*cos(d*x + c))*sqrt(a)*ar ctan(sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c))) - (2*C*cos(d*x + c) + C)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*s in(d*x + c))/(d*cos(d*x + c)^2 + d*cos(d*x + c))]
\[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + C \sec ^{2}{\left (c + d x \right )}\right )\, dx \] Input:
integrate((a+a*sec(d*x+c))**(1/2)*(A+C*sec(d*x+c)**2),x)
Output:
Integral(sqrt(a*(sec(c + d*x) + 1))*(A + C*sec(c + d*x)**2), x)
\[ \int \sqrt {a+a \sec (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 {a \sec \left (d x + c\right ) + a} \,d x } \] Input:
integrate((a+a*sec(d*x+c))^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="maxima")
Output:
1/6*(8*C*sqrt(a)*sin(3/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 3*(2*A*d*integrate((((cos(6*d*x + 6*c)*cos(2*d*x + 2*c) + 2*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + sin(6*d*x + 6*c)*sin(2*d*x + 2*c) + 2*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*cos(5/2*a rctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) + (cos(2*d*x + 2*c)*sin(6*d*x + 6*c) + 2*cos(2*d*x + 2*c)*sin(4*d*x + 4*c) - cos(6*d*x + 6*c)*sin(2*d*x + 2*c) - 2*cos(4*d*x + 4*c)*sin(2*d*x + 2*c))*sin(5/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2* c) + 1)) - ((cos(2*d*x + 2*c)*sin(6*d*x + 6*c) + 2*cos(2*d*x + 2*c)*sin(4* d*x + 4*c) - cos(6*d*x + 6*c)*sin(2*d*x + 2*c) - 2*cos(4*d*x + 4*c)*sin(2* d*x + 2*c))*cos(5/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) - (cos(6* d*x + 6*c)*cos(2*d*x + 2*c) + 2*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2* d*x + 2*c)^2 + sin(6*d*x + 6*c)*sin(2*d*x + 2*c) + 2*sin(4*d*x + 4*c)*sin( 2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*sin(5/2*arctan2(sin(2*d*x + 2*c), cos(2 *d*x + 2*c))))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))/( ((2*(2*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(6*d*x + 6*c) + cos(6*d*x + 6*c)^2 + 4*cos(4*d*x + 4*c)^2 + 4*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos (2*d*x + 2*c)^2 + 2*(2*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(6*d*x + 6* c) + sin(6*d*x + 6*c)^2 + 4*sin(4*d*x + 4*c)^2 + 4*sin(4*d*x + 4*c)*sin(2* d*x + 2*c) + sin(2*d*x + 2*c)^2)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(...
Leaf count of result is larger than twice the leaf count of optimal. 225 vs. \(2 (82) = 164\).
Time = 0.58 (sec) , antiderivative size = 225, normalized size of antiderivative = 2.34 \[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=-\frac {\frac {3 \, A \sqrt {-a} a \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{{\left | a \right |}} - \frac {2 \, {\left (\sqrt {2} C a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, \sqrt {2} C a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{3 \, d} \] Input:
integrate((a+a*sec(d*x+c))^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
-1/3*(3*A*sqrt(-a)*a*log(abs(2*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*ta n(1/2*d*x + 1/2*c)^2 + a))^2 - 4*sqrt(2)*abs(a) - 6*a)/abs(2*(sqrt(-a)*tan (1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 + 4*sqrt(2)*abs (a) - 6*a))*sgn(cos(d*x + c))/abs(a) - 2*(sqrt(2)*C*a^2*sgn(cos(d*x + c))* tan(1/2*d*x + 1/2*c)^2 - 3*sqrt(2)*C*a^2*sgn(cos(d*x + c)))*tan(1/2*d*x + 1/2*c)/((a*tan(1/2*d*x + 1/2*c)^2 - a)*sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a) ))/d
Timed out. \[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \] Input:
int((A + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^(1/2),x)
Output:
int((A + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^(1/2), x)
\[ \int \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx=\sqrt {a}\, \left (\left (\int \sqrt {\sec \left (d x +c \right )+1}d x \right ) a +\left (\int \sqrt {\sec \left (d x +c \right )+1}\, \sec \left (d x +c \right )^{2}d x \right ) c \right ) \] Input:
int((a+a*sec(d*x+c))^(1/2)*(A+C*sec(d*x+c)^2),x)
Output:
sqrt(a)*(int(sqrt(sec(c + d*x) + 1),x)*a + int(sqrt(sec(c + d*x) + 1)*sec( c + d*x)**2,x)*c)