Integrand size = 28, antiderivative size = 72 \[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\frac {\log (e+f x)}{a f}-\frac {\operatorname {CosIntegral}\left (\frac {d e}{f}+d x\right ) \sin \left (c-\frac {d e}{f}\right )}{a f}-\frac {\cos \left (c-\frac {d e}{f}\right ) \text {Si}\left (\frac {d e}{f}+d x\right )}{a f} \] Output:
ln(f*x+e)/a/f-Ci(d*e/f+d*x)*sin(c-d*e/f)/a/f-cos(c-d*e/f)*Si(d*e/f+d*x)/a/ f
Time = 0.50 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.81 \[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\frac {\log (e+f x)-\operatorname {CosIntegral}\left (d \left (\frac {e}{f}+x\right )\right ) \sin \left (c-\frac {d e}{f}\right )-\cos \left (c-\frac {d e}{f}\right ) \text {Si}\left (d \left (\frac {e}{f}+x\right )\right )}{a f} \] Input:
Integrate[Cos[c + d*x]^2/((e + f*x)*(a + a*Sin[c + d*x])),x]
Output:
(Log[e + f*x] - CosIntegral[d*(e/f + x)]*Sin[c - (d*e)/f] - Cos[c - (d*e)/ f]*SinIntegral[d*(e/f + x)])/(a*f)
Time = 0.53 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.97, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5034, 16, 3042, 3784, 3042, 3780, 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 ^2(c+d x)}{(e+f x) (a \sin (c+d x)+a)} \, dx\) |
\(\Big \downarrow \) 5034 |
\(\displaystyle \frac {\int \frac {1}{e+f x}dx}{a}-\frac {\int \frac {\sin (c+d x)}{e+f x}dx}{a}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {\log (e+f x)}{a f}-\frac {\int \frac {\sin (c+d x)}{e+f x}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\log (e+f x)}{a f}-\frac {\int \frac {\sin (c+d x)}{e+f x}dx}{a}\) |
\(\Big \downarrow \) 3784 |
\(\displaystyle \frac {\log (e+f x)}{a f}-\frac {\sin \left (c-\frac {d e}{f}\right ) \int \frac {\cos \left (\frac {d e}{f}+d x\right )}{e+f x}dx+\cos \left (c-\frac {d e}{f}\right ) \int \frac {\sin \left (\frac {d e}{f}+d x\right )}{e+f x}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\log (e+f x)}{a f}-\frac {\sin \left (c-\frac {d e}{f}\right ) \int \frac {\sin \left (\frac {d e}{f}+d x+\frac {\pi }{2}\right )}{e+f x}dx+\cos \left (c-\frac {d e}{f}\right ) \int \frac {\sin \left (\frac {d e}{f}+d x\right )}{e+f x}dx}{a}\) |
\(\Big \downarrow \) 3780 |
\(\displaystyle \frac {\log (e+f x)}{a f}-\frac {\sin \left (c-\frac {d e}{f}\right ) \int \frac {\sin \left (\frac {d e}{f}+d x+\frac {\pi }{2}\right )}{e+f x}dx+\frac {\cos \left (c-\frac {d e}{f}\right ) \text {Si}\left (\frac {d e}{f}+d x\right )}{f}}{a}\) |
\(\Big \downarrow \) 3783 |
\(\displaystyle \frac {\log (e+f x)}{a f}-\frac {\frac {\sin \left (c-\frac {d e}{f}\right ) \operatorname {CosIntegral}\left (\frac {d e}{f}+d x\right )}{f}+\frac {\cos \left (c-\frac {d e}{f}\right ) \text {Si}\left (\frac {d e}{f}+d x\right )}{f}}{a}\) |
Input:
Int[Cos[c + d*x]^2/((e + f*x)*(a + a*Sin[c + d*x])),x]
Output:
Log[e + f*x]/(a*f) - ((CosIntegral[(d*e)/f + d*x]*Sin[c - (d*e)/f])/f + (C os[c - (d*e)/f]*SinIntegral[(d*e)/f + d*x])/f)/a
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinInte gral[e + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*e - c*f, 0]
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[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[Cos[(d* e - c*f)/d] Int[Sin[c*(f/d) + f*x]/(c + d*x), x], x] + Simp[Sin[(d*e - c* f)/d] Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f}, x] && NeQ[d*e - c*f, 0]
Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.) *Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] - Simp[1/b Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)*Sin[ c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^ 2 - b^2, 0]
Time = 0.88 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.44
method | result | size |
derivativedivides | \(-\frac {-\frac {\operatorname {Si}\left (-d x -c -\frac {-c f +d e}{f}\right ) \cos \left (\frac {-c f +d e}{f}\right )}{f}-\frac {\operatorname {Ci}\left (d x +c +\frac {-c f +d e}{f}\right ) \sin \left (\frac {-c f +d e}{f}\right )}{f}-\frac {\ln \left (-c f +d e +f \left (d x +c \right )\right )}{f}}{a}\) | \(104\) |
default | \(-\frac {-\frac {\operatorname {Si}\left (-d x -c -\frac {-c f +d e}{f}\right ) \cos \left (\frac {-c f +d e}{f}\right )}{f}-\frac {\operatorname {Ci}\left (d x +c +\frac {-c f +d e}{f}\right ) \sin \left (\frac {-c f +d e}{f}\right )}{f}-\frac {\ln \left (-c f +d e +f \left (d x +c \right )\right )}{f}}{a}\) | \(104\) |
risch | \(\frac {\ln \left (f x +e \right )}{a f}-\frac {i {\mathrm e}^{\frac {i \left (c f -d e \right )}{f}} \operatorname {expIntegral}_{1}\left (-i d x -i c -\frac {-i c f +i d e}{f}\right )}{2 a f}+\frac {i {\mathrm e}^{-\frac {i \left (c f -d e \right )}{f}} \operatorname {expIntegral}_{1}\left (i d x +i c -\frac {i \left (c f -d e \right )}{f}\right )}{2 a f}\) | \(117\) |
Input:
int(cos(d*x+c)^2/(f*x+e)/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
-1/a*(-Si(-d*x-c-(-c*f+d*e)/f)*cos((-c*f+d*e)/f)/f-Ci(d*x+c+(-c*f+d*e)/f)* sin((-c*f+d*e)/f)/f-ln(-c*f+d*e+f*(d*x+c))/f)
Time = 0.08 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.01 \[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=-\frac {\operatorname {Ci}\left (\frac {d f x + d e}{f}\right ) \sin \left (-\frac {d e - c f}{f}\right ) + \cos \left (-\frac {d e - c f}{f}\right ) \operatorname {Si}\left (\frac {d f x + d e}{f}\right ) - \log \left (f x + e\right )}{a f} \] Input:
integrate(cos(d*x+c)^2/(f*x+e)/(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
-(cos_integral((d*f*x + d*e)/f)*sin(-(d*e - c*f)/f) + cos(-(d*e - c*f)/f)* sin_integral((d*f*x + d*e)/f) - log(f*x + e))/(a*f)
\[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\frac {\int \frac {\cos ^{2}{\left (c + d x \right )}}{e \sin {\left (c + d x \right )} + e + f x \sin {\left (c + d x \right )} + f x}\, dx}{a} \] Input:
integrate(cos(d*x+c)**2/(f*x+e)/(a+a*sin(d*x+c)),x)
Output:
Integral(cos(c + d*x)**2/(e*sin(c + d*x) + e + f*x*sin(c + d*x) + f*x), x) /a
Result contains complex when optimal does not.
Time = 0.09 (sec) , antiderivative size = 163, normalized size of antiderivative = 2.26 \[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\frac {d {\left (i \, E_{1}\left (\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right ) - i \, E_{1}\left (-\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right )\right )} \cos \left (-\frac {d e - c f}{f}\right ) + d {\left (E_{1}\left (\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right ) + E_{1}\left (-\frac {i \, d e + i \, {\left (d x + c\right )} f - i \, c f}{f}\right )\right )} \sin \left (-\frac {d e - c f}{f}\right ) + 2 \, d \log \left (d e + {\left (d x + c\right )} f - c f\right )}{2 \, a d f} \] Input:
integrate(cos(d*x+c)^2/(f*x+e)/(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
1/2*(d*(I*exp_integral_e(1, (I*d*e + I*(d*x + c)*f - I*c*f)/f) - I*exp_int egral_e(1, -(I*d*e + I*(d*x + c)*f - I*c*f)/f))*cos(-(d*e - c*f)/f) + d*(e xp_integral_e(1, (I*d*e + I*(d*x + c)*f - I*c*f)/f) + exp_integral_e(1, -( I*d*e + I*(d*x + c)*f - I*c*f)/f))*sin(-(d*e - c*f)/f) + 2*d*log(d*e + (d* x + c)*f - c*f))/(a*d*f)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.18 (sec) , antiderivative size = 670, normalized size of antiderivative = 9.31 \[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)^2/(f*x+e)/(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
-1/2*(imag_part(cos_integral(d*x + d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f)^2 - imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)^2*tan(1/2*d*e/f)^2 - 2*l og(abs(f*x + e))*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + 2*sin_integral((d*f*x + d *e)/f)*tan(1/2*c)^2*tan(1/2*d*e/f)^2 + 2*real_part(cos_integral(d*x + d*e/ f))*tan(1/2*c)^2*tan(1/2*d*e/f) + 2*real_part(cos_integral(-d*x - d*e/f))* tan(1/2*c)^2*tan(1/2*d*e/f) - 2*real_part(cos_integral(d*x + d*e/f))*tan(1 /2*c)*tan(1/2*d*e/f)^2 - 2*real_part(cos_integral(-d*x - d*e/f))*tan(1/2*c )*tan(1/2*d*e/f)^2 - imag_part(cos_integral(d*x + d*e/f))*tan(1/2*c)^2 + i mag_part(cos_integral(-d*x - d*e/f))*tan(1/2*c)^2 - 2*log(abs(f*x + e))*ta n(1/2*c)^2 - 2*sin_integral((d*f*x + d*e)/f)*tan(1/2*c)^2 + 4*imag_part(co s_integral(d*x + d*e/f))*tan(1/2*c)*tan(1/2*d*e/f) - 4*imag_part(cos_integ ral(-d*x - d*e/f))*tan(1/2*c)*tan(1/2*d*e/f) + 8*sin_integral((d*f*x + d*e )/f)*tan(1/2*c)*tan(1/2*d*e/f) - imag_part(cos_integral(d*x + d*e/f))*tan( 1/2*d*e/f)^2 + imag_part(cos_integral(-d*x - d*e/f))*tan(1/2*d*e/f)^2 - 2* log(abs(f*x + e))*tan(1/2*d*e/f)^2 - 2*sin_integral((d*f*x + d*e)/f)*tan(1 /2*d*e/f)^2 + 2*real_part(cos_integral(d*x + d*e/f))*tan(1/2*c) + 2*real_p art(cos_integral(-d*x - d*e/f))*tan(1/2*c) - 2*real_part(cos_integral(d*x + d*e/f))*tan(1/2*d*e/f) - 2*real_part(cos_integral(-d*x - d*e/f))*tan(1/2 *d*e/f) + imag_part(cos_integral(d*x + d*e/f)) - imag_part(cos_integral(-d *x - d*e/f)) - 2*log(abs(f*x + e)) + 2*sin_integral((d*f*x + d*e)/f))/(...
Timed out. \[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^2}{\left (e+f\,x\right )\,\left (a+a\,\sin \left (c+d\,x\right )\right )} \,d x \] Input:
int(cos(c + d*x)^2/((e + f*x)*(a + a*sin(c + d*x))),x)
Output:
int(cos(c + d*x)^2/((e + f*x)*(a + a*sin(c + d*x))), x)
\[ \int \frac {\cos ^2(c+d x)}{(e+f x) (a+a \sin (c+d x))} \, dx=\frac {-\left (\int \frac {\sin \left (d x +c \right )}{f x +e}d x \right ) f +\mathrm {log}\left (f x +e \right )}{a f} \] Input:
int(cos(d*x+c)^2/(f*x+e)/(a+a*sin(d*x+c)),x)
Output:
( - int(sin(c + d*x)/(e + f*x),x)*f + log(e + f*x))/(a*f)