Integrand size = 23, antiderivative size = 72 \[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {2} d}+\frac {\sec (c+d x) \sqrt {a+a \sin (c+d x)}}{d} \] Output:
-1/2*a^(1/2)*arctanh(1/2*a^(1/2)*cos(d*x+c)*2^(1/2)/(a+a*sin(d*x+c))^(1/2) )*2^(1/2)/d+sec(d*x+c)*(a+a*sin(d*x+c))^(1/2)/d
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.34 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.64 \[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\frac {\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {1}{2} (1-\sin (c+d x))\right ) \sec (c+d x) \sqrt {a (1+\sin (c+d x))}}{d} \] Input:
Integrate[Sec[c + d*x]^2*Sqrt[a + a*Sin[c + d*x]],x]
Output:
(Hypergeometric2F1[-1/2, 1, 1/2, (1 - Sin[c + d*x])/2]*Sec[c + d*x]*Sqrt[a *(1 + Sin[c + d*x])])/d
Time = 0.33 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 3154, 3042, 3128, 219}
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 ^2(c+d x) \sqrt {a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a \sin (c+d x)+a}}{\cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3154 |
\(\displaystyle \frac {1}{2} a \int \frac {1}{\sqrt {\sin (c+d x) a+a}}dx+\frac {\sec (c+d x) \sqrt {a \sin (c+d x)+a}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} a \int \frac {1}{\sqrt {\sin (c+d x) a+a}}dx+\frac {\sec (c+d x) \sqrt {a \sin (c+d x)+a}}{d}\) |
\(\Big \downarrow \) 3128 |
\(\displaystyle \frac {\sec (c+d x) \sqrt {a \sin (c+d x)+a}}{d}-\frac {a \int \frac {1}{2 a-\frac {a^2 \cos ^2(c+d x)}{\sin (c+d x) a+a}}d\frac {a \cos (c+d x)}{\sqrt {\sin (c+d x) a+a}}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\sec (c+d x) \sqrt {a \sin (c+d x)+a}}{d}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a \sin (c+d x)+a}}\right )}{\sqrt {2} d}\) |
Input:
Int[Sec[c + d*x]^2*Sqrt[a + a*Sin[c + d*x]],x]
Output:
-((Sqrt[a]*ArcTanh[(Sqrt[a]*Cos[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sin[c + d*x] ])])/(Sqrt[2]*d)) + (Sec[c + d*x]*Sqrt[a + a*Sin[c + d*x]])/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2/d Subst[Int[1/(2*a - x^2), x], x, b*(Cos[c + d*x]/Sqrt[a + b*Sin[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(p + 1))), x] + Simp[a*((m + p + 1)/(g^2*(p + 1))) Int[(g* Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, 0] && LeQ[p, -2*m] && IntegersQ [m + 1/2, 2*p]
Time = 0.18 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.15
method | result | size |
default | \(-\frac {\left (1+\sin \left (d x +c \right )\right ) \left (\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \sqrt {a -a \sin \left (d x +c \right )}-2 a^{\frac {3}{2}}\right )}{2 \sqrt {a}\, \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(83\) |
Input:
int(sec(d*x+c)^2*(a+a*sin(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/2/a^(1/2)*(1+sin(d*x+c))*(2^(1/2)*arctanh(1/2*(a-a*sin(d*x+c))^(1/2)*2^ (1/2)/a^(1/2))*a*(a-a*sin(d*x+c))^(1/2)-2*a^(3/2))/cos(d*x+c)/(a+a*sin(d*x +c))^(1/2)/d
Leaf count of result is larger than twice the leaf count of optimal. 159 vs. \(2 (61) = 122\).
Time = 0.10 (sec) , antiderivative size = 159, normalized size of antiderivative = 2.21 \[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\frac {\sqrt {2} \sqrt {a} \cos \left (d x + c\right ) \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - \sin \left (d x + c\right ) + 1\right )} + 3 \, a \cos \left (d x + c\right ) - {\left (a \cos \left (d x + c\right ) - 2 \, a\right )} \sin \left (d x + c\right ) + 2 \, a}{\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2}\right ) + 4 \, \sqrt {a \sin \left (d x + c\right ) + a}}{4 \, d \cos \left (d x + c\right )} \] Input:
integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))^(1/2),x, algorithm="fricas")
Output:
1/4*(sqrt(2)*sqrt(a)*cos(d*x + c)*log(-(a*cos(d*x + c)^2 - 2*sqrt(2)*sqrt( a*sin(d*x + c) + a)*sqrt(a)*(cos(d*x + c) - sin(d*x + c) + 1) + 3*a*cos(d* x + c) - (a*cos(d*x + c) - 2*a)*sin(d*x + c) + 2*a)/(cos(d*x + c)^2 - (cos (d*x + c) + 2)*sin(d*x + c) - cos(d*x + c) - 2)) + 4*sqrt(a*sin(d*x + c) + a))/(d*cos(d*x + c))
\[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\int \sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )} \sec ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)**2*(a+a*sin(d*x+c))**(1/2),x)
Output:
Integral(sqrt(a*(sin(c + d*x) + 1))*sec(c + d*x)**2, x)
\[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\int { \sqrt {a \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{2} \,d x } \] Input:
integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate(sqrt(a*sin(d*x + c) + a)*sec(d*x + c)^2, x)
Time = 0.16 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.42 \[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\frac {\sqrt {2} {\left (\log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - \frac {2 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )}\right )} \sqrt {a}}{4 \, d} \] Input:
integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))^(1/2),x, algorithm="giac")
Output:
1/4*sqrt(2)*(log(sin(-1/4*pi + 1/2*d*x + 1/2*c) + 1)*sgn(cos(-1/4*pi + 1/2 *d*x + 1/2*c)) - log(-sin(-1/4*pi + 1/2*d*x + 1/2*c) + 1)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c)) - 2*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))/sin(-1/4*pi + 1/2*d*x + 1/2*c))*sqrt(a)/d
Timed out. \[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\int \frac {\sqrt {a+a\,\sin \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^2} \,d x \] Input:
int((a + a*sin(c + d*x))^(1/2)/cos(c + d*x)^2,x)
Output:
int((a + a*sin(c + d*x))^(1/2)/cos(c + d*x)^2, x)
\[ \int \sec ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx=\sqrt {a}\, \left (\int \sqrt {\sin \left (d x +c \right )+1}\, \sec \left (d x +c \right )^{2}d x \right ) \] Input:
int(sec(d*x+c)^2*(a+a*sin(d*x+c))^(1/2),x)
Output:
sqrt(a)*int(sqrt(sin(c + d*x) + 1)*sec(c + d*x)**2,x)