3.4.86 \(\int \sec (3 x) \sin ^3(x) \, dx\) [386]

Optimal. Leaf size=21 \[ \frac {1}{3} \log (\cos (x))-\frac {1}{24} \log \left (3-4 \cos ^2(x)\right ) \]

[Out]

1/3*ln(cos(x))-1/24*ln(3-4*cos(x)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4451, 457, 78} \begin {gather*} \frac {1}{3} \log (\cos (x))-\frac {1}{24} \log \left (3-4 \cos ^2(x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[3*x]*Sin[x]^3,x]

[Out]

Log[Cos[x]]/3 - Log[3 - 4*Cos[x]^2]/24

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4451

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_), x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, Dist
[-d/(b*c), Subst[Int[SubstFor[(1 - d^2*x^2)^((n - 1)/2), Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d]
, x] /; FunctionOfQ[Cos[c*(a + b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sin] || EqQ[F, sin])

Rubi steps

\begin {align*} \int \sec (3 x) \sin ^3(x) \, dx &=-\text {Subst}\left (\int \frac {-1+x^2}{x \left (3-4 x^2\right )} \, dx,x,\cos (x)\right )\\ &=-\left (\frac {1}{2} \text {Subst}\left (\int \frac {-1+x}{(3-4 x) x} \, dx,x,\cos ^2(x)\right )\right )\\ &=-\left (\frac {1}{2} \text {Subst}\left (\int \left (-\frac {1}{3 x}+\frac {1}{3 (-3+4 x)}\right ) \, dx,x,\cos ^2(x)\right )\right )\\ &=\frac {1}{3} \log (\cos (x))-\frac {1}{24} \log \left (3-4 \cos ^2(x)\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 21, normalized size = 1.00 \begin {gather*} \frac {1}{3} \log (\cos (x))-\frac {1}{24} \log \left (1-4 \sin ^2(x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[3*x]*Sin[x]^3,x]

[Out]

Log[Cos[x]]/3 - Log[1 - 4*Sin[x]^2]/24

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 18, normalized size = 0.86

method result size
default \(-\frac {\ln \left (4 \left (\cos ^{2}\left (x \right )\right )-3\right )}{24}+\frac {\ln \left (\cos \left (x \right )\right )}{3}\) \(18\)
risch \(-\frac {i x}{4}+\frac {\ln \left ({\mathrm e}^{2 i x}+1\right )}{3}-\frac {\ln \left ({\mathrm e}^{4 i x}-{\mathrm e}^{2 i x}+1\right )}{24}\) \(33\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^3/cos(3*x),x,method=_RETURNVERBOSE)

[Out]

-1/24*ln(4*cos(x)^2-3)+1/3*ln(cos(x))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 81 vs. \(2 (17) = 34\).
time = 2.70, size = 81, normalized size = 3.86 \begin {gather*} -\frac {1}{48} \, \log \left (-2 \, {\left (\cos \left (2 \, x\right ) - 1\right )} \cos \left (4 \, x\right ) + \cos \left (4 \, x\right )^{2} + \cos \left (2 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} - 2 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) + \sin \left (2 \, x\right )^{2} - 2 \, \cos \left (2 \, x\right ) + 1\right ) + \frac {1}{6} \, \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/cos(3*x),x, algorithm="maxima")

[Out]

-1/48*log(-2*(cos(2*x) - 1)*cos(4*x) + cos(4*x)^2 + cos(2*x)^2 + sin(4*x)^2 - 2*sin(4*x)*sin(2*x) + sin(2*x)^2
 - 2*cos(2*x) + 1) + 1/6*log(cos(2*x)^2 + sin(2*x)^2 + 2*cos(2*x) + 1)

________________________________________________________________________________________

Fricas [A]
time = 1.44, size = 19, normalized size = 0.90 \begin {gather*} -\frac {1}{24} \, \log \left (4 \, \cos \left (x\right )^{2} - 3\right ) + \frac {1}{3} \, \log \left (-\cos \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/cos(3*x),x, algorithm="fricas")

[Out]

-1/24*log(4*cos(x)^2 - 3) + 1/3*log(-cos(x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sin ^{3}{\left (x \right )}}{\cos {\left (3 x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**3/cos(3*x),x)

[Out]

Integral(sin(x)**3/cos(3*x), x)

________________________________________________________________________________________

Giac [A]
time = 1.18, size = 24, normalized size = 1.14 \begin {gather*} \frac {1}{6} \, \log \left (-\sin \left (x\right )^{2} + 1\right ) - \frac {1}{24} \, \log \left ({\left | 4 \, \sin \left (x\right )^{2} - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/cos(3*x),x, algorithm="giac")

[Out]

1/6*log(-sin(x)^2 + 1) - 1/24*log(abs(4*sin(x)^2 - 1))

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 15, normalized size = 0.71 \begin {gather*} \frac {\ln \left (\cos \left (x\right )\right )}{3}-\frac {\ln \left ({\cos \left (x\right )}^2-\frac {3}{4}\right )}{24} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^3/cos(3*x),x)

[Out]

log(cos(x))/3 - log(cos(x)^2 - 3/4)/24

________________________________________________________________________________________