\(\int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx\) [68]

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

Optimal result

Integrand size = 25, antiderivative size = 100 \[ \int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx=\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}}\right )}{f}-\frac {\cos (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{f}+\frac {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2}}{3 a f} \] Output:

b^(1/2)*arctanh(b^(1/2)*sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2))/f-cos(f*x+e)* 
(a+b*sec(f*x+e)^2)^(1/2)/f+1/3*cos(f*x+e)^3*(a+b*sec(f*x+e)^2)^(3/2)/a/f
 

Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.20 \[ \int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx=\frac {\sqrt {2} \cos (e+f x) \left (3 a \sqrt {b} \text {arctanh}\left (\frac {\sqrt {b+a \cos ^2(e+f x)}}{\sqrt {b}}\right )+\sqrt {b+a \cos ^2(e+f x)} \left (-3 a+b+a \cos ^2(e+f x)\right )\right ) \sqrt {a+b \sec ^2(e+f x)}}{3 a f \sqrt {a+2 b+a \cos (2 (e+f x))}} \] Input:

Integrate[Sqrt[a + b*Sec[e + f*x]^2]*Sin[e + f*x]^3,x]
 

Output:

(Sqrt[2]*Cos[e + f*x]*(3*a*Sqrt[b]*ArcTanh[Sqrt[b + a*Cos[e + f*x]^2]/Sqrt 
[b]] + Sqrt[b + a*Cos[e + f*x]^2]*(-3*a + b + a*Cos[e + f*x]^2))*Sqrt[a + 
b*Sec[e + f*x]^2])/(3*a*f*Sqrt[a + 2*b + a*Cos[2*(e + f*x)]])
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.95, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 4622, 25, 358, 247, 224, 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 \sin ^3(e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sin (e+f x)^3 \sqrt {a+b \sec (e+f x)^2}dx\)

\(\Big \downarrow \) 4622

\(\displaystyle \frac {\int -\cos ^4(e+f x) \left (1-\sec ^2(e+f x)\right ) \sqrt {b \sec ^2(e+f x)+a}d\sec (e+f x)}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\int \cos ^4(e+f x) \left (1-\sec ^2(e+f x)\right ) \sqrt {b \sec ^2(e+f x)+a}d\sec (e+f x)}{f}\)

\(\Big \downarrow \) 358

\(\displaystyle \frac {\int \cos ^2(e+f x) \sqrt {b \sec ^2(e+f x)+a}d\sec (e+f x)+\frac {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2}}{3 a}}{f}\)

\(\Big \downarrow \) 247

\(\displaystyle \frac {b \int \frac {1}{\sqrt {b \sec ^2(e+f x)+a}}d\sec (e+f x)+\frac {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2}}{3 a}-\cos (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{f}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {b \int \frac {1}{1-\frac {b \sec ^2(e+f x)}{b \sec ^2(e+f x)+a}}d\frac {\sec (e+f x)}{\sqrt {b \sec ^2(e+f x)+a}}+\frac {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2}}{3 a}-\cos (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}}\right )+\frac {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2}}{3 a}-\cos (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{f}\)

Input:

Int[Sqrt[a + b*Sec[e + f*x]^2]*Sin[e + f*x]^3,x]
 

Output:

(Sqrt[b]*ArcTanh[(Sqrt[b]*Sec[e + f*x])/Sqrt[a + b*Sec[e + f*x]^2]] - Cos[ 
e + f*x]*Sqrt[a + b*Sec[e + f*x]^2] + (Cos[e + f*x]^3*(a + b*Sec[e + f*x]^ 
2)^(3/2))/(3*a))/f
 

Defintions of rubi rules used

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

rule 219
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])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 247
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(c*x)^ 
(m + 1)*((a + b*x^2)^p/(c*(m + 1))), x] - Simp[2*b*(p/(c^2*(m + 1)))   Int[ 
(c*x)^(m + 2)*(a + b*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] && GtQ[p, 
0] && LtQ[m, -1] &&  !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomialQ[a, b, c, 2, 
m, p, x]
 

rule 358
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x_ 
Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + S 
imp[d/e^2   Int[(e*x)^(m + 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e 
, m, p}, x] && NeQ[b*c - a*d, 0] && EqQ[Simplify[m + 2*p + 3], 0] && NeQ[m, 
 -1]
 

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

rule 4622
Int[((a_) + (b_.)*((c_.)*sec[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*sin[(e_.) + ( 
f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Si 
mp[1/(f*ff^m)   Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a + b*(c*ff*x)^n)^p 
/x^(m + 1)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x 
] && IntegerQ[(m - 1)/2] && (GtQ[m, 0] || EqQ[n, 2] || EqQ[n, 4])
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(235\) vs. \(2(88)=176\).

Time = 4.06 (sec) , antiderivative size = 236, normalized size of antiderivative = 2.36

method result size
default \(\frac {\left (3 \sqrt {b}\, \ln \left (-4 \sqrt {b}\, \sqrt {\frac {b +a \cos \left (f x +e \right )^{2}}{\left (1+\cos \left (f x +e \right )\right )^{2}}}-4 \sqrt {b}\, \sqrt {\frac {b +a \cos \left (f x +e \right )^{2}}{\left (1+\cos \left (f x +e \right )\right )^{2}}}\, \sec \left (f x +e \right )-4 b \sec \left (f x +e \right )\right ) a +\left (\cos \left (f x +e \right )^{3}+\cos \left (f x +e \right )^{2}-3 \cos \left (f x +e \right )-3\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )^{2}}{\left (1+\cos \left (f x +e \right )\right )^{2}}}\, a +\left (1+\cos \left (f x +e \right )\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )^{2}}{\left (1+\cos \left (f x +e \right )\right )^{2}}}\, b \right ) \cos \left (f x +e \right ) \sqrt {a +b \sec \left (f x +e \right )^{2}}}{3 f a \left (1+\cos \left (f x +e \right )\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )^{2}}{\left (1+\cos \left (f x +e \right )\right )^{2}}}}\) \(236\)

Input:

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

Output:

1/3/f/a*(3*b^(1/2)*ln(-4*b^(1/2)*((b+a*cos(f*x+e)^2)/(1+cos(f*x+e))^2)^(1/ 
2)-4*b^(1/2)*((b+a*cos(f*x+e)^2)/(1+cos(f*x+e))^2)^(1/2)*sec(f*x+e)-4*b*se 
c(f*x+e))*a+(cos(f*x+e)^3+cos(f*x+e)^2-3*cos(f*x+e)-3)*((b+a*cos(f*x+e)^2) 
/(1+cos(f*x+e))^2)^(1/2)*a+(1+cos(f*x+e))*((b+a*cos(f*x+e)^2)/(1+cos(f*x+e 
))^2)^(1/2)*b)*cos(f*x+e)*(a+b*sec(f*x+e)^2)^(1/2)/(1+cos(f*x+e))/((b+a*co 
s(f*x+e)^2)/(1+cos(f*x+e))^2)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 243, normalized size of antiderivative = 2.43 \[ \int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx=\left [\frac {3 \, a \sqrt {b} \log \left (\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + 2 \, b}{\cos \left (f x + e\right )^{2}}\right ) + 2 \, {\left (a \cos \left (f x + e\right )^{3} - {\left (3 \, a - b\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{6 \, a f}, -\frac {3 \, a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{a \cos \left (f x + e\right )^{2} + b}\right ) - {\left (a \cos \left (f x + e\right )^{3} - {\left (3 \, a - b\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{3 \, a f}\right ] \] Input:

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

Output:

[1/6*(3*a*sqrt(b)*log((a*cos(f*x + e)^2 + 2*sqrt(b)*sqrt((a*cos(f*x + e)^2 
 + b)/cos(f*x + e)^2)*cos(f*x + e) + 2*b)/cos(f*x + e)^2) + 2*(a*cos(f*x + 
 e)^3 - (3*a - b)*cos(f*x + e))*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2 
))/(a*f), -1/3*(3*a*sqrt(-b)*arctan(sqrt(-b)*sqrt((a*cos(f*x + e)^2 + b)/c 
os(f*x + e)^2)*cos(f*x + e)/(a*cos(f*x + e)^2 + b)) - (a*cos(f*x + e)^3 - 
(3*a - b)*cos(f*x + e))*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2))/(a*f) 
]
 

Sympy [F(-1)]

Timed out. \[ \int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx=\text {Timed out} \] Input:

integrate((a+b*sec(f*x+e)**2)**(1/2)*sin(f*x+e)**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.16 \[ \int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx=\frac {\frac {2 \, {\left (a + \frac {b}{\cos \left (f x + e\right )^{2}}\right )}^{\frac {3}{2}} \cos \left (f x + e\right )^{3}}{a} - 6 \, \sqrt {a + \frac {b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) - 3 \, \sqrt {b} \log \left (\frac {\sqrt {a + \frac {b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) - \sqrt {b}}{\sqrt {a + \frac {b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + \sqrt {b}}\right )}{6 \, f} \] Input:

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

Output:

1/6*(2*(a + b/cos(f*x + e)^2)^(3/2)*cos(f*x + e)^3/a - 6*sqrt(a + b/cos(f* 
x + e)^2)*cos(f*x + e) - 3*sqrt(b)*log((sqrt(a + b/cos(f*x + e)^2)*cos(f*x 
 + e) - sqrt(b))/(sqrt(a + b/cos(f*x + e)^2)*cos(f*x + e) + sqrt(b))))/f
 

Giac [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.85 \[ \int \sqrt {a+b \sec ^2(e+f x)} \sin ^3(e+f x) \, dx=-\frac {{\left (\frac {3 \, b \arctan \left (\frac {\sqrt {a \cos \left (f x + e\right )^{2} + b}}{\sqrt {-b}}\right )}{\sqrt {-b}} - \frac {{\left (a \cos \left (f x + e\right )^{2} + b\right )}^{\frac {3}{2}} a^{2} - 3 \, \sqrt {a \cos \left (f x + e\right )^{2} + b} a^{3}}{a^{3}}\right )} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{3 \, f} \] Input:

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

Output:

-1/3*(3*b*arctan(sqrt(a*cos(f*x + e)^2 + b)/sqrt(-b))/sqrt(-b) - ((a*cos(f 
*x + e)^2 + b)^(3/2)*a^2 - 3*sqrt(a*cos(f*x + e)^2 + b)*a^3)/a^3)*sgn(cos( 
f*x + e))/f
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int(sqrt(sec(e + f*x)**2*b + a)*sin(e + f*x)**3,x)