Optimal. Leaf size=50 \[ \frac {2 d \log \left (\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}-\frac {(c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3318, 4184, 3475} \[ \frac {2 d \log \left (\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}-\frac {(c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3318
Rule 3475
Rule 4184
Rubi steps
\begin {align*} \int \frac {c+d x}{a-a \cos (e+f x)} \, dx &=\frac {\int (c+d x) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{2 a}\\ &=-\frac {(c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}+\frac {d \int \cot \left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{a f}\\ &=-\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}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 57, normalized size = 1.14 \[ \frac {f (c+d x) \sin (e+f x)-4 d \sin ^2\left (\frac {1}{2} (e+f x)\right ) \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{a f^2 (\cos (e+f x)-1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 59, normalized size = 1.18 \[ -\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 )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.60, size = 229, normalized size = 4.58 \[ \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 )^{4} + 2 \, \tan \left (\frac {1}{2} \, f x\right )^{3} \tan \left (\frac {1}{2} \, e\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} + 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} \, 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 )^{4} + 2 \, \tan \left (\frac {1}{2} \, f x\right )^{3} \tan \left (\frac {1}{2} \, e\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} + 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} \, 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 )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 85, normalized size = 1.70 \[ -\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 \ln \left (1+\tan ^{2}\left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a \,f^{2}}+\frac {2 d \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a \,f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.86, size = 160, normalized size = 3.20 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.52, size = 65, normalized size = 1.30 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.77, size = 90, normalized size = 1.80 \[ \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 {\relax (e )} + a} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________