Integrand size = 25, antiderivative size = 72 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=\sqrt {\frac {1}{23} \left (13+8 \sqrt {3}\right )} \text {arctanh}\left (\frac {1+\sqrt {3}+2 x}{\sqrt {2 \left (-2+3 \sqrt {3}\right )}}\right )+\frac {1}{2} \log \left (2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2\right ) \]
1/2*ln(2+x^2-3^(1/2)+x*(1+3^(1/2)))+1/23*arctanh((1+2*x+3^(1/2))/(-4+6*3^( 1/2))^(1/2))*(299+184*3^(1/2))^(1/2)
Time = 0.06 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=\frac {\left (1+\sqrt {3}\right ) \text {arctanh}\left (\frac {1+\sqrt {3}+2 x}{\sqrt {-4+6 \sqrt {3}}}\right )}{\sqrt {-4+6 \sqrt {3}}}+\frac {1}{2} \log \left (2-\sqrt {3}+x+\sqrt {3} x+x^2\right ) \]
((1 + Sqrt[3])*ArcTanh[(1 + Sqrt[3] + 2*x)/Sqrt[-4 + 6*Sqrt[3]]])/Sqrt[-4 + 6*Sqrt[3]] + Log[2 - Sqrt[3] + x + Sqrt[3]*x + x^2]/2
Time = 0.23 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {1142, 1083, 219, 1103}
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 {x}{x^2+\left (1+\sqrt {3}\right ) x-\sqrt {3}+2} \, dx\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {1}{2} \int \frac {2 x+\sqrt {3}+1}{x^2+\left (1+\sqrt {3}\right ) x-\sqrt {3}+2}dx-\frac {1}{2} \left (1+\sqrt {3}\right ) \int \frac {1}{x^2+\left (1+\sqrt {3}\right ) x-\sqrt {3}+2}dx\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {1}{2} \int \frac {2 x+\sqrt {3}+1}{x^2+\left (1+\sqrt {3}\right ) x-\sqrt {3}+2}dx+\left (1+\sqrt {3}\right ) \int \frac {1}{-\left (2 x+\sqrt {3}+1\right )^2-2 \left (2-3 \sqrt {3}\right )}d\left (2 x+\sqrt {3}+1\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {1}{2} \int \frac {2 x+\sqrt {3}+1}{x^2+\left (1+\sqrt {3}\right ) x-\sqrt {3}+2}dx+\frac {\left (1+\sqrt {3}\right ) \text {arctanh}\left (\frac {2 x+\sqrt {3}+1}{\sqrt {2 \left (3 \sqrt {3}-2\right )}}\right )}{\sqrt {2 \left (3 \sqrt {3}-2\right )}}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {\left (1+\sqrt {3}\right ) \text {arctanh}\left (\frac {2 x+\sqrt {3}+1}{\sqrt {2 \left (3 \sqrt {3}-2\right )}}\right )}{\sqrt {2 \left (3 \sqrt {3}-2\right )}}+\frac {1}{2} \log \left (x^2+\left (1+\sqrt {3}\right ) x-\sqrt {3}+2\right )\) |
((1 + Sqrt[3])*ArcTanh[(1 + Sqrt[3] + 2*x)/Sqrt[2*(-2 + 3*Sqrt[3])]])/Sqrt [2*(-2 + 3*Sqrt[3])] + Log[2 - Sqrt[3] + (1 + Sqrt[3])*x + x^2]/2
3.10.59.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Time = 1.19 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.81
method | result | size |
default | \(\frac {\ln \left (x \sqrt {3}+x^{2}-\sqrt {3}+x +2\right )}{2}-\frac {2 \left (-\frac {1}{2}-\frac {\sqrt {3}}{2}\right ) \operatorname {arctanh}\left (\frac {1+2 x +\sqrt {3}}{\sqrt {-4+6 \sqrt {3}}}\right )}{\sqrt {-4+6 \sqrt {3}}}\) | \(58\) |
1/2*ln(x*3^(1/2)+x^2-3^(1/2)+x+2)-2*(-1/2-1/2*3^(1/2))/(-4+6*3^(1/2))^(1/2 )*arctanh((1+2*x+3^(1/2))/(-4+6*3^(1/2))^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 131 vs. \(2 (51) = 102\).
Time = 0.30 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.82 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=\frac {1}{46} \, \sqrt {23} \sqrt {8 \, \sqrt {3} + 13} \log \left (\frac {23 \, x^{4} + 46 \, x^{3} + \sqrt {23} {\left (11 \, x^{3} + 24 \, x^{2} - \sqrt {3} {\left (5 \, x^{3} + 13 \, x^{2} - 6 \, x - 4\right )} - 4 \, x + 5\right )} \sqrt {8 \, \sqrt {3} + 13} + 23 \, \sqrt {3} {\left (3 \, x^{2} + 5 \, x + 4\right )} - 23 \, x + 138}{x^{4} + 2 \, x^{3} + 2 \, x^{2} + 10 \, x + 1}\right ) + \frac {1}{2} \, \log \left (x^{2} + \sqrt {3} {\left (x - 1\right )} + x + 2\right ) \]
1/46*sqrt(23)*sqrt(8*sqrt(3) + 13)*log((23*x^4 + 46*x^3 + sqrt(23)*(11*x^3 + 24*x^2 - sqrt(3)*(5*x^3 + 13*x^2 - 6*x - 4) - 4*x + 5)*sqrt(8*sqrt(3) + 13) + 23*sqrt(3)*(3*x^2 + 5*x + 4) - 23*x + 138)/(x^4 + 2*x^3 + 2*x^2 + 1 0*x + 1)) + 1/2*log(x^2 + sqrt(3)*(x - 1) + x + 2)
Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (58) = 116\).
Time = 0.70 (sec) , antiderivative size = 202, normalized size of antiderivative = 2.81 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=\left (\frac {\sqrt {5 + 4 \sqrt {3}}}{2 \cdot \left (2 - 3 \sqrt {3}\right )} + \frac {1}{2}\right ) \log {\left (x - \frac {5 \sqrt {3}}{5 + 4 \sqrt {3}} + \left (\frac {\sqrt {5 + 4 \sqrt {3}}}{2 \cdot \left (2 - 3 \sqrt {3}\right )} + \frac {1}{2}\right ) \left (\frac {47}{22 + 13 \sqrt {3}} + \frac {33 \sqrt {3}}{22 + 13 \sqrt {3}}\right ) + \frac {11}{5 + 4 \sqrt {3}} \right )} + \left (\frac {1}{2} - \frac {\sqrt {5 + 4 \sqrt {3}}}{2 \cdot \left (2 - 3 \sqrt {3}\right )}\right ) \log {\left (x - \frac {5 \sqrt {3}}{5 + 4 \sqrt {3}} + \frac {11}{5 + 4 \sqrt {3}} + \left (\frac {1}{2} - \frac {\sqrt {5 + 4 \sqrt {3}}}{2 \cdot \left (2 - 3 \sqrt {3}\right )}\right ) \left (\frac {47}{22 + 13 \sqrt {3}} + \frac {33 \sqrt {3}}{22 + 13 \sqrt {3}}\right ) \right )} \]
(sqrt(5 + 4*sqrt(3))/(2*(2 - 3*sqrt(3))) + 1/2)*log(x - 5*sqrt(3)/(5 + 4*s qrt(3)) + (sqrt(5 + 4*sqrt(3))/(2*(2 - 3*sqrt(3))) + 1/2)*(47/(22 + 13*sqr t(3)) + 33*sqrt(3)/(22 + 13*sqrt(3))) + 11/(5 + 4*sqrt(3))) + (1/2 - sqrt( 5 + 4*sqrt(3))/(2*(2 - 3*sqrt(3))))*log(x - 5*sqrt(3)/(5 + 4*sqrt(3)) + 11 /(5 + 4*sqrt(3)) + (1/2 - sqrt(5 + 4*sqrt(3))/(2*(2 - 3*sqrt(3))))*(47/(22 + 13*sqrt(3)) + 33*sqrt(3)/(22 + 13*sqrt(3))))
Time = 0.26 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.07 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=-\frac {{\left (\sqrt {3} + 1\right )} \log \left (\frac {2 \, x + \sqrt {3} - \sqrt {6 \, \sqrt {3} - 4} + 1}{2 \, x + \sqrt {3} + \sqrt {6 \, \sqrt {3} - 4} + 1}\right )}{2 \, \sqrt {6 \, \sqrt {3} - 4}} + \frac {1}{2} \, \log \left (x^{2} + x {\left (\sqrt {3} + 1\right )} - \sqrt {3} + 2\right ) \]
-1/2*(sqrt(3) + 1)*log((2*x + sqrt(3) - sqrt(6*sqrt(3) - 4) + 1)/(2*x + sq rt(3) + sqrt(6*sqrt(3) - 4) + 1))/sqrt(6*sqrt(3) - 4) + 1/2*log(x^2 + x*(s qrt(3) + 1) - sqrt(3) + 2)
Time = 0.33 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.11 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=-\frac {{\left (\sqrt {3} + 1\right )} \log \left (\frac {{\left | 2 \, x + \sqrt {3} - \sqrt {6 \, \sqrt {3} - 4} + 1 \right |}}{{\left | 2 \, x + \sqrt {3} + \sqrt {6 \, \sqrt {3} - 4} + 1 \right |}}\right )}{2 \, \sqrt {6 \, \sqrt {3} - 4}} + \frac {1}{2} \, \log \left ({\left | x^{2} + x {\left (\sqrt {3} + 1\right )} - \sqrt {3} + 2 \right |}\right ) \]
-1/2*(sqrt(3) + 1)*log(abs(2*x + sqrt(3) - sqrt(6*sqrt(3) - 4) + 1)/abs(2* x + sqrt(3) + sqrt(6*sqrt(3) - 4) + 1))/sqrt(6*sqrt(3) - 4) + 1/2*log(abs( x^2 + x*(sqrt(3) + 1) - sqrt(3) + 2))
Time = 20.60 (sec) , antiderivative size = 233, normalized size of antiderivative = 3.24 \[ \int \frac {x}{2-\sqrt {3}+\left (1+\sqrt {3}\right ) x+x^2} \, dx=\ln \left (x-\left (\frac {\frac {\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}+\frac {\sqrt {3}\,\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}}{\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}+\frac {1}{2}\right )\,\left (2\,x+\sqrt {3}+1\right )\right )\,\left (\frac {\frac {\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}+\frac {\sqrt {3}\,\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}}{\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}+\frac {1}{2}\right )-\ln \left (x+\left (\frac {\frac {\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}+\frac {\sqrt {3}\,\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}}{\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}-\frac {1}{2}\right )\,\left (2\,x+\sqrt {3}+1\right )\right )\,\left (\frac {\frac {\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}+\frac {\sqrt {3}\,\sqrt {\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}}{2}}{\left (\sqrt {3}-1\right )\,\left (\sqrt {3}+7\right )}-\frac {1}{2}\right ) \]
log(x - ((((3^(1/2) - 1)*(3^(1/2) + 7))^(1/2)/2 + (3^(1/2)*((3^(1/2) - 1)* (3^(1/2) + 7))^(1/2))/2)/((3^(1/2) - 1)*(3^(1/2) + 7)) + 1/2)*(2*x + 3^(1/ 2) + 1))*((((3^(1/2) - 1)*(3^(1/2) + 7))^(1/2)/2 + (3^(1/2)*((3^(1/2) - 1) *(3^(1/2) + 7))^(1/2))/2)/((3^(1/2) - 1)*(3^(1/2) + 7)) + 1/2) - log(x + ( (((3^(1/2) - 1)*(3^(1/2) + 7))^(1/2)/2 + (3^(1/2)*((3^(1/2) - 1)*(3^(1/2) + 7))^(1/2))/2)/((3^(1/2) - 1)*(3^(1/2) + 7)) - 1/2)*(2*x + 3^(1/2) + 1))* ((((3^(1/2) - 1)*(3^(1/2) + 7))^(1/2)/2 + (3^(1/2)*((3^(1/2) - 1)*(3^(1/2) + 7))^(1/2))/2)/((3^(1/2) - 1)*(3^(1/2) + 7)) - 1/2)