How do I compute: $$ \int_0^z (\sqrt{R^2 + x^2} - x)\,dx. $$ This document I am trying to follow has a similar integral to the one I have:
$$ \int (\sqrt{R^2 + x^2} - x) \, dx \\ =x\sqrt{R^2+x^2} + R^2\ln \left(x + \sqrt{R^2 + x^2}\right) + x_0. $$ So I have tried a few things but have gotten no where. Does anyone know how to compute this kinda integral?
$$\int_0^z (\sqrt{R^2 + x^2} - x) \, dx=\int_0^z \sqrt{R^2 + x^2} \, dx-\int_0^z x \, dx.$$
The first one is a standard $x=R \tan(u)$ substitution, and the second is easy.