Integrand size = 16, antiderivative size = 78 \[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\frac {\cos \left (2 a-\frac {2 b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 b c}{d}+2 b x\right )}{2 d}+\frac {\log (c+d x)}{2 d}-\frac {\sin \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b c}{d}+2 b x\right )}{2 d} \] Output:
1/2*cos(2*a-2*b*c/d)*Ci(2*b*c/d+2*b*x)/d+1/2*ln(d*x+c)/d-1/2*sin(2*a-2*b*c /d)*Si(2*b*c/d+2*b*x)/d
Time = 0.28 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.83 \[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\frac {\cos \left (2 a-\frac {2 b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 b (c+d x)}{d}\right )+\log (c+d x)-\sin \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b (c+d x)}{d}\right )}{2 d} \] Input:
Integrate[Cos[a + b*x]^2/(c + d*x),x]
Output:
(Cos[2*a - (2*b*c)/d]*CosIntegral[(2*b*(c + d*x))/d] + Log[c + d*x] - Sin[ 2*a - (2*b*c)/d]*SinIntegral[(2*b*(c + d*x))/d])/(2*d)
Time = 0.36 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3042, 3793, 2009}
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 ^2(a+b x)}{c+d x} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (a+b x+\frac {\pi }{2}\right )^2}{c+d x}dx\) |
\(\Big \downarrow \) 3793 |
\(\displaystyle \int \left (\frac {\cos (2 a+2 b x)}{2 (c+d x)}+\frac {1}{2 (c+d x)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\cos \left (2 a-\frac {2 b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 b c}{d}+2 b x\right )}{2 d}-\frac {\sin \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b c}{d}+2 b x\right )}{2 d}+\frac {\log (c+d x)}{2 d}\) |
Input:
Int[Cos[a + b*x]^2/(c + d*x),x]
Output:
(Cos[2*a - (2*b*c)/d]*CosIntegral[(2*b*c)/d + 2*b*x])/(2*d) + Log[c + d*x] /(2*d) - (Sin[2*a - (2*b*c)/d]*SinIntegral[(2*b*c)/d + 2*b*x])/(2*d)
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In t[ExpandTrigReduce[(c + d*x)^m, Sin[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f , m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1]))
Result contains complex when optimal does not.
Time = 1.30 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.37
method | result | size |
risch | \(\frac {\ln \left (d x +c \right )}{2 d}-\frac {{\mathrm e}^{-\frac {2 i \left (a d -b c \right )}{d}} \operatorname {expIntegral}_{1}\left (2 i b x +2 i a -\frac {2 i \left (a d -b c \right )}{d}\right )}{4 d}-\frac {{\mathrm e}^{\frac {2 i \left (a d -b c \right )}{d}} \operatorname {expIntegral}_{1}\left (-2 i b x -2 i a -\frac {2 \left (-i a d +i b c \right )}{d}\right )}{4 d}\) | \(107\) |
derivativedivides | \(\frac {\frac {b \left (-\frac {2 \,\operatorname {Si}\left (-2 b x -2 a -\frac {2 \left (-a d +b c \right )}{d}\right ) \sin \left (\frac {-2 a d +2 b c}{d}\right )}{d}+\frac {2 \,\operatorname {Ci}\left (2 b x +2 a +\frac {-2 a d +2 b c}{d}\right ) \cos \left (\frac {-2 a d +2 b c}{d}\right )}{d}\right )}{4}+\frac {b \ln \left (-a d +b c +d \left (b x +a \right )\right )}{2 d}}{b}\) | \(114\) |
default | \(\frac {\frac {b \left (-\frac {2 \,\operatorname {Si}\left (-2 b x -2 a -\frac {2 \left (-a d +b c \right )}{d}\right ) \sin \left (\frac {-2 a d +2 b c}{d}\right )}{d}+\frac {2 \,\operatorname {Ci}\left (2 b x +2 a +\frac {-2 a d +2 b c}{d}\right ) \cos \left (\frac {-2 a d +2 b c}{d}\right )}{d}\right )}{4}+\frac {b \ln \left (-a d +b c +d \left (b x +a \right )\right )}{2 d}}{b}\) | \(114\) |
Input:
int(cos(b*x+a)^2/(d*x+c),x,method=_RETURNVERBOSE)
Output:
1/2*ln(d*x+c)/d-1/4/d*exp(-2*I*(a*d-b*c)/d)*Ei(1,2*I*b*x+2*I*a-2*I*(a*d-b* c)/d)-1/4/d*exp(2*I*(a*d-b*c)/d)*Ei(1,-2*I*b*x-2*I*a-2*(-I*a*d+I*b*c)/d)
Time = 0.08 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.91 \[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\frac {\cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Ci}\left (\frac {2 \, {\left (b d x + b c\right )}}{d}\right ) - \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (b d x + b c\right )}}{d}\right ) + \log \left (d x + c\right )}{2 \, d} \] Input:
integrate(cos(b*x+a)^2/(d*x+c),x, algorithm="fricas")
Output:
1/2*(cos(-2*(b*c - a*d)/d)*cos_integral(2*(b*d*x + b*c)/d) - sin(-2*(b*c - a*d)/d)*sin_integral(2*(b*d*x + b*c)/d) + log(d*x + c))/d
\[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\int \frac {\cos ^{2}{\left (a + b x \right )}}{c + d x}\, dx \] Input:
integrate(cos(b*x+a)**2/(d*x+c),x)
Output:
Integral(cos(a + b*x)**2/(c + d*x), x)
Result contains complex when optimal does not.
Time = 0.09 (sec) , antiderivative size = 163, normalized size of antiderivative = 2.09 \[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=-\frac {b {\left (E_{1}\left (\frac {2 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right ) + E_{1}\left (-\frac {2 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right )\right )} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - b {\left (-i \, E_{1}\left (\frac {2 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right ) + i \, E_{1}\left (-\frac {2 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right )\right )} \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - 2 \, b \log \left (b c + {\left (b x + a\right )} d - a d\right )}{4 \, b d} \] Input:
integrate(cos(b*x+a)^2/(d*x+c),x, algorithm="maxima")
Output:
-1/4*(b*(exp_integral_e(1, 2*(-I*b*c - I*(b*x + a)*d + I*a*d)/d) + exp_int egral_e(1, -2*(-I*b*c - I*(b*x + a)*d + I*a*d)/d))*cos(-2*(b*c - a*d)/d) - b*(-I*exp_integral_e(1, 2*(-I*b*c - I*(b*x + a)*d + I*a*d)/d) + I*exp_int egral_e(1, -2*(-I*b*c - I*(b*x + a)*d + I*a*d)/d))*sin(-2*(b*c - a*d)/d) - 2*b*log(b*c + (b*x + a)*d - a*d))/(b*d)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.41 (sec) , antiderivative size = 610, normalized size of antiderivative = 7.82 \[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^2/(d*x+c),x, algorithm="giac")
Output:
1/4*(2*log(abs(d*x + c))*tan(a)^2*tan(b*c/d)^2 + real_part(cos_integral(2* b*x + 2*b*c/d))*tan(a)^2*tan(b*c/d)^2 + real_part(cos_integral(-2*b*x - 2* b*c/d))*tan(a)^2*tan(b*c/d)^2 - 2*imag_part(cos_integral(2*b*x + 2*b*c/d)) *tan(a)^2*tan(b*c/d) + 2*imag_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)^ 2*tan(b*c/d) - 4*sin_integral(2*(b*d*x + b*c)/d)*tan(a)^2*tan(b*c/d) + 2*i mag_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)*tan(b*c/d)^2 - 2*imag_part( cos_integral(-2*b*x - 2*b*c/d))*tan(a)*tan(b*c/d)^2 + 4*sin_integral(2*(b* d*x + b*c)/d)*tan(a)*tan(b*c/d)^2 + 2*log(abs(d*x + c))*tan(a)^2 - real_pa rt(cos_integral(2*b*x + 2*b*c/d))*tan(a)^2 - real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)^2 + 4*real_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)* tan(b*c/d) + 4*real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)*tan(b*c/d) + 2*log(abs(d*x + c))*tan(b*c/d)^2 - real_part(cos_integral(2*b*x + 2*b*c /d))*tan(b*c/d)^2 - real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(b*c/d)^2 - 2*imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(a) + 2*imag_part(cos_int egral(-2*b*x - 2*b*c/d))*tan(a) - 4*sin_integral(2*(b*d*x + b*c)/d)*tan(a) + 2*imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(b*c/d) - 2*imag_part(cos _integral(-2*b*x - 2*b*c/d))*tan(b*c/d) + 4*sin_integral(2*(b*d*x + b*c)/d )*tan(b*c/d) + 2*log(abs(d*x + c)) + real_part(cos_integral(2*b*x + 2*b*c/ d)) + real_part(cos_integral(-2*b*x - 2*b*c/d)))/(d*tan(a)^2*tan(b*c/d)^2 + d*tan(a)^2 + d*tan(b*c/d)^2 + d)
Timed out. \[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\int \frac {{\cos \left (a+b\,x\right )}^2}{c+d\,x} \,d x \] Input:
int(cos(a + b*x)^2/(c + d*x),x)
Output:
int(cos(a + b*x)^2/(c + d*x), x)
\[ \int \frac {\cos ^2(a+b x)}{c+d x} \, dx=\int \frac {\cos \left (b x +a \right )^{2}}{d x +c}d x \] Input:
int(cos(b*x+a)^2/(d*x+c),x)
Output:
int(cos(a + b*x)**2/(c + d*x),x)