3.4 \(\int \log (1+x \sqrt {1+x^2}) \, dx\)

Optimal. Leaf size=97 \[ x \log \left (\sqrt {x^2+1} x+1\right )+\sqrt {2 \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\sqrt {5}-2} \left (\sqrt {x^2+1}+x\right )\right )-\sqrt {2 \left (\sqrt {5}-1\right )} \tanh ^{-1}\left (\sqrt {2+\sqrt {5}} \left (\sqrt {x^2+1}+x\right )\right )-2 x \]

[Out]

-2*x+x*ln(1+x*(x^2+1)^(1/2))-arctanh((x+(x^2+1)^(1/2))*(2+5^(1/2))^(1/2))*(-2+2*5^(1/2))^(1/2)+arctan((x+(x^2+
1)^(1/2))*(-2+5^(1/2))^(1/2))*(2+2*5^(1/2))^(1/2)

________________________________________________________________________________________

Rubi [B]  time = 0.67, antiderivative size = 332, normalized size of antiderivative = 3.42, number of steps used = 32, number of rules used = 13, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.929, Rules used = {2548, 6742, 261, 1130, 203, 207, 1251, 824, 707, 1093, 1166, 1247, 699} \[ x \log \left (\sqrt {x^2+1} x+1\right )+\sqrt {\frac {2}{5} \left (\sqrt {5}-1\right )} \tan ^{-1}\left (\sqrt {\frac {2}{\sqrt {5}-1}} \sqrt {x^2+1}\right )+\sqrt {\frac {2}{5 \left (\sqrt {5}-1\right )}} \tan ^{-1}\left (\sqrt {\frac {2}{\sqrt {5}-1}} \sqrt {x^2+1}\right )-\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x^2+1}\right )+\sqrt {\frac {2}{5 \left (1+\sqrt {5}\right )}} \tanh ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x^2+1}\right )-2 x+2 \sqrt {\frac {1}{5} \left (2+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (\sqrt {5}-1\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{\sqrt {5}-1}} x\right )+2 \sqrt {\frac {1}{5} \left (\sqrt {5}-2\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{\sqrt {5}-1}} x\right ) \]

Warning: Unable to verify antiderivative.

[In]

Int[Log[1 + x*Sqrt[1 + x^2]],x]

[Out]

-2*x - Sqrt[(1 + Sqrt[5])/10]*ArcTan[Sqrt[2/(1 + Sqrt[5])]*x] + 2*Sqrt[(2 + Sqrt[5])/5]*ArcTan[Sqrt[2/(1 + Sqr
t[5])]*x] + Sqrt[2/(5*(-1 + Sqrt[5]))]*ArcTan[Sqrt[2/(-1 + Sqrt[5])]*Sqrt[1 + x^2]] + Sqrt[(2*(-1 + Sqrt[5]))/
5]*ArcTan[Sqrt[2/(-1 + Sqrt[5])]*Sqrt[1 + x^2]] + 2*Sqrt[(-2 + Sqrt[5])/5]*ArcTanh[Sqrt[2/(-1 + Sqrt[5])]*x] +
 Sqrt[(-1 + Sqrt[5])/10]*ArcTanh[Sqrt[2/(-1 + Sqrt[5])]*x] + Sqrt[2/(5*(1 + Sqrt[5]))]*ArcTanh[Sqrt[2/(1 + Sqr
t[5])]*Sqrt[1 + x^2]] - Sqrt[(2*(1 + Sqrt[5]))/5]*ArcTanh[Sqrt[2/(1 + Sqrt[5])]*Sqrt[1 + x^2]] + x*Log[1 + x*S
qrt[1 + x^2]]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 261

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 699

Int[Sqrt[(d_.) + (e_.)*(x_)]/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2
- b*d*e + a*e^2 - (2*c*d - b*e)*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^
2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]

Rule 707

Int[1/(Sqrt[(d_.) + (e_.)*(x_)]*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[2*e, Subst[Int[1/(c*d^
2 - b*d*e + a*e^2 - (2*c*d - b*e)*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[
b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]

Rule 824

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(g
*(d + e*x)^m)/(c*m), x] + Dist[1/c, Int[((d + e*x)^(m - 1)*Simp[c*d*f - a*e*g + (g*c*d - b*e*g + c*e*f)*x, x])
/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*
e^2, 0] && FractionQ[m] && GtQ[m, 0]

Rule 1093

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 1247

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 2548

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/u, x], x] /; InverseFunctionFr
eeQ[u, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \log \left (1+x \sqrt {1+x^2}\right ) \, dx &=x \log \left (1+x \sqrt {1+x^2}\right )-\int \frac {x \left (1+2 x^2\right )}{x+x^3+\sqrt {1+x^2}} \, dx\\ &=x \log \left (1+x \sqrt {1+x^2}\right )-\int \left (\frac {x}{x+x^3+\sqrt {1+x^2}}+\frac {2 x^3}{x+x^3+\sqrt {1+x^2}}\right ) \, dx\\ &=x \log \left (1+x \sqrt {1+x^2}\right )-2 \int \frac {x^3}{x+x^3+\sqrt {1+x^2}} \, dx-\int \frac {x}{x+x^3+\sqrt {1+x^2}} \, dx\\ &=x \log \left (1+x \sqrt {1+x^2}\right )-2 \int \left (1-\frac {x}{\sqrt {1+x^2}}+\frac {1-x^2}{-1+x^2+x^4}-\frac {x \sqrt {1+x^2}}{-1+x^2+x^4}+\frac {x^3 \sqrt {1+x^2}}{-1+x^2+x^4}\right ) \, dx-\int \left (\frac {x}{\sqrt {1+x^2}}+\frac {x^2}{-1+x^2+x^4}-\frac {x^3 \sqrt {1+x^2}}{-1+x^2+x^4}\right ) \, dx\\ &=-2 x+x \log \left (1+x \sqrt {1+x^2}\right )+2 \int \frac {x}{\sqrt {1+x^2}} \, dx-2 \int \frac {1-x^2}{-1+x^2+x^4} \, dx+2 \int \frac {x \sqrt {1+x^2}}{-1+x^2+x^4} \, dx-2 \int \frac {x^3 \sqrt {1+x^2}}{-1+x^2+x^4} \, dx-\int \frac {x}{\sqrt {1+x^2}} \, dx-\int \frac {x^2}{-1+x^2+x^4} \, dx+\int \frac {x^3 \sqrt {1+x^2}}{-1+x^2+x^4} \, dx\\ &=-2 x+\sqrt {1+x^2}+x \log \left (1+x \sqrt {1+x^2}\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {x \sqrt {1+x}}{-1+x+x^2} \, dx,x,x^2\right )+\frac {1}{10} \left (-5+\sqrt {5}\right ) \int \frac {1}{\frac {1}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx-\frac {1}{10} \left (5+\sqrt {5}\right ) \int \frac {1}{\frac {1}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx-\frac {1}{5} \left (-5+3 \sqrt {5}\right ) \int \frac {1}{\frac {1}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx+\frac {1}{5} \left (5+3 \sqrt {5}\right ) \int \frac {1}{\frac {1}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx+\operatorname {Subst}\left (\int \frac {\sqrt {1+x}}{-1+x+x^2} \, dx,x,x^2\right )-\operatorname {Subst}\left (\int \frac {x \sqrt {1+x}}{-1+x+x^2} \, dx,x,x^2\right )\\ &=-2 x-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+2 \sqrt {\frac {1}{5} \left (2+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+2 \sqrt {\frac {1}{5} \left (-2+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+x \log \left (1+x \sqrt {1+x^2}\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\sqrt {1+x} \left (-1+x+x^2\right )} \, dx,x,x^2\right )+2 \operatorname {Subst}\left (\int \frac {x^2}{-1-x^2+x^4} \, dx,x,\sqrt {1+x^2}\right )-\operatorname {Subst}\left (\int \frac {1}{\sqrt {1+x} \left (-1+x+x^2\right )} \, dx,x,x^2\right )\\ &=-2 x-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+2 \sqrt {\frac {1}{5} \left (2+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+2 \sqrt {\frac {1}{5} \left (-2+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+x \log \left (1+x \sqrt {1+x^2}\right )-2 \operatorname {Subst}\left (\int \frac {1}{-1-x^2+x^4} \, dx,x,\sqrt {1+x^2}\right )+\frac {1}{5} \left (5-\sqrt {5}\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+x^2}\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+x^2}\right )+\operatorname {Subst}\left (\int \frac {1}{-1-x^2+x^4} \, dx,x,\sqrt {1+x^2}\right )\\ &=-2 x-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+2 \sqrt {\frac {1}{5} \left (2+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} \sqrt {1+x^2}\right )+2 \sqrt {\frac {1}{5} \left (-2+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )-\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {1+x^2}\right )+x \log \left (1+x \sqrt {1+x^2}\right )+\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+x^2}\right )}{\sqrt {5}}-\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+x^2}\right )}{\sqrt {5}}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+x^2}\right )}{\sqrt {5}}+\frac {2 \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+x^2}\right )}{\sqrt {5}}\\ &=-2 x-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+2 \sqrt {\frac {1}{5} \left (2+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )+\sqrt {\frac {2}{5 \left (-1+\sqrt {5}\right )}} \tan ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} \sqrt {1+x^2}\right )+\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} \sqrt {1+x^2}\right )+2 \sqrt {\frac {1}{5} \left (-2+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )+\sqrt {\frac {2}{5 \left (1+\sqrt {5}\right )}} \tanh ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {1+x^2}\right )-\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {1+x^2}\right )+x \log \left (1+x \sqrt {1+x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.40, size = 194, normalized size = 2.00 \[ x \log \left (\sqrt {x^2+1} x+1\right )-\frac {\sqrt {2 \left (\sqrt {5}-1\right )} \tan ^{-1}\left (\sqrt {\frac {2}{\sqrt {5}-1}} \sqrt {x^2+1}\right )}{1-\sqrt {5}}-\sqrt {\frac {2}{1+\sqrt {5}}} \tanh ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x^2+1}\right )-2 x+\frac {\left (5+\sqrt {5}\right ) \tan ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )}{\sqrt {10 \left (1+\sqrt {5}\right )}}-\frac {\left (\sqrt {5}-5\right ) \tanh ^{-1}\left (\sqrt {\frac {2}{\sqrt {5}-1}} x\right )}{\sqrt {10 \left (\sqrt {5}-1\right )}} \]

Antiderivative was successfully verified.

[In]

Integrate[Log[1 + x*Sqrt[1 + x^2]],x]

[Out]

-2*x + ((5 + Sqrt[5])*ArcTan[Sqrt[2/(1 + Sqrt[5])]*x])/Sqrt[10*(1 + Sqrt[5])] - (Sqrt[2*(-1 + Sqrt[5])]*ArcTan
[Sqrt[2/(-1 + Sqrt[5])]*Sqrt[1 + x^2]])/(1 - Sqrt[5]) - ((-5 + Sqrt[5])*ArcTanh[Sqrt[2/(-1 + Sqrt[5])]*x])/Sqr
t[10*(-1 + Sqrt[5])] - Sqrt[2/(1 + Sqrt[5])]*ArcTanh[Sqrt[2/(1 + Sqrt[5])]*Sqrt[1 + x^2]] + x*Log[1 + x*Sqrt[1
 + x^2]]

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 402, normalized size = 4.14 \[ -\sqrt {2} \sqrt {\sqrt {5} + 1} \arctan \left (\frac {1}{4} \, \sqrt {2} \sqrt {4 \, x^{4} + 4 \, x^{2} + \sqrt {5} {\left (2 \, x^{2} + 1\right )} - 2 \, {\left (2 \, x^{3} + \sqrt {5} x + x\right )} \sqrt {x^{2} + 1} + 1} {\left (\sqrt {2} x + \sqrt {2} \sqrt {x^{2} + 1}\right )} \sqrt {\sqrt {5} + 1} - \frac {1}{2} \, \sqrt {2} \sqrt {x^{2} + 1} \sqrt {\sqrt {5} + 1}\right ) - \sqrt {2} \sqrt {\sqrt {5} + 1} \arctan \left (\frac {1}{8} \, \sqrt {4 \, x^{2} + 2 \, \sqrt {5} + 2} {\left (\sqrt {5} \sqrt {2} - \sqrt {2}\right )} \sqrt {\sqrt {5} + 1} - \frac {1}{4} \, {\left (\sqrt {5} \sqrt {2} x - \sqrt {2} x\right )} \sqrt {\sqrt {5} + 1}\right ) + \frac {1}{4} \, \sqrt {2} \sqrt {\sqrt {5} - 1} \log \left (4 \, x^{2} - 4 \, \sqrt {x^{2} + 1} x + {\left (\sqrt {5} \sqrt {2} x - \sqrt {x^{2} + 1} {\left (\sqrt {5} \sqrt {2} + \sqrt {2}\right )} + \sqrt {2} x\right )} \sqrt {\sqrt {5} - 1} + 4\right ) - \frac {1}{4} \, \sqrt {2} \sqrt {\sqrt {5} - 1} \log \left (4 \, x^{2} - 4 \, \sqrt {x^{2} + 1} x - {\left (\sqrt {5} \sqrt {2} x - \sqrt {x^{2} + 1} {\left (\sqrt {5} \sqrt {2} + \sqrt {2}\right )} + \sqrt {2} x\right )} \sqrt {\sqrt {5} - 1} + 4\right ) + x \log \left (\sqrt {x^{2} + 1} x + 1\right ) + \frac {1}{4} \, \sqrt {2} \sqrt {\sqrt {5} - 1} \log \left (2 \, x + \sqrt {2} \sqrt {\sqrt {5} - 1}\right ) - \frac {1}{4} \, \sqrt {2} \sqrt {\sqrt {5} - 1} \log \left (2 \, x - \sqrt {2} \sqrt {\sqrt {5} - 1}\right ) - 2 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+x*(x^2+1)^(1/2)),x, algorithm="fricas")

[Out]

-sqrt(2)*sqrt(sqrt(5) + 1)*arctan(1/4*sqrt(2)*sqrt(4*x^4 + 4*x^2 + sqrt(5)*(2*x^2 + 1) - 2*(2*x^3 + sqrt(5)*x
+ x)*sqrt(x^2 + 1) + 1)*(sqrt(2)*x + sqrt(2)*sqrt(x^2 + 1))*sqrt(sqrt(5) + 1) - 1/2*sqrt(2)*sqrt(x^2 + 1)*sqrt
(sqrt(5) + 1)) - sqrt(2)*sqrt(sqrt(5) + 1)*arctan(1/8*sqrt(4*x^2 + 2*sqrt(5) + 2)*(sqrt(5)*sqrt(2) - sqrt(2))*
sqrt(sqrt(5) + 1) - 1/4*(sqrt(5)*sqrt(2)*x - sqrt(2)*x)*sqrt(sqrt(5) + 1)) + 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log
(4*x^2 - 4*sqrt(x^2 + 1)*x + (sqrt(5)*sqrt(2)*x - sqrt(x^2 + 1)*(sqrt(5)*sqrt(2) + sqrt(2)) + sqrt(2)*x)*sqrt(
sqrt(5) - 1) + 4) - 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log(4*x^2 - 4*sqrt(x^2 + 1)*x - (sqrt(5)*sqrt(2)*x - sqrt(x^
2 + 1)*(sqrt(5)*sqrt(2) + sqrt(2)) + sqrt(2)*x)*sqrt(sqrt(5) - 1) + 4) + x*log(sqrt(x^2 + 1)*x + 1) + 1/4*sqrt
(2)*sqrt(sqrt(5) - 1)*log(2*x + sqrt(2)*sqrt(sqrt(5) - 1)) - 1/4*sqrt(2)*sqrt(sqrt(5) - 1)*log(2*x - sqrt(2)*s
qrt(sqrt(5) - 1)) - 2*x

________________________________________________________________________________________

giac [B]  time = 1.25, size = 235, normalized size = 2.42 \[ x \log \left (\sqrt {x^{2} + 1} x + 1\right ) + \frac {1}{2} \, \sqrt {2 \, \sqrt {5} + 2} \arctan \left (-\frac {x - \sqrt {x^{2} + 1} + \frac {1}{x - \sqrt {x^{2} + 1}}}{\sqrt {2 \, \sqrt {5} - 2}}\right ) + \frac {1}{2} \, \sqrt {2 \, \sqrt {5} + 2} \arctan \left (\frac {x}{\sqrt {\frac {1}{2} \, \sqrt {5} + \frac {1}{2}}}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 2} \log \left (-x + \sqrt {x^{2} + 1} + \sqrt {2 \, \sqrt {5} + 2} - \frac {1}{x - \sqrt {x^{2} + 1}}\right ) + \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 2} \log \left ({\left | x + \sqrt {\frac {1}{2} \, \sqrt {5} - \frac {1}{2}} \right |}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 2} \log \left ({\left | x - \sqrt {\frac {1}{2} \, \sqrt {5} - \frac {1}{2}} \right |}\right ) + \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 2} \log \left ({\left | -x + \sqrt {x^{2} + 1} - \sqrt {2 \, \sqrt {5} + 2} - \frac {1}{x - \sqrt {x^{2} + 1}} \right |}\right ) - 2 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+x*(x^2+1)^(1/2)),x, algorithm="giac")

[Out]

x*log(sqrt(x^2 + 1)*x + 1) + 1/2*sqrt(2*sqrt(5) + 2)*arctan(-(x - sqrt(x^2 + 1) + 1/(x - sqrt(x^2 + 1)))/sqrt(
2*sqrt(5) - 2)) + 1/2*sqrt(2*sqrt(5) + 2)*arctan(x/sqrt(1/2*sqrt(5) + 1/2)) - 1/4*sqrt(2*sqrt(5) - 2)*log(-x +
 sqrt(x^2 + 1) + sqrt(2*sqrt(5) + 2) - 1/(x - sqrt(x^2 + 1))) + 1/4*sqrt(2*sqrt(5) - 2)*log(abs(x + sqrt(1/2*s
qrt(5) - 1/2))) - 1/4*sqrt(2*sqrt(5) - 2)*log(abs(x - sqrt(1/2*sqrt(5) - 1/2))) + 1/4*sqrt(2*sqrt(5) - 2)*log(
abs(-x + sqrt(x^2 + 1) - sqrt(2*sqrt(5) + 2) - 1/(x - sqrt(x^2 + 1)))) - 2*x

________________________________________________________________________________________

maple [B]  time = 0.14, size = 426, normalized size = 4.39 \[ x \ln \left (\sqrt {x^{2}+1}\, x +1\right )-2 x +\frac {\arctanh \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{2 \sqrt {-2+\sqrt {5}}}-\frac {3 \sqrt {5}\, \arctanh \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{10 \sqrt {-2+\sqrt {5}}}-\frac {2 \sqrt {-2+\sqrt {5}}\, \sqrt {5}\, \arctanh \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{5}-\frac {\arctanh \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{2 \sqrt {2+\sqrt {5}}}-\frac {\sqrt {5}\, \arctanh \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{2 \sqrt {2+\sqrt {5}}}-\frac {\arctanh \left (\frac {2 x}{\sqrt {-2+2 \sqrt {5}}}\right )}{\sqrt {-2+2 \sqrt {5}}}+\frac {\sqrt {5}\, \arctanh \left (\frac {2 x}{\sqrt {-2+2 \sqrt {5}}}\right )}{\sqrt {-2+2 \sqrt {5}}}+\frac {\arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{2 \sqrt {-2+\sqrt {5}}}-\frac {\sqrt {5}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {-2+\sqrt {5}}}\right )}{2 \sqrt {-2+\sqrt {5}}}-\frac {3 \sqrt {5}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{10 \sqrt {2+\sqrt {5}}}-\frac {\arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{2 \sqrt {2+\sqrt {5}}}+\frac {2 \sqrt {5}\, \sqrt {2+\sqrt {5}}\, \arctan \left (\frac {-x +\sqrt {x^{2}+1}}{\sqrt {2+\sqrt {5}}}\right )}{5}+\frac {\arctan \left (\frac {2 x}{\sqrt {2+2 \sqrt {5}}}\right )}{\sqrt {2+2 \sqrt {5}}}+\frac {\sqrt {5}\, \arctan \left (\frac {2 x}{\sqrt {2+2 \sqrt {5}}}\right )}{\sqrt {2+2 \sqrt {5}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(1+x*(x^2+1)^(1/2)),x)

[Out]

x*ln(1+x*(x^2+1)^(1/2))+1/(2+2*5^(1/2))^(1/2)*arctan(2/(2+2*5^(1/2))^(1/2)*x)+5^(1/2)/(2+2*5^(1/2))^(1/2)*arct
an(2/(2+2*5^(1/2))^(1/2)*x)-1/(-2+2*5^(1/2))^(1/2)*arctanh(2/(-2+2*5^(1/2))^(1/2)*x)+5^(1/2)/(-2+2*5^(1/2))^(1
/2)*arctanh(2/(-2+2*5^(1/2))^(1/2)*x)-2*x-3/10*5^(1/2)/(2+5^(1/2))^(1/2)*arctan(((x^2+1)^(1/2)-x)/(2+5^(1/2))^
(1/2))-1/2/(2+5^(1/2))^(1/2)*arctan(((x^2+1)^(1/2)-x)/(2+5^(1/2))^(1/2))+1/2/(-2+5^(1/2))^(1/2)*arctanh(((x^2+
1)^(1/2)-x)/(-2+5^(1/2))^(1/2))-3/10*5^(1/2)/(-2+5^(1/2))^(1/2)*arctanh(((x^2+1)^(1/2)-x)/(-2+5^(1/2))^(1/2))-
1/2/(2+5^(1/2))^(1/2)*arctanh(((x^2+1)^(1/2)-x)/(2+5^(1/2))^(1/2))-1/2*5^(1/2)/(2+5^(1/2))^(1/2)*arctanh(((x^2
+1)^(1/2)-x)/(2+5^(1/2))^(1/2))+1/2/(-2+5^(1/2))^(1/2)*arctan(((x^2+1)^(1/2)-x)/(-2+5^(1/2))^(1/2))-1/2*5^(1/2
)/(-2+5^(1/2))^(1/2)*arctan(((x^2+1)^(1/2)-x)/(-2+5^(1/2))^(1/2))+2/5*5^(1/2)*(2+5^(1/2))^(1/2)*arctan(((x^2+1
)^(1/2)-x)/(2+5^(1/2))^(1/2))-2/5*(-2+5^(1/2))^(1/2)*5^(1/2)*arctanh(((x^2+1)^(1/2)-x)/(-2+5^(1/2))^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ x \log \left (\sqrt {x^{2} + 1} x + 1\right ) - 2 \, x + \arctan \relax (x) + \int \frac {2 \, x^{2} + 1}{x^{2} + {\left (x^{3} + x\right )} \sqrt {x^{2} + 1} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+x*(x^2+1)^(1/2)),x, algorithm="maxima")

[Out]

x*log(sqrt(x^2 + 1)*x + 1) - 2*x + arctan(x) + integrate((2*x^2 + 1)/(x^2 + (x^3 + x)*sqrt(x^2 + 1) + 1), x)

________________________________________________________________________________________

mupad [B]  time = 1.57, size = 666, normalized size = 6.87 \[ x\,\ln \left (x\,\sqrt {x^2+1}+1\right )-2\,x+\frac {\ln \left (x-\frac {\sqrt {2}\,\sqrt {\sqrt {5}-1}}{2}\right )\,\left (\frac {\sqrt {5}}{2}-\frac {5}{2}\right )}{2\,\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}}-\frac {\ln \left (x+\frac {\sqrt {2}\,\sqrt {\sqrt {5}-1}}{2}\right )\,\left (\frac {\sqrt {5}}{2}-\frac {5}{2}\right )}{2\,\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}}-\frac {\ln \left (x-\frac {\sqrt {2}\,\sqrt {-\sqrt {5}-1}}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {5}{2}\right )}{2\,\sqrt {-\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}}+\frac {\ln \left (x+\frac {\sqrt {2}\,\sqrt {-\sqrt {5}-1}}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {5}{2}\right )}{2\,\sqrt {-\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}}+\frac {\left (\ln \left (x-\frac {\sqrt {2}\,\sqrt {\sqrt {5}-1}}{2}\right )-\ln \left (\frac {\sqrt {2}\,x\,\sqrt {\sqrt {5}-1}}{2}+\frac {\sqrt {2}\,\sqrt {x^2+1}\,\sqrt {\sqrt {5}+1}}{2}+1\right )\right )\,\left (\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}+2\,{\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )}{\left (2\,\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )\,\sqrt {\frac {\sqrt {5}}{2}+\frac {1}{2}}}+\frac {\left (\ln \left (x+\frac {\sqrt {2}\,\sqrt {\sqrt {5}-1}}{2}\right )-\ln \left (\frac {\sqrt {2}\,\sqrt {x^2+1}\,\sqrt {\sqrt {5}+1}}{2}-\frac {\sqrt {2}\,x\,\sqrt {\sqrt {5}-1}}{2}+1\right )\right )\,\left (\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}+2\,{\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )}{\left (2\,\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )\,\sqrt {\frac {\sqrt {5}}{2}+\frac {1}{2}}}-\frac {\left (\ln \left (\frac {\sqrt {2}\,\sqrt {x^2+1}\,\sqrt {1-\sqrt {5}}}{2}-\frac {\sqrt {2}\,x\,\sqrt {-\sqrt {5}-1}}{2}+1\right )-\ln \left (x+\frac {\sqrt {2}\,\sqrt {-\sqrt {5}-1}}{2}\right )\right )\,\left (\sqrt {-\frac {\sqrt {5}}{2}-\frac {1}{2}}+2\,{\left (-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )}{\left (2\,\sqrt {-\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )\,\sqrt {\frac {1}{2}-\frac {\sqrt {5}}{2}}}-\frac {\left (\ln \left (\frac {\sqrt {2}\,x\,\sqrt {-\sqrt {5}-1}}{2}+\frac {\sqrt {2}\,\sqrt {x^2+1}\,\sqrt {1-\sqrt {5}}}{2}+1\right )-\ln \left (x-\frac {\sqrt {2}\,\sqrt {-\sqrt {5}-1}}{2}\right )\right )\,\left (\sqrt {-\frac {\sqrt {5}}{2}-\frac {1}{2}}+2\,{\left (-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )}{\left (2\,\sqrt {-\frac {\sqrt {5}}{2}-\frac {1}{2}}+4\,{\left (-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}^{3/2}\right )\,\sqrt {\frac {1}{2}-\frac {\sqrt {5}}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(x*(x^2 + 1)^(1/2) + 1),x)

[Out]

x*log(x*(x^2 + 1)^(1/2) + 1) - 2*x + (log(x - (2^(1/2)*(5^(1/2) - 1)^(1/2))/2)*(5^(1/2)/2 - 5/2))/(2*(5^(1/2)/
2 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(3/2)) - (log(x + (2^(1/2)*(5^(1/2) - 1)^(1/2))/2)*(5^(1/2)/2 - 5/2))/(2*
(5^(1/2)/2 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(3/2)) - (log(x - (2^(1/2)*(- 5^(1/2) - 1)^(1/2))/2)*(5^(1/2)/2
+ 5/2))/(2*(- 5^(1/2)/2 - 1/2)^(1/2) + 4*(- 5^(1/2)/2 - 1/2)^(3/2)) + (log(x + (2^(1/2)*(- 5^(1/2) - 1)^(1/2))
/2)*(5^(1/2)/2 + 5/2))/(2*(- 5^(1/2)/2 - 1/2)^(1/2) + 4*(- 5^(1/2)/2 - 1/2)^(3/2)) + ((log(x - (2^(1/2)*(5^(1/
2) - 1)^(1/2))/2) - log((2^(1/2)*x*(5^(1/2) - 1)^(1/2))/2 + (2^(1/2)*(x^2 + 1)^(1/2)*(5^(1/2) + 1)^(1/2))/2 +
1))*((5^(1/2)/2 - 1/2)^(1/2) + 2*(5^(1/2)/2 - 1/2)^(3/2)))/((2*(5^(1/2)/2 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(
3/2))*(5^(1/2)/2 + 1/2)^(1/2)) + ((log(x + (2^(1/2)*(5^(1/2) - 1)^(1/2))/2) - log((2^(1/2)*(x^2 + 1)^(1/2)*(5^
(1/2) + 1)^(1/2))/2 - (2^(1/2)*x*(5^(1/2) - 1)^(1/2))/2 + 1))*((5^(1/2)/2 - 1/2)^(1/2) + 2*(5^(1/2)/2 - 1/2)^(
3/2)))/((2*(5^(1/2)/2 - 1/2)^(1/2) + 4*(5^(1/2)/2 - 1/2)^(3/2))*(5^(1/2)/2 + 1/2)^(1/2)) - ((log((2^(1/2)*(x^2
 + 1)^(1/2)*(1 - 5^(1/2))^(1/2))/2 - (2^(1/2)*x*(- 5^(1/2) - 1)^(1/2))/2 + 1) - log(x + (2^(1/2)*(- 5^(1/2) -
1)^(1/2))/2))*((- 5^(1/2)/2 - 1/2)^(1/2) + 2*(- 5^(1/2)/2 - 1/2)^(3/2)))/((2*(- 5^(1/2)/2 - 1/2)^(1/2) + 4*(-
5^(1/2)/2 - 1/2)^(3/2))*(1/2 - 5^(1/2)/2)^(1/2)) - ((log((2^(1/2)*x*(- 5^(1/2) - 1)^(1/2))/2 + (2^(1/2)*(x^2 +
 1)^(1/2)*(1 - 5^(1/2))^(1/2))/2 + 1) - log(x - (2^(1/2)*(- 5^(1/2) - 1)^(1/2))/2))*((- 5^(1/2)/2 - 1/2)^(1/2)
 + 2*(- 5^(1/2)/2 - 1/2)^(3/2)))/((2*(- 5^(1/2)/2 - 1/2)^(1/2) + 4*(- 5^(1/2)/2 - 1/2)^(3/2))*(1/2 - 5^(1/2)/2
)^(1/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(1+x*(x**2+1)**(1/2)),x)

[Out]

Timed out

________________________________________________________________________________________