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))} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4695, 3378, 3383} \[ \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}-\frac {\cos ^2(a x)}{a^2 x^2 (a x \sin (a x)+\cos (a x))}+\operatorname {CosIntegral}(a x)-\frac {\sin (a x)}{a x} \]
[In]
[Out]
Rule 3378
Rule 3383
Rule 4695
Rubi steps \begin{align*} \text {integral}& = -\frac {\cos ^2(a x)}{a^2 x^2 (\cos (a x)+a x \sin (a x))}-\frac {2 \int \frac {\cos (a x)}{x^3} \, dx}{a^2} \\ & = \frac {\cos (a x)}{a^2 x^2}-\frac {\cos ^2(a x)}{a^2 x^2 (\cos (a x)+a x \sin (a x))}+\frac {\int \frac {\sin (a x)}{x^2} \, dx}{a} \\ & = \frac {\cos (a x)}{a^2 x^2}-\frac {\sin (a x)}{a x}-\frac {\cos ^2(a x)}{a^2 x^2 (\cos (a x)+a x \sin (a x))}+\int \frac {\cos (a x)}{x} \, 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))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 1.86 (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 ) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 2.38 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.12
method | result | size |
risch | \(-\frac {i \operatorname {Ei}_{1}\left (-i a x \right ) a x -\operatorname {Ei}_{1}\left (-i a x \right )+{\mathrm e}^{i a x}}{2 \left (i a x -1\right )}+\frac {{\mathrm e}^{-i a x}}{2 i a x +2}-\frac {\operatorname {Ei}_{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 (a x \,{\mathrm e}^{2 i a x}-a x +i {\mathrm e}^{2 i a x}+i\right )}\) | \(119\) |
[In]
[Out]
none
Time = 0.25 (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 )} \]
[In]
[Out]
\[ \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 \]
[In]
[Out]
Exception generated. \[ \int \frac {\cos ^3(a x)}{x (\cos (a x)+a x \sin (a x))^2} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
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=\frac {2 \, a^{3} x^{3} \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{3} + 2 \, a^{3} x^{3} \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{3} - a^{2} x^{2} \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{4} - a^{2} x^{2} \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{4} + 2 \, a^{3} x^{3} \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right ) + 2 \, a^{3} x^{3} \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right ) - 8 \, a^{2} x^{2} \tan \left (\frac {1}{2} \, a x\right )^{2} + 2 \, a x \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{3} + 2 \, a x \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{3} + a^{2} x^{2} \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) + a^{2} x^{2} \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) - \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{4} - \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right )^{4} + 2 \, a x \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right ) + 2 \, a x \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) \tan \left (\frac {1}{2} \, a x\right ) - 2 \, \tan \left (\frac {1}{2} \, a x\right )^{4} - 12 \, \tan \left (\frac {1}{2} \, a x\right )^{2} + \Re \left ( \operatorname {Ci}\left (a x\right ) \right ) + \Re \left ( \operatorname {Ci}\left (-a x\right ) \right ) - 2}{2 \, {\left (2 \, a^{3} x^{3} \tan \left (\frac {1}{2} \, a x\right )^{3} - a^{2} x^{2} \tan \left (\frac {1}{2} \, a x\right )^{4} + 2 \, a^{3} x^{3} \tan \left (\frac {1}{2} \, a x\right ) + 2 \, a x \tan \left (\frac {1}{2} \, a x\right )^{3} + a^{2} x^{2} - \tan \left (\frac {1}{2} \, a x\right )^{4} + 2 \, a x \tan \left (\frac {1}{2} \, a x\right ) + 1\right )}} \]
[In]
[Out]
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 \]
[In]
[Out]