Integrand size = 19, antiderivative size = 50 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=-\frac {(c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}+\frac {2 d \log \left (\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2} \] Output:
-(d*x+c)*cot(1/2*f*x+1/2*e)/a/f+2*d*ln(sin(1/2*f*x+1/2*e))/a/f^2
Time = 0.87 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.14 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=\frac {-4 d \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin ^2\left (\frac {1}{2} (e+f x)\right )+f (c+d x) \sin (e+f x)}{a f^2 (-1+\cos (e+f x))} \] Input:
Integrate[(c + d*x)/(a - a*Cos[e + f*x]),x]
Output:
(-4*d*Log[Sin[(e + f*x)/2]]*Sin[(e + f*x)/2]^2 + f*(c + d*x)*Sin[e + f*x]) /(a*f^2*(-1 + Cos[e + f*x]))
Time = 0.36 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.06, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3042, 3799, 3042, 4672, 3042, 25, 3956}
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 {c+d x}{a-a \cos (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{a-a \sin \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle \frac {\int (c+d x) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right )dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (c+d x) \csc \left (\frac {e}{2}+\frac {f x}{2}\right )^2dx}{2 a}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle \frac {\frac {2 d \int \cot \left (\frac {e}{2}+\frac {f x}{2}\right )dx}{f}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 d \int -\tan \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{2}\right )dx}{f}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {2 d \int \tan \left (\frac {e+\pi }{2}+\frac {f x}{2}\right )dx}{f}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\frac {4 d \log \left (-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{f^2}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}}{2 a}\) |
Input:
Int[(c + d*x)/(a - a*Cos[e + f*x]),x]
Output:
((-2*(c + d*x)*Cot[e/2 + (f*x)/2])/f + (4*d*Log[-Sin[e/2 + (f*x)/2]])/f^2) /(2*a)
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Time = 1.02 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.08
method | result | size |
parallelrisch | \(\frac {-d \ln \left (\sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )+2 d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\cot \left (\frac {f x}{2}+\frac {e}{2}\right ) f \left (d x +c \right )}{f^{2} a}\) | \(54\) |
risch | \(-\frac {2 i d x}{a f}-\frac {2 i d e}{a \,f^{2}}-\frac {2 i \left (d x +c \right )}{f a \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}+\frac {2 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{a \,f^{2}}\) | \(72\) |
norman | \(\frac {-\frac {c}{a f}-\frac {d x}{a f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}+\frac {2 d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a \,f^{2}}-\frac {d \ln \left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )}{a \,f^{2}}\) | \(76\) |
Input:
int((d*x+c)/(a-cos(f*x+e)*a),x,method=_RETURNVERBOSE)
Output:
(-d*ln(sec(1/2*f*x+1/2*e)^2)+2*d*ln(tan(1/2*f*x+1/2*e))-cot(1/2*f*x+1/2*e) *f*(d*x+c))/f^2/a
Time = 0.08 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.18 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=-\frac {d f x - d \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) + c f + {\left (d f x + c f\right )} \cos \left (f x + e\right )}{a f^{2} \sin \left (f x + e\right )} \] Input:
integrate((d*x+c)/(a-a*cos(f*x+e)),x, algorithm="fricas")
Output:
-(d*f*x - d*log(-1/2*cos(f*x + e) + 1/2)*sin(f*x + e) + c*f + (d*f*x + c*f )*cos(f*x + e))/(a*f^2*sin(f*x + e))
Leaf count of result is larger than twice the leaf count of optimal. 90 vs. \(2 (39) = 78\).
Time = 0.32 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.80 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=\begin {cases} - \frac {c}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}} - \frac {d x}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}} - \frac {d \log {\left (\tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )}}{a f^{2}} + \frac {2 d \log {\left (\tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} \right )}}{a f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{- a \cos {\left (e \right )} + a} & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)/(a-a*cos(f*x+e)),x)
Output:
Piecewise((-c/(a*f*tan(e/2 + f*x/2)) - d*x/(a*f*tan(e/2 + f*x/2)) - d*log( tan(e/2 + f*x/2)**2 + 1)/(a*f**2) + 2*d*log(tan(e/2 + f*x/2))/(a*f**2), Ne (f, 0)), ((c*x + d*x**2/2)/(-a*cos(e) + a), True))
Leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (42) = 84\).
Time = 0.04 (sec) , antiderivative size = 160, normalized size of antiderivative = 3.20 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=\frac {\frac {{\left ({\left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) + 1\right ) - 2 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} d}{a f \cos \left (f x + e\right )^{2} + a f \sin \left (f x + e\right )^{2} - 2 \, a f \cos \left (f x + e\right ) + a f} - \frac {c {\left (\cos \left (f x + e\right ) + 1\right )}}{a \sin \left (f x + e\right )} + \frac {d e {\left (\cos \left (f x + e\right ) + 1\right )}}{a f \sin \left (f x + e\right )}}{f} \] Input:
integrate((d*x+c)/(a-a*cos(f*x+e)),x, algorithm="maxima")
Output:
(((cos(f*x + e)^2 + sin(f*x + e)^2 - 2*cos(f*x + e) + 1)*log(cos(f*x + e)^ 2 + sin(f*x + e)^2 - 2*cos(f*x + e) + 1) - 2*(f*x + e)*sin(f*x + e))*d/(a* f*cos(f*x + e)^2 + a*f*sin(f*x + e)^2 - 2*a*f*cos(f*x + e) + a*f) - c*(cos (f*x + e) + 1)/(a*sin(f*x + e)) + d*e*(cos(f*x + e) + 1)/(a*f*sin(f*x + e) ))/f
Leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (42) = 84\).
Time = 0.41 (sec) , antiderivative size = 189, normalized size of antiderivative = 3.78 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=\frac {d f x \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + c f \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) - d f x + d \log \left (\frac {4 \, {\left (\tan \left (\frac {1}{2} \, f x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + \tan \left (\frac {1}{2} \, e\right )^{2}\right )}}{\tan \left (\frac {1}{2} \, f x\right )^{2} \tan \left (\frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x\right )^{2} + \tan \left (\frac {1}{2} \, e\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, f x\right ) + d \log \left (\frac {4 \, {\left (\tan \left (\frac {1}{2} \, f x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + \tan \left (\frac {1}{2} \, e\right )^{2}\right )}}{\tan \left (\frac {1}{2} \, f x\right )^{2} \tan \left (\frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x\right )^{2} + \tan \left (\frac {1}{2} \, e\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, e\right ) - c f}{a f^{2} \tan \left (\frac {1}{2} \, f x\right ) + a f^{2} \tan \left (\frac {1}{2} \, e\right )} \] Input:
integrate((d*x+c)/(a-a*cos(f*x+e)),x, algorithm="giac")
Output:
(d*f*x*tan(1/2*f*x)*tan(1/2*e) + c*f*tan(1/2*f*x)*tan(1/2*e) - d*f*x + d*l og(4*(tan(1/2*f*x)^2 + 2*tan(1/2*f*x)*tan(1/2*e) + tan(1/2*e)^2)/(tan(1/2* f*x)^2*tan(1/2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 1))*tan(1/2*f*x) + d *log(4*(tan(1/2*f*x)^2 + 2*tan(1/2*f*x)*tan(1/2*e) + tan(1/2*e)^2)/(tan(1/ 2*f*x)^2*tan(1/2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 1))*tan(1/2*e) - c *f)/(a*f^2*tan(1/2*f*x) + a*f^2*tan(1/2*e))
Time = 41.07 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.30 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=\frac {2\,d\,\ln \left ({\mathrm {e}}^{e\,1{}\mathrm {i}}\,{\mathrm {e}}^{f\,x\,1{}\mathrm {i}}-1\right )}{a\,f^2}-\frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}-1\right )}-\frac {d\,x\,2{}\mathrm {i}}{a\,f} \] Input:
int((c + d*x)/(a - a*cos(e + f*x)),x)
Output:
(2*d*log(exp(e*1i)*exp(f*x*1i) - 1))/(a*f^2) - ((c + d*x)*2i)/(a*f*(exp(e* 1i + f*x*1i) - 1)) - (d*x*2i)/(a*f)
Time = 0.19 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.52 \[ \int \frac {c+d x}{a-a \cos (e+f x)} \, dx=\frac {-\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d +2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d -c f -d f x}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) a \,f^{2}} \] Input:
int((d*x+c)/(a-a*cos(f*x+e)),x)
Output:
( - log(tan((e + f*x)/2)**2 + 1)*tan((e + f*x)/2)*d + 2*log(tan((e + f*x)/ 2))*tan((e + f*x)/2)*d - c*f - d*f*x)/(tan((e + f*x)/2)*a*f**2)