Integrand size = 24, antiderivative size = 56 \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\frac {\cos (a x)}{a^2 x^2}+\operatorname {CosIntegral}(a x)-\frac {\sin (a x)}{a x}-\frac {\cos ^2(a x)}{a^2 x^2 (\cos (a x)+a x \sin (a x))} \] Output:
cos(a*x)/a^2/x^2+Ci(a*x)-sin(a*x)/a/x-cos(a*x)^2/a^2/x^2/(cos(a*x)+a*x*sin (a*x))
Result contains complex when optimal does not.
Time = 1.66 (sec) , antiderivative size = 181, normalized size of antiderivative = 3.23 \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\frac {1}{2} \left (2 \operatorname {CosIntegral}(a x)-e \operatorname {CosIntegral}(i-a x)-e \operatorname {CosIntegral}(i+a x)+\frac {i \cos (a x)+e (i+a x) \operatorname {ExpIntegralEi}(-1+i a x)-\sin (a x)}{i+a x}-\frac {i \cos (a x)+e (i-a x) \operatorname {ExpIntegralEi}(-1-i a x)+\sin (a x)}{-i+a x}-\frac {2}{(-i+a x) (i+a x) (\cos (a x)+a x \sin (a x))}-i e \text {Si}(i-a x)-i e \text {Si}(i+a x)\right ) \] Input:
Integrate[Cos[a*x]^3/(x*(Cos[a*x] + a*x*Sin[a*x])^2),x]
Output:
(2*CosIntegral[a*x] - E*CosIntegral[I - a*x] - E*CosIntegral[I + a*x] + (I *Cos[a*x] + E*(I + a*x)*ExpIntegralEi[-1 + I*a*x] - Sin[a*x])/(I + a*x) - (I*Cos[a*x] + E*(I - a*x)*ExpIntegralEi[-1 - I*a*x] + Sin[a*x])/(-I + a*x) - 2/((-I + a*x)*(I + a*x)*(Cos[a*x] + a*x*Sin[a*x])) - I*E*SinIntegral[I - a*x] - I*E*SinIntegral[I + a*x])/2
Time = 0.44 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.20, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5110, 3042, 3778, 25, 3042, 3778, 3042, 3783}
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 \frac {\cos ^3(a x)}{x (a x \sin (a x)+\cos (a x))^2} \, dx\) |
\(\Big \downarrow \) 5110 |
\(\displaystyle -\frac {2 \int \frac {\cos (a x)}{x^3}dx}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 \int \frac {\sin \left (a x+\frac {\pi }{2}\right )}{x^3}dx}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 3778 |
\(\displaystyle -\frac {2 \left (\frac {1}{2} a \int -\frac {\sin (a x)}{x^2}dx-\frac {\cos (a x)}{2 x^2}\right )}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {2 \left (-\frac {1}{2} a \int \frac {\sin (a x)}{x^2}dx-\frac {\cos (a x)}{2 x^2}\right )}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 \left (-\frac {1}{2} a \int \frac {\sin (a x)}{x^2}dx-\frac {\cos (a x)}{2 x^2}\right )}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 3778 |
\(\displaystyle -\frac {2 \left (-\frac {1}{2} a \left (a \int \frac {\cos (a x)}{x}dx-\frac {\sin (a x)}{x}\right )-\frac {\cos (a x)}{2 x^2}\right )}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 \left (-\frac {1}{2} a \left (a \int \frac {\sin \left (a x+\frac {\pi }{2}\right )}{x}dx-\frac {\sin (a x)}{x}\right )-\frac {\cos (a x)}{2 x^2}\right )}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
\(\Big \downarrow \) 3783 |
\(\displaystyle -\frac {2 \left (-\frac {1}{2} a \left (a \operatorname {CosIntegral}(a x)-\frac {\sin (a x)}{x}\right )-\frac {\cos (a x)}{2 x^2}\right )}{a^2}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}\) |
Input:
Int[Cos[a*x]^3/(x*(Cos[a*x] + a*x*Sin[a*x])^2),x]
Output:
-(Cos[a*x]^2/(a^2*x^2*(Cos[a*x] + a*x*Sin[a*x]))) - (2*(-1/2*Cos[a*x]/x^2 - (a*(a*CosIntegral[a*x] - Sin[a*x]/x))/2))/a^2
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m + 1))), x] - Simp[f/(d*(m + 1)) Int[( c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[m, - 1]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosInte gral[e - Pi/2 + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]
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] - Simp[b^2*((n - 1)/d^2) Int [(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]
Result contains complex when optimal does not.
Time = 0.46 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.12
method | result | size |
risch | \(-\frac {i \operatorname {expIntegral}_{1}\left (-i a x \right ) a x +{\mathrm e}^{i a x}-\operatorname {expIntegral}_{1}\left (-i a x \right )}{2 \left (i a x -1\right )}+\frac {{\mathrm e}^{-i a x}}{2 i a x +2}-\frac {\operatorname {expIntegral}_{1}\left (i a x \right )}{2}-\frac {2 i {\mathrm e}^{i a x}}{\left (a x +i\right ) \left (a x -i\right ) \left ({\mathrm e}^{2 i a x} a x -a x +i {\mathrm e}^{2 i a x}+i\right )}\) | \(119\) |
Input:
int(cos(a*x)^3/x/(cos(a*x)+a*x*sin(a*x))^2,x,method=_RETURNVERBOSE)
Output:
-1/2*(I*Ei(1,-I*a*x)*a*x+exp(I*a*x)-Ei(1,-I*a*x))/(I*a*x-1)+1/2*exp(-I*a*x )/(I*a*x+1)-1/2*Ei(1,I*a*x)-2*I*exp(I*a*x)/(a*x+I)/(a*x-I)/(exp(2*I*a*x)*a *x-a*x+I*exp(2*I*a*x)+I)
Time = 0.07 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.77 \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\frac {a x \operatorname {Ci}\left (a x\right ) \sin \left (a x\right ) + \cos \left (a x\right )^{2} + \cos \left (a x\right ) \operatorname {Ci}\left (a x\right ) - 1}{a x \sin \left (a x\right ) + \cos \left (a x\right )} \] Input:
integrate(cos(a*x)^3/x/(cos(a*x)+a*x*sin(a*x))^2,x, algorithm="fricas")
Output:
(a*x*cos_integral(a*x)*sin(a*x) + cos(a*x)^2 + cos(a*x)*cos_integral(a*x) - 1)/(a*x*sin(a*x) + cos(a*x))
\[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\int \frac {\cos ^{3}{\left (a x \right )}}{x \left (a x \sin {\left (a x \right )} + \cos {\left (a x \right )}\right )^{2}}\, dx \] Input:
integrate(cos(a*x)**3/x/(cos(a*x)+a*x*sin(a*x))**2,x)
Output:
Integral(cos(a*x)**3/(x*(a*x*sin(a*x) + cos(a*x))**2), x)
Exception generated. \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(a*x)^3/x/(cos(a*x)+a*x*sin(a*x))^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un defined.
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.34 (sec) , antiderivative size = 366, normalized size of antiderivative = 6.54 \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx =\text {Too large to display} \] Input:
integrate(cos(a*x)^3/x/(cos(a*x)+a*x*sin(a*x))^2,x, algorithm="giac")
Output:
1/2*(2*a^3*x^3*real_part(cos_integral(a*x))*tan(1/2*a*x)^3 + 2*a^3*x^3*rea l_part(cos_integral(-a*x))*tan(1/2*a*x)^3 - a^2*x^2*real_part(cos_integral (a*x))*tan(1/2*a*x)^4 - a^2*x^2*real_part(cos_integral(-a*x))*tan(1/2*a*x) ^4 + 2*a^3*x^3*real_part(cos_integral(a*x))*tan(1/2*a*x) + 2*a^3*x^3*real_ part(cos_integral(-a*x))*tan(1/2*a*x) - 8*a^2*x^2*tan(1/2*a*x)^2 + 2*a*x*r eal_part(cos_integral(a*x))*tan(1/2*a*x)^3 + 2*a*x*real_part(cos_integral( -a*x))*tan(1/2*a*x)^3 + a^2*x^2*real_part(cos_integral(a*x)) + a^2*x^2*rea l_part(cos_integral(-a*x)) - real_part(cos_integral(a*x))*tan(1/2*a*x)^4 - real_part(cos_integral(-a*x))*tan(1/2*a*x)^4 + 2*a*x*real_part(cos_integr al(a*x))*tan(1/2*a*x) + 2*a*x*real_part(cos_integral(-a*x))*tan(1/2*a*x) - 2*tan(1/2*a*x)^4 - 12*tan(1/2*a*x)^2 + real_part(cos_integral(a*x)) + rea l_part(cos_integral(-a*x)) - 2)/(2*a^3*x^3*tan(1/2*a*x)^3 - a^2*x^2*tan(1/ 2*a*x)^4 + 2*a^3*x^3*tan(1/2*a*x) + 2*a*x*tan(1/2*a*x)^3 + a^2*x^2 - tan(1 /2*a*x)^4 + 2*a*x*tan(1/2*a*x) + 1)
Timed out. \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\int \frac {{\cos \left (a\,x\right )}^3}{x\,{\left (\cos \left (a\,x\right )+a\,x\,\sin \left (a\,x\right )\right )}^2} \,d x \] Input:
int(cos(a*x)^3/(x*(cos(a*x) + a*x*sin(a*x))^2),x)
Output:
int(cos(a*x)^3/(x*(cos(a*x) + a*x*sin(a*x))^2), x)
\[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\int \frac {\cos \left (a x \right )^{3}}{\cos \left (a x \right )^{2} x +2 \cos \left (a x \right ) \sin \left (a x \right ) a \,x^{2}+\sin \left (a x \right )^{2} a^{2} x^{3}}d x \] Input:
int(cos(a*x)^3/x/(cos(a*x)+a*x*sin(a*x))^2,x)
Output:
int(cos(a*x)**3/(cos(a*x)**2*x + 2*cos(a*x)*sin(a*x)*a*x**2 + sin(a*x)**2* a**2*x**3),x)