Integrand size = 23, antiderivative size = 117 \[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=-\sqrt {\frac {1}{2} \left (2+\sqrt {5}\right )} \arctan \left (\frac {5+2 \sqrt {5}-\sqrt {5} x}{\sqrt {10 \left (2+\sqrt {5}\right )} \sqrt {-1+x+x^2}}\right )+\sqrt {\frac {1}{2} \left (-2+\sqrt {5}\right )} \text {arctanh}\left (\frac {5-2 \sqrt {5}+\sqrt {5} x}{\sqrt {10 \left (-2+\sqrt {5}\right )} \sqrt {-1+x+x^2}}\right ) \] Output:
-1/2*(4+2*5^(1/2))^(1/2)*arctan((5+2*5^(1/2)-x*5^(1/2))/(20+10*5^(1/2))^(1 /2)/(x^2+x-1)^(1/2))+1/2*(-4+2*5^(1/2))^(1/2)*arctanh((5-2*5^(1/2)+x*5^(1/ 2))/(-20+10*5^(1/2))^(1/2)/(x^2+x-1)^(1/2))
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.19 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.91 \[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=\frac {1}{2} \text {RootSum}\left [2-4 \text {$\#$1}+6 \text {$\#$1}^2+\text {$\#$1}^4\&,\frac {3 \log \left (-x+\sqrt {-1+x+x^2}-\text {$\#$1}\right )-2 \log \left (-x+\sqrt {-1+x+x^2}-\text {$\#$1}\right ) \text {$\#$1}+2 \log \left (-x+\sqrt {-1+x+x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{-1+3 \text {$\#$1}+\text {$\#$1}^3}\&\right ] \] Input:
Integrate[(1 + 2*x)/((1 + x^2)*Sqrt[-1 + x + x^2]),x]
Output:
RootSum[2 - 4*#1 + 6*#1^2 + #1^4 & , (3*Log[-x + Sqrt[-1 + x + x^2] - #1] - 2*Log[-x + Sqrt[-1 + x + x^2] - #1]*#1 + 2*Log[-x + Sqrt[-1 + x + x^2] - #1]*#1^2)/(-1 + 3*#1 + #1^3) & ]/2
Time = 0.33 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.07, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {1369, 25, 1363, 216, 220}
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 {2 x+1}{\left (x^2+1\right ) \sqrt {x^2+x-1}} \, dx\) |
\(\Big \downarrow \) 1369 |
\(\displaystyle \frac {\int \frac {\sqrt {5}-\left (5-2 \sqrt {5}\right ) x}{\left (x^2+1\right ) \sqrt {x^2+x-1}}dx}{2 \sqrt {5}}-\frac {\int -\frac {\left (5+2 \sqrt {5}\right ) x+\sqrt {5}}{\left (x^2+1\right ) \sqrt {x^2+x-1}}dx}{2 \sqrt {5}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\sqrt {5}-\left (5-2 \sqrt {5}\right ) x}{\left (x^2+1\right ) \sqrt {x^2+x-1}}dx}{2 \sqrt {5}}+\frac {\int \frac {\left (5+2 \sqrt {5}\right ) x+\sqrt {5}}{\left (x^2+1\right ) \sqrt {x^2+x-1}}dx}{2 \sqrt {5}}\) |
\(\Big \downarrow \) 1363 |
\(\displaystyle -\sqrt {5} \left (2+\sqrt {5}\right ) \int \frac {1}{\frac {\left (-\sqrt {5} x+2 \sqrt {5}+5\right )^2}{x^2+x-1}+10 \left (2+\sqrt {5}\right )}d\frac {-\sqrt {5} x+2 \sqrt {5}+5}{\sqrt {x^2+x-1}}-\sqrt {5} \left (2-\sqrt {5}\right ) \int \frac {1}{\frac {\left (\sqrt {5} x-2 \sqrt {5}+5\right )^2}{x^2+x-1}+10 \left (2-\sqrt {5}\right )}d\left (-\frac {\sqrt {5} x-2 \sqrt {5}+5}{\sqrt {x^2+x-1}}\right )\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -\sqrt {5} \left (2-\sqrt {5}\right ) \int \frac {1}{\frac {\left (\sqrt {5} x-2 \sqrt {5}+5\right )^2}{x^2+x-1}+10 \left (2-\sqrt {5}\right )}d\left (-\frac {\sqrt {5} x-2 \sqrt {5}+5}{\sqrt {x^2+x-1}}\right )-\sqrt {\frac {1}{2} \left (2+\sqrt {5}\right )} \arctan \left (\frac {-\sqrt {5} x+2 \sqrt {5}+5}{\sqrt {10 \left (2+\sqrt {5}\right )} \sqrt {x^2+x-1}}\right )\) |
\(\Big \downarrow \) 220 |
\(\displaystyle -\sqrt {\frac {1}{2} \left (2+\sqrt {5}\right )} \arctan \left (\frac {-\sqrt {5} x+2 \sqrt {5}+5}{\sqrt {10 \left (2+\sqrt {5}\right )} \sqrt {x^2+x-1}}\right )-\frac {\left (2-\sqrt {5}\right ) \text {arctanh}\left (\frac {\sqrt {5} x-2 \sqrt {5}+5}{\sqrt {10 \left (\sqrt {5}-2\right )} \sqrt {x^2+x-1}}\right )}{\sqrt {2 \left (\sqrt {5}-2\right )}}\) |
Input:
Int[(1 + 2*x)/((1 + x^2)*Sqrt[-1 + x + x^2]),x]
Output:
-(Sqrt[(2 + Sqrt[5])/2]*ArcTan[(5 + 2*Sqrt[5] - Sqrt[5]*x)/(Sqrt[10*(2 + S qrt[5])]*Sqrt[-1 + x + x^2])]) - ((2 - Sqrt[5])*ArcTanh[(5 - 2*Sqrt[5] + S qrt[5]*x)/(Sqrt[10*(-2 + Sqrt[5])]*Sqrt[-1 + x + x^2])])/Sqrt[2*(-2 + Sqrt [5])]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Int[((g_) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f _.)*(x_)^2]), x_Symbol] :> Simp[-2*a*g*h Subst[Int[1/Simp[2*a^2*g*h*c + a *e*x^2, x], x], x, Simp[a*h - g*c*x, x]/Sqrt[d + e*x + f*x^2]], x] /; FreeQ [{a, c, d, e, f, g, h}, x] && EqQ[a*h^2*e + 2*g*h*(c*d - a*f) - g^2*c*e, 0]
Int[((g_.) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + ( f_.)*(x_)^2]), x_Symbol] :> With[{q = Rt[(c*d - a*f)^2 + a*c*e^2, 2]}, Simp [1/(2*q) Int[Simp[(-a)*h*e - g*(c*d - a*f - q) + (h*(c*d - a*f + q) - g*c *e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Simp[1/(2*q) Int[ Simp[(-a)*h*e - g*(c*d - a*f + q) + (h*(c*d - a*f - q) - g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, c, d, e, f, g, h}, x] && NeQ[e^2 - 4*d*f, 0] && NegQ[(-a)*c]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 3.33 (sec) , antiderivative size = 246, normalized size of antiderivative = 2.10
method | result | size |
trager | \(\operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right ) \ln \left (-\frac {-4 \operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{3} x -2 \operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right ) x +\sqrt {x^{2}+x -1}+\operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )}{4 x \operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2}+2 x +1}\right )-\operatorname {RootOf}\left (\operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2}+\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {-4 \operatorname {RootOf}\left (\operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2}+\textit {\_Z}^{2}+1\right ) \operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2} x -2 \operatorname {RootOf}\left (\operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2}+\textit {\_Z}^{2}+1\right ) x +\sqrt {x^{2}+x -1}-\operatorname {RootOf}\left (\operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2}+\textit {\_Z}^{2}+1\right )}{4 x \operatorname {RootOf}\left (16 \textit {\_Z}^{4}+16 \textit {\_Z}^{2}+5\right )^{2}+2 x -1}\right )\) | \(246\) |
default | \(\frac {\sqrt {\frac {10 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}-\frac {5 \sqrt {5}\, \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+10+5 \sqrt {5}}\, \sqrt {5}\, \left (\arctan \left (\frac {\sqrt {5}\, \sqrt {\left (-2+\sqrt {5}\right ) \left (-\frac {\left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+4 \sqrt {5}+9\right )}\, \sqrt {20+10 \sqrt {5}}\, \left (\frac {\sqrt {5}\, \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+\frac {2 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}-\sqrt {5}+2\right ) \left (-\sqrt {5}-2+x \right ) \left (-2+\sqrt {5}\right )}{5 \left (-\sqrt {5}+2-x \right ) \left (\frac {\left (-\sqrt {5}-2+x \right )^{4}}{\left (-\sqrt {5}+2-x \right )^{4}}-\frac {18 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+1\right )}\right ) \sqrt {5}+\operatorname {arctanh}\left (\frac {\sqrt {\frac {10 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}-\frac {5 \sqrt {5}\, \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+10+5 \sqrt {5}}}{\sqrt {20+10 \sqrt {5}}}\right )+2 \arctan \left (\frac {\sqrt {5}\, \sqrt {\left (-2+\sqrt {5}\right ) \left (-\frac {\left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+4 \sqrt {5}+9\right )}\, \sqrt {20+10 \sqrt {5}}\, \left (\frac {\sqrt {5}\, \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+\frac {2 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}-\sqrt {5}+2\right ) \left (-\sqrt {5}-2+x \right ) \left (-2+\sqrt {5}\right )}{5 \left (-\sqrt {5}+2-x \right ) \left (\frac {\left (-\sqrt {5}-2+x \right )^{4}}{\left (-\sqrt {5}+2-x \right )^{4}}-\frac {18 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}+1\right )}\right )\right )}{\sqrt {-\frac {5 \left (\frac {\sqrt {5}\, \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}-\frac {2 \left (-\sqrt {5}-2+x \right )^{2}}{\left (-\sqrt {5}+2-x \right )^{2}}-\sqrt {5}-2\right )}{\left (1+\frac {-\sqrt {5}-2+x}{-\sqrt {5}+2-x}\right )^{2}}}\, \left (1+\frac {-\sqrt {5}-2+x}{-\sqrt {5}+2-x}\right ) \sqrt {20+10 \sqrt {5}}}\) | \(637\) |
Input:
int((1+2*x)/(x^2+1)/(x^2+x-1)^(1/2),x,method=_RETURNVERBOSE)
Output:
RootOf(16*_Z^4+16*_Z^2+5)*ln(-(-4*RootOf(16*_Z^4+16*_Z^2+5)^3*x-2*RootOf(1 6*_Z^4+16*_Z^2+5)*x+(x^2+x-1)^(1/2)+RootOf(16*_Z^4+16*_Z^2+5))/(4*x*RootOf (16*_Z^4+16*_Z^2+5)^2+2*x+1))-RootOf(RootOf(16*_Z^4+16*_Z^2+5)^2+_Z^2+1)*l n(-(-4*RootOf(RootOf(16*_Z^4+16*_Z^2+5)^2+_Z^2+1)*RootOf(16*_Z^4+16*_Z^2+5 )^2*x-2*RootOf(RootOf(16*_Z^4+16*_Z^2+5)^2+_Z^2+1)*x+(x^2+x-1)^(1/2)-RootO f(RootOf(16*_Z^4+16*_Z^2+5)^2+_Z^2+1))/(4*x*RootOf(16*_Z^4+16*_Z^2+5)^2+2* x-1))
Leaf count of result is larger than twice the leaf count of optimal. 281 vs. \(2 (86) = 172\).
Time = 0.09 (sec) , antiderivative size = 281, normalized size of antiderivative = 2.40 \[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=\sqrt {\frac {1}{2} \, \sqrt {5} + 1} \arctan \left (-\frac {2}{5} \, {\left (\sqrt {5} {\left (x - 2\right )} + {\left (\sqrt {5} {\left (2 \, x + 1\right )} - 2 \, \sqrt {5} \sqrt {x^{2} + x - 1}\right )} \sqrt {\frac {1}{2} \, \sqrt {5} - 1} - \sqrt {5} \sqrt {x^{2} + x - 1} + 5\right )} \sqrt {\frac {1}{2} \, \sqrt {5} + 1}\right ) - \sqrt {\frac {1}{2} \, \sqrt {5} + 1} \arctan \left (\frac {2}{5} \, {\left (\sqrt {5} {\left (x - 2\right )} - {\left (\sqrt {5} {\left (2 \, x + 1\right )} - 2 \, \sqrt {5} \sqrt {x^{2} + x - 1}\right )} \sqrt {\frac {1}{2} \, \sqrt {5} - 1} - \sqrt {5} \sqrt {x^{2} + x - 1} + 5\right )} \sqrt {\frac {1}{2} \, \sqrt {5} + 1}\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2} \, \sqrt {5} - 1} \log \left (2 \, x^{2} - 2 \, \sqrt {x^{2} + x - 1} x + 2 \, {\left (x - \sqrt {5} - \sqrt {x^{2} + x - 1} - 2\right )} \sqrt {\frac {1}{2} \, \sqrt {5} - 1} + x + \sqrt {5}\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2} \, \sqrt {5} - 1} \log \left (2 \, x^{2} - 2 \, \sqrt {x^{2} + x - 1} x - 2 \, {\left (x - \sqrt {5} - \sqrt {x^{2} + x - 1} - 2\right )} \sqrt {\frac {1}{2} \, \sqrt {5} - 1} + x + \sqrt {5}\right ) \] Input:
integrate((1+2*x)/(x^2+1)/(x^2+x-1)^(1/2),x, algorithm="fricas")
Output:
sqrt(1/2*sqrt(5) + 1)*arctan(-2/5*(sqrt(5)*(x - 2) + (sqrt(5)*(2*x + 1) - 2*sqrt(5)*sqrt(x^2 + x - 1))*sqrt(1/2*sqrt(5) - 1) - sqrt(5)*sqrt(x^2 + x - 1) + 5)*sqrt(1/2*sqrt(5) + 1)) - sqrt(1/2*sqrt(5) + 1)*arctan(2/5*(sqrt( 5)*(x - 2) - (sqrt(5)*(2*x + 1) - 2*sqrt(5)*sqrt(x^2 + x - 1))*sqrt(1/2*sq rt(5) - 1) - sqrt(5)*sqrt(x^2 + x - 1) + 5)*sqrt(1/2*sqrt(5) + 1)) - 1/2*s qrt(1/2*sqrt(5) - 1)*log(2*x^2 - 2*sqrt(x^2 + x - 1)*x + 2*(x - sqrt(5) - sqrt(x^2 + x - 1) - 2)*sqrt(1/2*sqrt(5) - 1) + x + sqrt(5)) + 1/2*sqrt(1/2 *sqrt(5) - 1)*log(2*x^2 - 2*sqrt(x^2 + x - 1)*x - 2*(x - sqrt(5) - sqrt(x^ 2 + x - 1) - 2)*sqrt(1/2*sqrt(5) - 1) + x + sqrt(5))
\[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=\int \frac {2 x + 1}{\left (x^{2} + 1\right ) \sqrt {x^{2} + x - 1}}\, dx \] Input:
integrate((1+2*x)/(x**2+1)/(x**2+x-1)**(1/2),x)
Output:
Integral((2*x + 1)/((x**2 + 1)*sqrt(x**2 + x - 1)), x)
\[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=\int { \frac {2 \, x + 1}{\sqrt {x^{2} + x - 1} {\left (x^{2} + 1\right )}} \,d x } \] Input:
integrate((1+2*x)/(x^2+1)/(x^2+x-1)^(1/2),x, algorithm="maxima")
Output:
integrate((2*x + 1)/(sqrt(x^2 + x - 1)*(x^2 + 1)), x)
Leaf count of result is larger than twice the leaf count of optimal. 457 vs. \(2 (86) = 172\).
Time = 0.17 (sec) , antiderivative size = 457, normalized size of antiderivative = 3.91 \[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=\frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 4} \log \left (16 \, {\left (15 \, \sqrt {5} {\left (x - \sqrt {x^{2} + x - 1}\right )} + 33 \, x + 5 \, \sqrt {5} - 33 \, \sqrt {x^{2} + x - 1} + 2 \, \sqrt {5 \, \sqrt {5} + 11} + 11\right )}^{2} + 16 \, {\left (5 \, \sqrt {5} {\left (x - \sqrt {x^{2} + x - 1}\right )} + 11 \, x - 5 \, \sqrt {5} \sqrt {5 \, \sqrt {5} + 11} - 15 \, \sqrt {5} - 11 \, \sqrt {x^{2} + x - 1} - 11 \, \sqrt {5 \, \sqrt {5} + 11} - 33\right )}^{2}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 4} \log \left (16 \, {\left (15 \, \sqrt {5} {\left (x - \sqrt {x^{2} + x - 1}\right )} + 33 \, x + 5 \, \sqrt {5} - 33 \, \sqrt {x^{2} + x - 1} - 2 \, \sqrt {5 \, \sqrt {5} + 11} + 11\right )}^{2} + 16 \, {\left (5 \, \sqrt {5} {\left (x - \sqrt {x^{2} + x - 1}\right )} + 11 \, x + 5 \, \sqrt {5} \sqrt {5 \, \sqrt {5} + 11} - 15 \, \sqrt {5} - 11 \, \sqrt {x^{2} + x - 1} + 11 \, \sqrt {5 \, \sqrt {5} + 11} - 33\right )}^{2}\right ) + \frac {\sqrt {2 \, \sqrt {5} - 4} {\left (\arctan \left (3\right ) + \arctan \left (\frac {1}{10} \, {\left (x - \sqrt {x^{2} + x - 1}\right )} {\left (\sqrt {5} \sqrt {5 \, \sqrt {5} + 11} + 4 \, \sqrt {5} - 5 \, \sqrt {5 \, \sqrt {5} + 11}\right )} - \frac {7}{10} \, \sqrt {5} \sqrt {5 \, \sqrt {5} + 11} + \frac {1}{5} \, \sqrt {5} + \frac {3}{2} \, \sqrt {5 \, \sqrt {5} + 11}\right )\right )}}{2 \, {\left (\sqrt {5} - 2\right )}} - \frac {\sqrt {2 \, \sqrt {5} - 4} {\left (\arctan \left (3\right ) + \arctan \left (-\frac {1}{10} \, {\left (x - \sqrt {x^{2} + x - 1}\right )} {\left (\sqrt {5} \sqrt {5 \, \sqrt {5} + 11} - 4 \, \sqrt {5} - 5 \, \sqrt {5 \, \sqrt {5} + 11}\right )} + \frac {7}{10} \, \sqrt {5} \sqrt {5 \, \sqrt {5} + 11} + \frac {1}{5} \, \sqrt {5} - \frac {3}{2} \, \sqrt {5 \, \sqrt {5} + 11}\right )\right )}}{2 \, {\left (\sqrt {5} - 2\right )}} \] Input:
integrate((1+2*x)/(x^2+1)/(x^2+x-1)^(1/2),x, algorithm="giac")
Output:
1/4*sqrt(2*sqrt(5) - 4)*log(16*(15*sqrt(5)*(x - sqrt(x^2 + x - 1)) + 33*x + 5*sqrt(5) - 33*sqrt(x^2 + x - 1) + 2*sqrt(5*sqrt(5) + 11) + 11)^2 + 16*( 5*sqrt(5)*(x - sqrt(x^2 + x - 1)) + 11*x - 5*sqrt(5)*sqrt(5*sqrt(5) + 11) - 15*sqrt(5) - 11*sqrt(x^2 + x - 1) - 11*sqrt(5*sqrt(5) + 11) - 33)^2) - 1 /4*sqrt(2*sqrt(5) - 4)*log(16*(15*sqrt(5)*(x - sqrt(x^2 + x - 1)) + 33*x + 5*sqrt(5) - 33*sqrt(x^2 + x - 1) - 2*sqrt(5*sqrt(5) + 11) + 11)^2 + 16*(5 *sqrt(5)*(x - sqrt(x^2 + x - 1)) + 11*x + 5*sqrt(5)*sqrt(5*sqrt(5) + 11) - 15*sqrt(5) - 11*sqrt(x^2 + x - 1) + 11*sqrt(5*sqrt(5) + 11) - 33)^2) + 1/ 2*sqrt(2*sqrt(5) - 4)*(arctan(3) + arctan(1/10*(x - sqrt(x^2 + x - 1))*(sq rt(5)*sqrt(5*sqrt(5) + 11) + 4*sqrt(5) - 5*sqrt(5*sqrt(5) + 11)) - 7/10*sq rt(5)*sqrt(5*sqrt(5) + 11) + 1/5*sqrt(5) + 3/2*sqrt(5*sqrt(5) + 11)))/(sqr t(5) - 2) - 1/2*sqrt(2*sqrt(5) - 4)*(arctan(3) + arctan(-1/10*(x - sqrt(x^ 2 + x - 1))*(sqrt(5)*sqrt(5*sqrt(5) + 11) - 4*sqrt(5) - 5*sqrt(5*sqrt(5) + 11)) + 7/10*sqrt(5)*sqrt(5*sqrt(5) + 11) + 1/5*sqrt(5) - 3/2*sqrt(5*sqrt( 5) + 11)))/(sqrt(5) - 2)
Timed out. \[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=\int \frac {2\,x+1}{\left (x^2+1\right )\,\sqrt {x^2+x-1}} \,d x \] Input:
int((2*x + 1)/((x^2 + 1)*(x + x^2 - 1)^(1/2)),x)
Output:
int((2*x + 1)/((x^2 + 1)*(x + x^2 - 1)^(1/2)), x)
\[ \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {-1+x+x^2}} \, dx=2 \left (\int \frac {x}{\sqrt {x^{2}+x -1}\, x^{2}+\sqrt {x^{2}+x -1}}d x \right )+\int \frac {1}{\sqrt {x^{2}+x -1}\, x^{2}+\sqrt {x^{2}+x -1}}d x \] Input:
int((1+2*x)/(x^2+1)/(x^2+x-1)^(1/2),x)
Output:
2*int(x/(sqrt(x**2 + x - 1)*x**2 + sqrt(x**2 + x - 1)),x) + int(1/(sqrt(x* *2 + x - 1)*x**2 + sqrt(x**2 + x - 1)),x)