Integrand size = 18, antiderivative size = 94 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\frac {2 \log \left (3-\sqrt {5}+2 x\right )}{\sqrt {5} \left (2 d-\left (3-\sqrt {5}\right ) e\right )}-\frac {2 \log \left (3+\sqrt {5}+2 x\right )}{\sqrt {5} \left (2 d-\left (3+\sqrt {5}\right ) e\right )}+\frac {e \log (d+e x)}{d^2-3 d e+e^2} \] Output:
2/5*ln(3-5^(1/2)+2*x)*5^(1/2)/(2*d-(3-5^(1/2))*e)-2/5*ln(3+5^(1/2)+2*x)*5^ (1/2)/(2*d-(3+5^(1/2))*e)+e*ln(e*x+d)/(d^2-3*d*e+e^2)
Time = 0.03 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.71 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\frac {-2 \sqrt {5} (2 d-3 e) \text {arctanh}\left (\frac {3+2 x}{\sqrt {5}}\right )+5 e \left (2 \log (d+e x)-\log \left (1+3 x+x^2\right )\right )}{10 \left (d^2-3 d e+e^2\right )} \] Input:
Integrate[1/((d + e*x)*(1 + 3*x + x^2)),x]
Output:
(-2*Sqrt[5]*(2*d - 3*e)*ArcTanh[(3 + 2*x)/Sqrt[5]] + 5*e*(2*Log[d + e*x] - Log[1 + 3*x + x^2]))/(10*(d^2 - 3*d*e + e^2))
Time = 0.30 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1141, 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 {1}{\left (x^2+3 x+1\right ) (d+e x)} \, dx\) |
\(\Big \downarrow \) 1141 |
\(\displaystyle \int \left (\frac {e^2}{\left (d^2-3 d e+e^2\right ) (d+e x)}+\frac {4}{\sqrt {5} \left (2 x-\sqrt {5}+3\right ) \left (2 d-\left (3-\sqrt {5}\right ) e\right )}-\frac {4}{\sqrt {5} \left (2 x+\sqrt {5}+3\right ) \left (2 d-\left (3+\sqrt {5}\right ) e\right )}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {e \log (d+e x)}{d^2-3 d e+e^2}+\frac {2 \log \left (2 x-\sqrt {5}+3\right )}{\sqrt {5} \left (2 d-\left (3-\sqrt {5}\right ) e\right )}-\frac {2 \log \left (2 x+\sqrt {5}+3\right )}{\sqrt {5} \left (2 d-\left (3+\sqrt {5}\right ) e\right )}\) |
Input:
Int[1/((d + e*x)*(1 + 3*x + x^2)),x]
Output:
(2*Log[3 - Sqrt[5] + 2*x])/(Sqrt[5]*(2*d - (3 - Sqrt[5])*e)) - (2*Log[3 + Sqrt[5] + 2*x])/(Sqrt[5]*(2*d - (3 + Sqrt[5])*e)) + (e*Log[d + e*x])/(d^2 - 3*d*e + e^2)
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_ Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[1/c^p Int[ExpandIntegrand[ (d + e*x)^m*(b/2 - q/2 + c*x)^p*(b/2 + q/2 + c*x)^p, x], x], x] /; EqQ[p, - 1] || !FractionalPowerFactorQ[q]] /; FreeQ[{a, b, c, d, e}, x] && ILtQ[p, 0] && IntegerQ[m] && NiceSqrtQ[b^2 - 4*a*c]
Time = 1.00 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.76
method | result | size |
default | \(\frac {e \ln \left (e x +d \right )}{d^{2}-3 d e +e^{2}}+\frac {-\frac {e \ln \left (x^{2}+3 x +1\right )}{2}-\frac {2 \left (-\frac {3 e}{2}+d \right ) \operatorname {arctanh}\left (\frac {\left (2 x +3\right ) \sqrt {5}}{5}\right ) \sqrt {5}}{5}}{d^{2}-3 d e +e^{2}}\) | \(71\) |
risch | \(\frac {e \ln \left (e x +d \right )}{d^{2}-3 d e +e^{2}}+\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (-1+\left (5 d^{2}-15 d e +5 e^{2}\right ) \textit {\_Z}^{2}+5 e \textit {\_Z} \right )}{\sum }\textit {\_R} \ln \left (\left (\left (-2 d^{2}+6 d e -12 e^{2}\right ) \textit {\_R} +3 e \right ) x +\left (-3 d^{2}-d e -3 e^{2}\right ) \textit {\_R} +d +3 e \right )\right )\) | \(100\) |
Input:
int(1/(e*x+d)/(x^2+3*x+1),x,method=_RETURNVERBOSE)
Output:
e*ln(e*x+d)/(d^2-3*d*e+e^2)+1/(d^2-3*d*e+e^2)*(-1/2*e*ln(x^2+3*x+1)-2/5*(- 3/2*e+d)*arctanh(1/5*(2*x+3)*5^(1/2))*5^(1/2))
Time = 0.11 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.84 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=-\frac {\sqrt {5} {\left (2 \, d - 3 \, e\right )} \log \left (\frac {2 \, x^{2} + \sqrt {5} {\left (2 \, x + 3\right )} + 6 \, x + 7}{x^{2} + 3 \, x + 1}\right ) - 10 \, e \log \left (e x + d\right ) + 5 \, e \log \left (x^{2} + 3 \, x + 1\right )}{10 \, {\left (d^{2} - 3 \, d e + e^{2}\right )}} \] Input:
integrate(1/(e*x+d)/(x^2+3*x+1),x, algorithm="fricas")
Output:
-1/10*(sqrt(5)*(2*d - 3*e)*log((2*x^2 + sqrt(5)*(2*x + 3) + 6*x + 7)/(x^2 + 3*x + 1)) - 10*e*log(e*x + d) + 5*e*log(x^2 + 3*x + 1))/(d^2 - 3*d*e + e ^2)
Leaf count of result is larger than twice the leaf count of optimal. 1812 vs. \(2 (83) = 166\).
Time = 5.58 (sec) , antiderivative size = 1812, normalized size of antiderivative = 19.28 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\text {Too large to display} \] Input:
integrate(1/(e*x+d)/(x**2+3*x+1),x)
Output:
e*log(x + (-10*d**6*e**2/(d**2 - 3*d*e + e**2)**2 + 90*d**5*e**3/(d**2 - 3 *d*e + e**2)**2 - 350*d**4*e**4/(d**2 - 3*d*e + e**2)**2 - 15*d**4*e**2/(d **2 - 3*d*e + e**2) + 2*d**4 + 750*d**3*e**5/(d**2 - 3*d*e + e**2)**2 + 90 *d**3*e**3/(d**2 - 3*d*e + e**2) - 9*d**3*e - 850*d**2*e**6/(d**2 - 3*d*e + e**2)**2 - 165*d**2*e**4/(d**2 - 3*d*e + e**2) + 16*d**2*e**2 + 390*d*e* *7/(d**2 - 3*d*e + e**2)**2 + 90*d*e**5/(d**2 - 3*d*e + e**2) - 48*d*e**3 - 60*e**8/(d**2 - 3*d*e + e**2)**2 - 15*e**6/(d**2 - 3*d*e + e**2) + 75*e* *4)/(2*d**3*e - 9*d**2*e**2 - 9*d*e**3 + 27*e**4))/(d**2 - 3*d*e + e**2) + (-e/(2*(d**2 - 3*d*e + e**2)) - sqrt(5)*(2*d - 3*e)/(10*(d**2 - 3*d*e + e **2)))*log(x + (-10*d**6*(-e/(2*(d**2 - 3*d*e + e**2)) - sqrt(5)*(2*d - 3* e)/(10*(d**2 - 3*d*e + e**2)))**2 + 90*d**5*e*(-e/(2*(d**2 - 3*d*e + e**2) ) - sqrt(5)*(2*d - 3*e)/(10*(d**2 - 3*d*e + e**2)))**2 - 350*d**4*e**2*(-e /(2*(d**2 - 3*d*e + e**2)) - sqrt(5)*(2*d - 3*e)/(10*(d**2 - 3*d*e + e**2) ))**2 - 15*d**4*e*(-e/(2*(d**2 - 3*d*e + e**2)) - sqrt(5)*(2*d - 3*e)/(10* (d**2 - 3*d*e + e**2))) + 2*d**4 + 750*d**3*e**3*(-e/(2*(d**2 - 3*d*e + e* *2)) - sqrt(5)*(2*d - 3*e)/(10*(d**2 - 3*d*e + e**2)))**2 + 90*d**3*e**2*( -e/(2*(d**2 - 3*d*e + e**2)) - sqrt(5)*(2*d - 3*e)/(10*(d**2 - 3*d*e + e** 2))) - 9*d**3*e - 850*d**2*e**4*(-e/(2*(d**2 - 3*d*e + e**2)) - sqrt(5)*(2 *d - 3*e)/(10*(d**2 - 3*d*e + e**2)))**2 - 165*d**2*e**3*(-e/(2*(d**2 - 3* d*e + e**2)) - sqrt(5)*(2*d - 3*e)/(10*(d**2 - 3*d*e + e**2))) + 16*d**...
Time = 0.12 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\frac {\sqrt {5} {\left (2 \, d - 3 \, e\right )} \log \left (\frac {2 \, x - \sqrt {5} + 3}{2 \, x + \sqrt {5} + 3}\right )}{10 \, {\left (d^{2} - 3 \, d e + e^{2}\right )}} + \frac {e \log \left (e x + d\right )}{d^{2} - 3 \, d e + e^{2}} - \frac {e \log \left (x^{2} + 3 \, x + 1\right )}{2 \, {\left (d^{2} - 3 \, d e + e^{2}\right )}} \] Input:
integrate(1/(e*x+d)/(x^2+3*x+1),x, algorithm="maxima")
Output:
1/10*sqrt(5)*(2*d - 3*e)*log((2*x - sqrt(5) + 3)/(2*x + sqrt(5) + 3))/(d^2 - 3*d*e + e^2) + e*log(e*x + d)/(d^2 - 3*d*e + e^2) - 1/2*e*log(x^2 + 3*x + 1)/(d^2 - 3*d*e + e^2)
Time = 0.38 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.11 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\frac {e^{2} \log \left ({\left | e x + d \right |}\right )}{d^{2} e - 3 \, d e^{2} + e^{3}} + \frac {\sqrt {5} {\left (2 \, d - 3 \, e\right )} \log \left (\frac {{\left | 2 \, x - \sqrt {5} + 3 \right |}}{{\left | 2 \, x + \sqrt {5} + 3 \right |}}\right )}{10 \, {\left (d^{2} - 3 \, d e + e^{2}\right )}} - \frac {e \log \left ({\left | x^{2} + 3 \, x + 1 \right |}\right )}{2 \, {\left (d^{2} - 3 \, d e + e^{2}\right )}} \] Input:
integrate(1/(e*x+d)/(x^2+3*x+1),x, algorithm="giac")
Output:
e^2*log(abs(e*x + d))/(d^2*e - 3*d*e^2 + e^3) + 1/10*sqrt(5)*(2*d - 3*e)*l og(abs(2*x - sqrt(5) + 3)/abs(2*x + sqrt(5) + 3))/(d^2 - 3*d*e + e^2) - 1/ 2*e*log(abs(x^2 + 3*x + 1))/(d^2 - 3*d*e + e^2)
Time = 0.14 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.95 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\frac {e\,\ln \left (\frac {{\left (d+e\,x\right )}^2}{x^2+3\,x+1}\right )}{2\,d^2-6\,d\,e+2\,e^2}+\frac {\sqrt {5}\,\ln \left (\frac {2\,x-\sqrt {5}+3}{2\,x+\sqrt {5}+3}\right )\,\left (2\,d-3\,e\right )}{5\,\left (2\,d^2-6\,d\,e+2\,e^2\right )} \] Input:
int(1/((d + e*x)*(3*x + x^2 + 1)),x)
Output:
(e*log((d + e*x)^2/(3*x + x^2 + 1)))/(2*d^2 - 6*d*e + 2*e^2) + (5^(1/2)*lo g((2*x - 5^(1/2) + 3)/(2*x + 5^(1/2) + 3))*(2*d - 3*e))/(5*(2*d^2 - 6*d*e + 2*e^2))
Time = 0.21 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.15 \[ \int \frac {1}{(d+e x) \left (1+3 x+x^2\right )} \, dx=\frac {2 \sqrt {5}\, \mathrm {log}\left (-\sqrt {5}+2 x +3\right ) d -3 \sqrt {5}\, \mathrm {log}\left (-\sqrt {5}+2 x +3\right ) e -2 \sqrt {5}\, \mathrm {log}\left (\sqrt {5}+2 x +3\right ) d +3 \sqrt {5}\, \mathrm {log}\left (\sqrt {5}+2 x +3\right ) e -5 \,\mathrm {log}\left (-\sqrt {5}+2 x +3\right ) e -5 \,\mathrm {log}\left (\sqrt {5}+2 x +3\right ) e +10 \,\mathrm {log}\left (e x +d \right ) e}{10 d^{2}-30 d e +10 e^{2}} \] Input:
int(1/(e*x+d)/(x^2+3*x+1),x)
Output:
(2*sqrt(5)*log( - sqrt(5) + 2*x + 3)*d - 3*sqrt(5)*log( - sqrt(5) + 2*x + 3)*e - 2*sqrt(5)*log(sqrt(5) + 2*x + 3)*d + 3*sqrt(5)*log(sqrt(5) + 2*x + 3)*e - 5*log( - sqrt(5) + 2*x + 3)*e - 5*log(sqrt(5) + 2*x + 3)*e + 10*log (d + e*x)*e)/(10*(d**2 - 3*d*e + e**2))