\(\int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx\) [474]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F(-2)]
Giac [A] (verification not implemented)
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 124 \[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=-\frac {(2 a-b) \text {arctanh}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )}{4 \sqrt {a-b} d}+\frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )}{4 \sqrt {a+b} d}+\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{2 d} \] Output:

-1/4*(2*a-b)*arctanh((a+b*sin(d*x+c))^(1/2)/(a-b)^(1/2))/(a-b)^(1/2)/d+1/4 
*(2*a+b)*arctanh((a+b*sin(d*x+c))^(1/2)/(a+b)^(1/2))/(a+b)^(1/2)/d+1/2*sec 
(d*x+c)*(a+b*sin(d*x+c))^(1/2)*tan(d*x+c)/d
 

Mathematica [A] (verified)

Time = 0.78 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.15 \[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\frac {-\sqrt {a-b} \left (2 a^2+a b-b^2\right ) \text {arctanh}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )+(a-b) \left (\sqrt {a+b} (2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )+2 (a+b) \sec (c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)\right )}{4 \left (a^2-b^2\right ) d} \] Input:

Integrate[Sec[c + d*x]^3*Sqrt[a + b*Sin[c + d*x]],x]
 

Output:

(-(Sqrt[a - b]*(2*a^2 + a*b - b^2)*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/Sqrt[a 
 - b]]) + (a - b)*(Sqrt[a + b]*(2*a + b)*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/ 
Sqrt[a + b]] + 2*(a + b)*Sec[c + d*x]*Sqrt[a + b*Sin[c + d*x]]*Tan[c + d*x 
]))/(4*(a^2 - b^2)*d)
 

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.21, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3042, 3147, 494, 27, 654, 25, 1480, 220}

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 ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a+b \sin (c+d x)}}{\cos (c+d x)^3}dx\)

\(\Big \downarrow \) 3147

\(\displaystyle \frac {b^3 \int \frac {\sqrt {a+b \sin (c+d x)}}{\left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 494

\(\displaystyle \frac {b^3 \left (\frac {\sin (c+d x) \sqrt {a+b \sin (c+d x)}}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int -\frac {2 a+b \sin (c+d x)}{2 \sqrt {a+b \sin (c+d x)} \left (b^2-b^2 \sin ^2(c+d x)\right )}d(b \sin (c+d x))}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^3 \left (\frac {\int \frac {2 a+b \sin (c+d x)}{\sqrt {a+b \sin (c+d x)} \left (b^2-b^2 \sin ^2(c+d x)\right )}d(b \sin (c+d x))}{4 b^2}+\frac {\sin (c+d x) \sqrt {a+b \sin (c+d x)}}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}\right )}{d}\)

\(\Big \downarrow \) 654

\(\displaystyle \frac {b^3 \left (\frac {\int -\frac {b^2 \sin ^2(c+d x)+a}{b^4 \sin ^4(c+d x)-2 a b^2 \sin ^2(c+d x)+a^2-b^2}d\sqrt {a+b \sin (c+d x)}}{2 b^2}+\frac {\sin (c+d x) \sqrt {a+b \sin (c+d x)}}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}\right )}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {b^3 \left (\frac {\sin (c+d x) \sqrt {a+b \sin (c+d x)}}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int \frac {b^2 \sin ^2(c+d x)+a}{b^4 \sin ^4(c+d x)-2 a b^2 \sin ^2(c+d x)+a^2-b^2}d\sqrt {a+b \sin (c+d x)}}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 1480

\(\displaystyle \frac {b^3 \left (\frac {-\frac {(2 a+b) \int \frac {1}{b^2 \sin ^2(c+d x)-a-b}d\sqrt {a+b \sin (c+d x)}}{2 b}-\frac {1}{2} \left (1-\frac {2 a}{b}\right ) \int \frac {1}{b^2 \sin ^2(c+d x)-a+b}d\sqrt {a+b \sin (c+d x)}}{2 b^2}+\frac {\sin (c+d x) \sqrt {a+b \sin (c+d x)}}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}\right )}{d}\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {b^3 \left (\frac {\frac {\left (1-\frac {2 a}{b}\right ) \text {arctanh}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a-b}}\right )}{2 \sqrt {a-b}}+\frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \sin (c+d x)}}{\sqrt {a+b}}\right )}{2 b \sqrt {a+b}}}{2 b^2}+\frac {\sin (c+d x) \sqrt {a+b \sin (c+d x)}}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}\right )}{d}\)

Input:

Int[Sec[c + d*x]^3*Sqrt[a + b*Sin[c + d*x]],x]
 

Output:

(b^3*((((1 - (2*a)/b)*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/Sqrt[a - b]])/(2*Sq 
rt[a - b]) + ((2*a + b)*ArcTanh[Sqrt[a + b*Sin[c + d*x]]/Sqrt[a + b]])/(2* 
b*Sqrt[a + b]))/(2*b^2) + (Sin[c + d*x]*Sqrt[a + b*Sin[c + d*x]])/(2*b*(b^ 
2 - b^2*Sin[c + d*x]^2))))/d
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

rule 494
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
(-x)*(c + d*x)^n*((a + b*x^2)^(p + 1)/(2*a*(p + 1))), x] + Simp[1/(2*a*(p + 
 1))   Int[(c + d*x)^(n - 1)*(a + b*x^2)^(p + 1)*(c*(2*p + 3) + d*(n + 2*p 
+ 3)*x), x], x] /; FreeQ[{a, b, c, d}, x] && LtQ[p, -1] && GtQ[n, 0] && (Lt 
Q[n, 1] || (ILtQ[n + 2*p + 3, 0] && NeQ[n, 2])) && IntQuadraticQ[a, 0, b, c 
, d, n, p, x]
 

rule 654
Int[((f_.) + (g_.)*(x_))/(Sqrt[(d_.) + (e_.)*(x_)]*((a_) + (c_.)*(x_)^2)), 
x_Symbol] :> Simp[2   Subst[Int[(e*f - d*g + g*x^2)/(c*d^2 + a*e^2 - 2*c*d* 
x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e, f, g}, x]
 

rule 1480
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q))   Int[1/( 
b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q))   Int[1/(b/2 
+ q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] 
 && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3147
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m 
_.), x_Symbol] :> Simp[1/(b^p*f)   Subst[Int[(a + x)^m*(b^2 - x^2)^((p - 1) 
/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && IntegerQ[(p 
 - 1)/2] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.18

method result size
default \(\frac {2 b^{3} \left (\frac {-\frac {\sqrt {a +b \sin \left (d x +c \right )}\, b}{2 \left (b \sin \left (d x +c \right )+b \right )}+\frac {\left (2 a -b \right ) \arctan \left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {-a +b}}\right )}{2 \sqrt {-a +b}}}{4 b^{3}}-\frac {\frac {\sqrt {a +b \sin \left (d x +c \right )}\, b}{2 b \sin \left (d x +c \right )-2 b}-\frac {\left (2 a +b \right ) \operatorname {arctanh}\left (\frac {\sqrt {a +b \sin \left (d x +c \right )}}{\sqrt {a +b}}\right )}{2 \sqrt {a +b}}}{4 b^{3}}\right )}{d}\) \(146\)

Input:

int(sec(d*x+c)^3*(a+b*sin(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
 

Output:

2*b^3*(1/4/b^3*(-1/2*(a+b*sin(d*x+c))^(1/2)*b/(b*sin(d*x+c)+b)+1/2*(2*a-b) 
/(-a+b)^(1/2)*arctan((a+b*sin(d*x+c))^(1/2)/(-a+b)^(1/2)))-1/4/b^3*(1/2*(a 
+b*sin(d*x+c))^(1/2)*b/(b*sin(d*x+c)-b)-1/2*(2*a+b)/(a+b)^(1/2)*arctanh((a 
+b*sin(d*x+c))^(1/2)/(a+b)^(1/2))))/d
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 387 vs. \(2 (104) = 208\).

Time = 0.44 (sec) , antiderivative size = 2101, normalized size of antiderivative = 16.94 \[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\text {Too large to display} \] Input:

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c))^(1/2),x, algorithm="fricas")
 

Output:

[1/32*((2*a^2 - a*b - b^2)*sqrt(a + b)*cos(d*x + c)^2*log((b^4*cos(d*x + c 
)^4 + 128*a^4 + 256*a^3*b + 320*a^2*b^2 + 256*a*b^3 + 72*b^4 - 8*(20*a^2*b 
^2 + 28*a*b^3 + 9*b^4)*cos(d*x + c)^2 + 8*(16*a^3 + 24*a^2*b + 20*a*b^2 + 
8*b^3 - (10*a*b^2 + 7*b^3)*cos(d*x + c)^2 - (b^3*cos(d*x + c)^2 - 24*a^2*b 
 - 28*a*b^2 - 8*b^3)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sqrt(a + b) + 
4*(64*a^3*b + 112*a^2*b^2 + 64*a*b^3 + 14*b^4 - (8*a*b^3 + 7*b^4)*cos(d*x 
+ c)^2)*sin(d*x + c))/(cos(d*x + c)^4 - 8*cos(d*x + c)^2 + 4*(cos(d*x + c) 
^2 - 2)*sin(d*x + c) + 8)) - (2*a^2 + a*b - b^2)*sqrt(a - b)*cos(d*x + c)^ 
2*log((b^4*cos(d*x + c)^4 + 128*a^4 - 256*a^3*b + 320*a^2*b^2 - 256*a*b^3 
+ 72*b^4 - 8*(20*a^2*b^2 - 28*a*b^3 + 9*b^4)*cos(d*x + c)^2 + 8*(16*a^3 - 
24*a^2*b + 20*a*b^2 - 8*b^3 - (10*a*b^2 - 7*b^3)*cos(d*x + c)^2 - (b^3*cos 
(d*x + c)^2 - 24*a^2*b + 28*a*b^2 - 8*b^3)*sin(d*x + c))*sqrt(b*sin(d*x + 
c) + a)*sqrt(a - b) + 4*(64*a^3*b - 112*a^2*b^2 + 64*a*b^3 - 14*b^4 - (8*a 
*b^3 - 7*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(cos(d*x + c)^4 - 8*cos(d*x + 
c)^2 - 4*(cos(d*x + c)^2 - 2)*sin(d*x + c) + 8)) + 16*(a^2 - b^2)*sqrt(b*s 
in(d*x + c) + a)*sin(d*x + c))/((a^2 - b^2)*d*cos(d*x + c)^2), -1/32*(2*(2 
*a^2 - a*b - b^2)*sqrt(-a - b)*arctan(-1/4*(b^2*cos(d*x + c)^2 - 8*a^2 - 8 
*a*b - 2*b^2 - 2*(4*a*b + 3*b^2)*sin(d*x + c))*sqrt(b*sin(d*x + c) + a)*sq 
rt(-a - b)/(2*a^3 + 3*a^2*b + 2*a*b^2 + b^3 - (a*b^2 + b^3)*cos(d*x + c)^2 
 + (3*a^2*b + 4*a*b^2 + b^3)*sin(d*x + c)))*cos(d*x + c)^2 + (2*a^2 + a...
 

Sympy [F]

\[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \sqrt {a + b \sin {\left (c + d x \right )}} \sec ^{3}{\left (c + d x \right )}\, dx \] Input:

integrate(sec(d*x+c)**3*(a+b*sin(d*x+c))**(1/2),x)
 

Output:

Integral(sqrt(a + b*sin(c + d*x))*sec(c + d*x)**3, x)
 

Maxima [F(-2)]

Exception generated. \[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c))^(1/2),x, algorithm="maxima")
 

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a-4*b>0)', see `assume?` for m 
ore detail
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.28 \[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\frac {b^{3} {\left (\frac {{\left (2 \, a - b\right )} \arctan \left (\frac {\sqrt {b \sin \left (d x + c\right ) + a}}{\sqrt {-a + b}}\right )}{\sqrt {-a + b} b^{3}} - \frac {{\left (2 \, a + b\right )} \arctan \left (\frac {\sqrt {b \sin \left (d x + c\right ) + a}}{\sqrt {-a - b}}\right )}{\sqrt {-a - b} b^{3}} - \frac {2 \, {\left ({\left (b \sin \left (d x + c\right ) + a\right )}^{\frac {3}{2}} - \sqrt {b \sin \left (d x + c\right ) + a} a\right )}}{{\left ({\left (b \sin \left (d x + c\right ) + a\right )}^{2} - 2 \, {\left (b \sin \left (d x + c\right ) + a\right )} a + a^{2} - b^{2}\right )} b^{2}}\right )}}{4 \, d} \] Input:

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c))^(1/2),x, algorithm="giac")
 

Output:

1/4*b^3*((2*a - b)*arctan(sqrt(b*sin(d*x + c) + a)/sqrt(-a + b))/(sqrt(-a 
+ b)*b^3) - (2*a + b)*arctan(sqrt(b*sin(d*x + c) + a)/sqrt(-a - b))/(sqrt( 
-a - b)*b^3) - 2*((b*sin(d*x + c) + a)^(3/2) - sqrt(b*sin(d*x + c) + a)*a) 
/(((b*sin(d*x + c) + a)^2 - 2*(b*sin(d*x + c) + a)*a + a^2 - b^2)*b^2))/d
 

Mupad [F(-1)]

Timed out. \[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \frac {\sqrt {a+b\,\sin \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^3} \,d x \] Input:

int((a + b*sin(c + d*x))^(1/2)/cos(c + d*x)^3,x)
 

Output:

int((a + b*sin(c + d*x))^(1/2)/cos(c + d*x)^3, x)
 

Reduce [F]

\[ \int \sec ^3(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \sqrt {\sin \left (d x +c \right ) b +a}\, \sec \left (d x +c \right )^{3}d x \] Input:

int(sec(d*x+c)^3*(a+b*sin(d*x+c))^(1/2),x)
 

Output:

int(sqrt(sin(c + d*x)*b + a)*sec(c + d*x)**3,x)