3.596 \(\int \frac {\cos ^4(a x)}{x^2 (\cos (a x)+a x \sin (a x))^2} \, dx\)

Optimal. Leaf size=80 \[ \frac {\cos ^2(a x)}{a^2 x^3}-\frac {\cos ^3(a x)}{a^2 x^3 (a x \sin (a x)+\cos (a x))}-2 a \text {Si}(2 a x)-\frac {\sin (a x) \cos (a x)}{a x^2}-\frac {2 \cos ^2(a x)}{x}+\frac {1}{x} \]

[Out]

1/x+cos(a*x)^2/a^2/x^3-2*cos(a*x)^2/x-2*a*Si(2*a*x)-cos(a*x)*sin(a*x)/a/x^2-cos(a*x)^3/a^2/x^3/(cos(a*x)+a*x*s
in(a*x))

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4599, 3314, 30, 3313, 12, 3299} \[ \frac {\cos ^2(a x)}{a^2 x^3}-\frac {\cos ^3(a x)}{a^2 x^3 (a x \sin (a x)+\cos (a x))}-2 a \text {Si}(2 a x)-\frac {\sin (a x) \cos (a x)}{a x^2}-\frac {2 \cos ^2(a x)}{x}+\frac {1}{x} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a*x]^4/(x^2*(Cos[a*x] + a*x*Sin[a*x])^2),x]

[Out]

x^(-1) + Cos[a*x]^2/(a^2*x^3) - (2*Cos[a*x]^2)/x - (Cos[a*x]*Sin[a*x])/(a*x^2) - Cos[a*x]^3/(a^2*x^3*(Cos[a*x]
 + a*x*Sin[a*x])) - 2*a*SinIntegral[2*a*x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3313

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x]^
n)/(d*(m + 1)), x] - Dist[(f*n)/(d*(m + 1)), Int[ExpandTrigReduce[(c + d*x)^(m + 1), Cos[e + f*x]*Sin[e + f*x]
^(n - 1), x], x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && GeQ[m, -2] && LtQ[m, -1]

Rule 3314

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((c + d*x)^(m + 1)*(b*Si
n[e + f*x])^n)/(d*(m + 1)), x] + (Dist[(b^2*f^2*n*(n - 1))/(d^2*(m + 1)*(m + 2)), Int[(c + d*x)^(m + 2)*(b*Sin
[e + f*x])^(n - 2), x], x] - Dist[(f^2*n^2)/(d^2*(m + 1)*(m + 2)), Int[(c + d*x)^(m + 2)*(b*Sin[e + f*x])^n, x
], x] - Simp[(b*f*n*(c + d*x)^(m + 2)*Cos[e + f*x]*(b*Sin[e + f*x])^(n - 1))/(d^2*(m + 1)*(m + 2)), x]) /; Fre
eQ[{b, c, d, e, f}, x] && GtQ[n, 1] && LtQ[m, -2]

Rule 4599

Int[(Cos[(a_.)*(x_)]^(n_)*((b_.)*(x_))^(m_))/(Cos[(a_.)*(x_)]*(c_.) + (d_.)*(x_)*Sin[(a_.)*(x_)])^2, x_Symbol]
 :> -Simp[(b*(b*x)^(m - 1)*Cos[a*x]^(n - 1))/(a*d*(c*Cos[a*x] + d*x*Sin[a*x])), x] - Dist[(b^2*(n - 1))/d^2, I
nt[(b*x)^(m - 2)*Cos[a*x]^(n - 2), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a*c - d, 0] && EqQ[m, 2 - n]

Rubi steps

\begin {align*} \int \frac {\cos ^4(a x)}{x^2 (\cos (a x)+a x \sin (a x))^2} \, dx &=-\frac {\cos ^3(a x)}{a^2 x^3 (\cos (a x)+a x \sin (a x))}-\frac {3 \int \frac {\cos ^2(a x)}{x^4} \, dx}{a^2}\\ &=\frac {\cos ^2(a x)}{a^2 x^3}-\frac {\cos (a x) \sin (a x)}{a x^2}-\frac {\cos ^3(a x)}{a^2 x^3 (\cos (a x)+a x \sin (a x))}+2 \int \frac {\cos ^2(a x)}{x^2} \, dx-\int \frac {1}{x^2} \, dx\\ &=\frac {1}{x}+\frac {\cos ^2(a x)}{a^2 x^3}-\frac {2 \cos ^2(a x)}{x}-\frac {\cos (a x) \sin (a x)}{a x^2}-\frac {\cos ^3(a x)}{a^2 x^3 (\cos (a x)+a x \sin (a x))}+(4 a) \int -\frac {\sin (2 a x)}{2 x} \, dx\\ &=\frac {1}{x}+\frac {\cos ^2(a x)}{a^2 x^3}-\frac {2 \cos ^2(a x)}{x}-\frac {\cos (a x) \sin (a x)}{a x^2}-\frac {\cos ^3(a x)}{a^2 x^3 (\cos (a x)+a x \sin (a x))}-(2 a) \int \frac {\sin (2 a x)}{x} \, dx\\ &=\frac {1}{x}+\frac {\cos ^2(a x)}{a^2 x^3}-\frac {2 \cos ^2(a x)}{x}-\frac {\cos (a x) \sin (a x)}{a x^2}-\frac {\cos ^3(a x)}{a^2 x^3 (\cos (a x)+a x \sin (a x))}-2 a \text {Si}(2 a x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.68, size = 71, normalized size = 0.89 \[ -\frac {8 a x \text {Si}(2 a x) (a x \sin (a x)+\cos (a x))-2 a x \sin (a x)+2 a x \sin (3 a x)+3 \cos (a x)+\cos (3 a x)}{4 x (a x \sin (a x)+\cos (a x))} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a*x]^4/(x^2*(Cos[a*x] + a*x*Sin[a*x])^2),x]

[Out]

-1/4*(3*Cos[a*x] + Cos[3*a*x] - 2*a*x*Sin[a*x] + 2*a*x*Sin[3*a*x] + 8*a*x*(Cos[a*x] + a*x*Sin[a*x])*SinIntegra
l[2*a*x])/(x*(Cos[a*x] + a*x*Sin[a*x]))

________________________________________________________________________________________

fricas [A]  time = 0.90, size = 73, normalized size = 0.91 \[ -\frac {2 \, a x \cos \left (a x\right ) \operatorname {Si}\left (2 \, a x\right ) + \cos \left (a x\right )^{3} + {\left (2 \, a^{2} x^{2} \operatorname {Si}\left (2 \, a x\right ) + 2 \, a x \cos \left (a x\right )^{2} - a x\right )} \sin \left (a x\right )}{a x^{2} \sin \left (a x\right ) + x \cos \left (a x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a*x)^4/x^2/(cos(a*x)+a*x*sin(a*x))^2,x, algorithm="fricas")

[Out]

-(2*a*x*cos(a*x)*sin_integral(2*a*x) + cos(a*x)^3 + (2*a^2*x^2*sin_integral(2*a*x) + 2*a*x*cos(a*x)^2 - a*x)*s
in(a*x))/(a*x^2*sin(a*x) + x*cos(a*x))

________________________________________________________________________________________

giac [C]  time = 0.49, size = 997, normalized size = 12.46 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a*x)^4/x^2/(cos(a*x)+a*x*sin(a*x))^2,x, algorithm="giac")

[Out]

-(2*a^4*x^4*imag_part(cos_integral(2*a*x))*tan(a*x)^2*tan(1/2*a*x) - 2*a^4*x^4*imag_part(cos_integral(-2*a*x))
*tan(a*x)^2*tan(1/2*a*x) + 4*a^4*x^4*sin_integral(2*a*x)*tan(a*x)^2*tan(1/2*a*x) - a^3*x^3*imag_part(cos_integ
ral(2*a*x))*tan(a*x)^2*tan(1/2*a*x)^2 + a^3*x^3*imag_part(cos_integral(-2*a*x))*tan(a*x)^2*tan(1/2*a*x)^2 - 2*
a^3*x^3*sin_integral(2*a*x)*tan(a*x)^2*tan(1/2*a*x)^2 + 2*a^4*x^4*imag_part(cos_integral(2*a*x))*tan(1/2*a*x)
- 2*a^4*x^4*imag_part(cos_integral(-2*a*x))*tan(1/2*a*x) + 4*a^4*x^4*sin_integral(2*a*x)*tan(1/2*a*x) + a^3*x^
3*imag_part(cos_integral(2*a*x))*tan(a*x)^2 - a^3*x^3*imag_part(cos_integral(-2*a*x))*tan(a*x)^2 + 2*a^3*x^3*s
in_integral(2*a*x)*tan(a*x)^2 - 2*a^3*x^3*tan(a*x)^2*tan(1/2*a*x) - a^3*x^3*imag_part(cos_integral(2*a*x))*tan
(1/2*a*x)^2 + a^3*x^3*imag_part(cos_integral(-2*a*x))*tan(1/2*a*x)^2 - 2*a^3*x^3*sin_integral(2*a*x)*tan(1/2*a
*x)^2 + 2*a^2*x^2*imag_part(cos_integral(2*a*x))*tan(a*x)^2*tan(1/2*a*x) - 2*a^2*x^2*imag_part(cos_integral(-2
*a*x))*tan(a*x)^2*tan(1/2*a*x) + 4*a^2*x^2*sin_integral(2*a*x)*tan(a*x)^2*tan(1/2*a*x) + a^2*x^2*tan(a*x)^2*ta
n(1/2*a*x)^2 + a^3*x^3*imag_part(cos_integral(2*a*x)) - a^3*x^3*imag_part(cos_integral(-2*a*x)) + 2*a^3*x^3*si
n_integral(2*a*x) + 2*a^3*x^3*tan(1/2*a*x) - a*x*imag_part(cos_integral(2*a*x))*tan(a*x)^2*tan(1/2*a*x)^2 + a*
x*imag_part(cos_integral(-2*a*x))*tan(a*x)^2*tan(1/2*a*x)^2 - 2*a*x*sin_integral(2*a*x)*tan(a*x)^2*tan(1/2*a*x
)^2 - a^2*x^2*tan(a*x)^2 + 2*a^2*x^2*imag_part(cos_integral(2*a*x))*tan(1/2*a*x) - 2*a^2*x^2*imag_part(cos_int
egral(-2*a*x))*tan(1/2*a*x) + 4*a^2*x^2*sin_integral(2*a*x)*tan(1/2*a*x) + 2*a^2*x^2*tan(a*x)*tan(1/2*a*x) - a
^2*x^2*tan(1/2*a*x)^2 + a*x*imag_part(cos_integral(2*a*x))*tan(a*x)^2 - a*x*imag_part(cos_integral(-2*a*x))*ta
n(a*x)^2 + 2*a*x*sin_integral(2*a*x)*tan(a*x)^2 - 2*a*x*tan(a*x)^2*tan(1/2*a*x) - a*x*imag_part(cos_integral(2
*a*x))*tan(1/2*a*x)^2 + a*x*imag_part(cos_integral(-2*a*x))*tan(1/2*a*x)^2 - 2*a*x*sin_integral(2*a*x)*tan(1/2
*a*x)^2 - a*x*tan(a*x)*tan(1/2*a*x)^2 + a^2*x^2 + a*x*imag_part(cos_integral(2*a*x)) - a*x*imag_part(cos_integ
ral(-2*a*x)) + 2*a*x*sin_integral(2*a*x) + a*x*tan(a*x) - tan(1/2*a*x)^2 + 1)/(2*a^3*x^4*tan(a*x)^2*tan(1/2*a*
x) - a^2*x^3*tan(a*x)^2*tan(1/2*a*x)^2 + 2*a^3*x^4*tan(1/2*a*x) + a^2*x^3*tan(a*x)^2 - a^2*x^3*tan(1/2*a*x)^2
+ 2*a*x^2*tan(a*x)^2*tan(1/2*a*x) + a^2*x^3 - x*tan(a*x)^2*tan(1/2*a*x)^2 + 2*a*x^2*tan(1/2*a*x) + x*tan(a*x)^
2 - x*tan(1/2*a*x)^2 + x)

________________________________________________________________________________________

maple [F(-1)]  time = 180.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos ^{4}\left (a x \right )}{x^{2} \left (\cos \left (a x \right )+a x \sin \left (a x \right )\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a*x)^4/x^2/(cos(a*x)+a*x*sin(a*x))^2,x)

[Out]

int(cos(a*x)^4/x^2/(cos(a*x)+a*x*sin(a*x))^2,x)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a*x)^4/x^2/(cos(a*x)+a*x*sin(a*x))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\cos \left (a\,x\right )}^4}{x^2\,{\left (\cos \left (a\,x\right )+a\,x\,\sin \left (a\,x\right )\right )}^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a*x)^4/(x^2*(cos(a*x) + a*x*sin(a*x))^2),x)

[Out]

int(cos(a*x)^4/(x^2*(cos(a*x) + a*x*sin(a*x))^2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos ^{4}{\left (a x \right )}}{x^{2} \left (a x \sin {\left (a x \right )} + \cos {\left (a x \right )}\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a*x)**4/x**2/(cos(a*x)+a*x*sin(a*x))**2,x)

[Out]

Integral(cos(a*x)**4/(x**2*(a*x*sin(a*x) + cos(a*x))**2), x)

________________________________________________________________________________________