Integrand size = 47, antiderivative size = 168 \[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=-\frac {b x}{2}+\frac {\left (3 b^2+a x\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{3 a}+\sqrt {b^2+a^2 x^2} \left (-\frac {b}{2 a}+\frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{3 a}\right )+\frac {b \log \left (a x+\sqrt {b^2+a^2 x^2}\right )}{2 a}+\frac {\left (-b-b^3\right ) \log \left (b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}\right )}{a} \]
[Out]
\[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a x}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}}\right ) \, dx \\ & = a \int \frac {x}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx+\int \frac {\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx \\ & = a \int \left (\frac {-1-b^2}{4 a b}+\frac {x}{2 b}+\frac {-1+b^4}{4 a b \left (-1+b^2-2 a x\right )}-\frac {\sqrt {b^2+a^2 x^2}}{2 a b}+\frac {\left (1-b^2\right ) \sqrt {b^2+a^2 x^2}}{2 a b \left (1-b^2+2 a x\right )}+\frac {\left (1+\frac {1}{b^2}\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{4 a}-\frac {x \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 b^2}-\frac {\left (1-b^4\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{4 a b^2 \left (1-b^2+2 a x\right )}+\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 a b^2}+\frac {\left (1-\frac {1}{b^2}\right ) \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 a \left (1-b^2+2 a x\right )}\right ) \, dx+\int \left (\frac {a x \sqrt {b^2+a^2 x^2}}{b (1+2 a x)}+\frac {b (1+a x) \sqrt {b^2+a^2 x^2}}{\left (-1+b^2-2 a x\right ) (1+2 a x)}-\frac {b^2+a^2 x^2}{b (1+2 a x)}+\frac {b \left (b^2+a^2 x^2\right )}{\left (-1+b^2-2 a x\right ) (1+2 a x)}-\frac {a x \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{b^2 (1+2 a x)}-\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\left (-1+b^2-2 a x\right ) (1+2 a x)}+\frac {a x \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{(1+2 a x) \left (1-b^2+2 a x\right )}+\frac {\left (b^2+a^2 x^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{b^2 (1+2 a x)}+\frac {\left (b^2+a^2 x^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{(1+2 a x) \left (1-b^2+2 a x\right )}\right ) \, dx \\ & = -\frac {\left (1+b^2\right ) x}{4 b}+\frac {a x^2}{4 b}+\frac {\left (1-b^4\right ) \log \left (1-b^2+2 a x\right )}{8 a b}+a \int \frac {x \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{(1+2 a x) \left (1-b^2+2 a x\right )} \, dx+\frac {1}{2} \left (1-\frac {1}{b^2}\right ) \int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1-b^2+2 a x} \, dx+\frac {1}{4} \left (1+\frac {1}{b^2}\right ) \int \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx+\frac {\int \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx}{2 b^2}+\frac {\int \frac {\left (b^2+a^2 x^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1+2 a x} \, dx}{b^2}-\frac {a \int x \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx}{2 b^2}-\frac {a \int \frac {x \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1+2 a x} \, dx}{b^2}-\frac {\int \sqrt {b^2+a^2 x^2} \, dx}{2 b}-\frac {\int \frac {b^2+a^2 x^2}{1+2 a x} \, dx}{b}+\frac {a \int \frac {x \sqrt {b^2+a^2 x^2}}{1+2 a x} \, dx}{b}+b \int \frac {(1+a x) \sqrt {b^2+a^2 x^2}}{\left (-1+b^2-2 a x\right ) (1+2 a x)} \, dx+b \int \frac {b^2+a^2 x^2}{\left (-1+b^2-2 a x\right ) (1+2 a x)} \, dx+\frac {\left (1-b^2\right ) \int \frac {\sqrt {b^2+a^2 x^2}}{1-b^2+2 a x} \, dx}{2 b}-\frac {\left (1-b^4\right ) \int \frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1-b^2+2 a x} \, dx}{4 b^2}-\int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\left (-1+b^2-2 a x\right ) (1+2 a x)} \, dx+\int \frac {\left (b^2+a^2 x^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{(1+2 a x) \left (1-b^2+2 a x\right )} \, dx \\ & = -\frac {\left (1+b^2\right ) x}{4 b}+\frac {a x^2}{4 b}+\frac {\left (1-b^2\right ) \sqrt {b^2+a^2 x^2}}{4 a b}-\frac {x \sqrt {b^2+a^2 x^2}}{4 b}-\frac {(1-a x) \sqrt {b^2+a^2 x^2}}{4 a b}+\frac {\left (1-b^4\right ) \log \left (1-b^2+2 a x\right )}{8 a b}+a \int \left (\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 a b^2 (1+2 a x)}+\frac {\left (-1+b^2\right ) \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 a b^2 \left (1-b^2+2 a x\right )}\right ) \, dx+\frac {1}{2} \left (1-\frac {1}{b^2}\right ) \int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1-b^2+2 a x} \, dx+\frac {\left (1+\frac {1}{b^2}\right ) \text {Subst}\left (\int \frac {b^2+x^2}{x^{3/2}} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a}+\frac {\int \left (-\frac {1}{4} \sqrt {a x+\sqrt {b^2+a^2 x^2}}+\frac {1}{2} a x \sqrt {a x+\sqrt {b^2+a^2 x^2}}+\frac {\left (1+4 b^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{4 (1+2 a x)}\right ) \, dx}{b^2}-\frac {\text {Subst}\left (\int \frac {\left (-b^2+x^2\right ) \left (b^2+x^2\right )}{x^{5/2}} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a b^2}+\frac {\text {Subst}\left (\int \frac {\left (b^2+x^2\right )^2}{x^{5/2}} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a b^2}-\frac {a \int \left (\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 a}-\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{2 a (1+2 a x)}\right ) \, dx}{b^2}-\frac {\int \left (-\frac {1}{4}+\frac {a x}{2}+\frac {1+4 b^2}{4 (1+2 a x)}\right ) \, dx}{b}+\frac {\int \frac {-2 a^3 b^2+2 a^4 \left (1+2 b^2\right ) x}{(1+2 a x) \sqrt {b^2+a^2 x^2}} \, dx}{8 a^3 b}-\frac {1}{4} b \int \frac {1}{\sqrt {b^2+a^2 x^2}} \, dx+b \int \left (-\frac {1}{4}+\frac {\left (1+b^2\right )^2}{4 b^2 \left (-1+b^2-2 a x\right )}+\frac {1+4 b^2}{4 b^2 (1+2 a x)}\right ) \, dx+b \int \left (\frac {\left (1+b^2\right ) \sqrt {b^2+a^2 x^2}}{2 b^2 \left (-1+b^2-2 a x\right )}+\frac {\sqrt {b^2+a^2 x^2}}{2 b^2 (1+2 a x)}\right ) \, dx+\frac {\left (1-b^2\right ) \int \frac {2 a b^2-a^2 \left (1-b^2\right ) x}{\left (1-b^2+2 a x\right ) \sqrt {b^2+a^2 x^2}} \, dx}{4 a b}-\frac {\left (1-b^4\right ) \text {Subst}\left (\int \frac {b^2+x^2}{\sqrt {x} \left (-2 a b^2+2 a \left (1-b^2\right ) x+2 a x^2\right )} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{4 b^2}+\int \left (\frac {1}{4} \sqrt {a x+\sqrt {b^2+a^2 x^2}}-\frac {\left (1+b^2\right )^2 \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{4 b^2 \left (-1+b^2-2 a x\right )}+\frac {\left (-1-4 b^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{4 b^2 (1+2 a x)}\right ) \, dx-\int \left (\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{b^2 \left (-1+b^2-2 a x\right )}+\frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{b^2 (1+2 a x)}\right ) \, dx \\ & = \frac {x}{4 b}-\frac {b x}{4}-\frac {\left (1+b^2\right ) x}{4 b}+\frac {\left (1-b^2\right ) \sqrt {b^2+a^2 x^2}}{4 a b}-\frac {x \sqrt {b^2+a^2 x^2}}{4 b}-\frac {(1-a x) \sqrt {b^2+a^2 x^2}}{4 a b}-\frac {\left (1+b^2\right )^2 \log \left (1-b^2+2 a x\right )}{8 a b}+\frac {\left (1-b^4\right ) \log \left (1-b^2+2 a x\right )}{8 a b}+\frac {1}{4} \int \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx+\frac {1}{2} \left (1-\frac {1}{b^2}\right ) \int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1-b^2+2 a x} \, dx-\frac {1}{2} \left (-1+\frac {1}{b^2}\right ) \int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1-b^2+2 a x} \, dx+\frac {\left (1+\frac {1}{b^2}\right ) \text {Subst}\left (\int \left (\frac {b^2}{x^{3/2}}+\sqrt {x}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a}+\frac {1}{4} \left (4+\frac {1}{b^2}\right ) \int \frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1+2 a x} \, dx-\frac {\int \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx}{4 b^2}-\frac {\int \sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx}{2 b^2}+2 \frac {\int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1+2 a x} \, dx}{2 b^2}-\frac {\int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{-1+b^2-2 a x} \, dx}{b^2}-\frac {\int \frac {\sqrt {b^2+a^2 x^2} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1+2 a x} \, dx}{b^2}-\frac {\text {Subst}\left (\int \left (-\frac {b^4}{x^{5/2}}+x^{3/2}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a b^2}+\frac {\text {Subst}\left (\int \left (\frac {b^4}{x^{5/2}}+\frac {2 b^2}{\sqrt {x}}+x^{3/2}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a b^2}+\frac {a \int x \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx}{2 b^2}+\frac {\int \frac {\sqrt {b^2+a^2 x^2}}{1+2 a x} \, dx}{2 b}-\frac {1}{4} b \text {Subst}\left (\int \frac {1}{1-a^2 x^2} \, dx,x,\frac {x}{\sqrt {b^2+a^2 x^2}}\right )+\frac {1}{2} \left (\left (1+\frac {1}{b^2}\right ) b\right ) \int \frac {\sqrt {b^2+a^2 x^2}}{-1+b^2-2 a x} \, dx+\frac {\left (-1-4 b^2\right ) \int \frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{1+2 a x} \, dx}{4 b^2}-\frac {\left (1-b^2\right )^2 \int \frac {1}{\sqrt {b^2+a^2 x^2}} \, dx}{8 b}-\frac {\left (1+b^2\right )^2 \int \frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{-1+b^2-2 a x} \, dx}{4 b^2}+\frac {\left (\left (1-b^2\right ) \left (1+b^2\right )^2\right ) \int \frac {1}{\left (1-b^2+2 a x\right ) \sqrt {b^2+a^2 x^2}} \, dx}{8 b}+\frac {\left (1+2 b^2\right ) \int \frac {1}{\sqrt {b^2+a^2 x^2}} \, dx}{8 b}-\frac {\left (1+4 b^2\right ) \int \frac {1}{(1+2 a x) \sqrt {b^2+a^2 x^2}} \, dx}{8 b}-\frac {\left (1-b^4\right ) \text {Subst}\left (\int \left (\frac {1}{2 a \sqrt {x}}+\frac {2 b^2-\left (1-b^2\right ) x}{\sqrt {x} \left (-2 a b^2+2 a \left (1-b^2\right ) x+2 a x^2\right )}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{4 b^2} \\ & = \text {Too large to display} \\ \end{align*}
Time = 0.26 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.88 \[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {-3 a b x+2 \left (3 b^2+a x\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}+\sqrt {b^2+a^2 x^2} \left (-3 b+2 \sqrt {a x+\sqrt {b^2+a^2 x^2}}\right )+3 b \log \left (a x+\sqrt {b^2+a^2 x^2}\right )-6 \left (b+b^3\right ) \log \left (b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}\right )}{6 a} \]
[In]
[Out]
\[\int \frac {a x +\sqrt {a^{2} x^{2}+b^{2}}}{b +\sqrt {a x +\sqrt {a^{2} x^{2}+b^{2}}}}d x\]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.73 \[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=-\frac {3 \, a b x + 6 \, {\left (b^{3} + b\right )} \log \left (b + \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}\right ) - 6 \, b \log \left (\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}\right ) - 2 \, {\left (3 \, b^{2} + a x + \sqrt {a^{2} x^{2} + b^{2}}\right )} \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} + 3 \, \sqrt {a^{2} x^{2} + b^{2}} b}{6 \, a} \]
[In]
[Out]
\[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int \frac {a x + \sqrt {a^{2} x^{2} + b^{2}}}{b + \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}}\, dx \]
[In]
[Out]
\[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int { \frac {a x + \sqrt {a^{2} x^{2} + b^{2}}}{b + \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}} \,d x } \]
[In]
[Out]
\[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int { \frac {a x + \sqrt {a^{2} x^{2} + b^{2}}}{b + \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {a x+\sqrt {b^2+a^2 x^2}}{b+\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int \frac {a\,x+\sqrt {a^2\,x^2+b^2}}{b+\sqrt {a\,x+\sqrt {a^2\,x^2+b^2}}} \,d x \]
[In]
[Out]