<s>[INST] Choosing a substitution to evaluate $\int \frac{x+3}{\sqrt{x+2}}dx$ Is there any other value you can assign to the substitution variable to solve this integral?

$$\int \frac{x+3}{\sqrt{x+2}}dx$$

Substituting $u = x + 2$:
$$du = dx; u +1 = x+3 ,$$
and we get this new integral that we can then split into two different ones:
$$\int \frac{u + 1}{\sqrt{u}}du = \int \frac{u}{\sqrt{u}}du + \int \frac{1}{\sqrt{u}}du .$$
We can substitute again $s = \sqrt u$ and get two immediate integrals:
$$s = \sqrt{u}; \quad ds = \frac{1}{2\sqrt{u}}du; \quad 2s^2 =u .$$ Substituting back $u$ to $s$ and $x$ to $u$ we get this result,
$$s^2 + \ln{\left | \sqrt{u} \right |} = u + \ln{\left | \sqrt{u} \right |} = x+2+\ln{\left | \sqrt{x+2} \right |},$$ which doesn't look quite to be right. What am I doing wrong? I'm pretty unsure about the second substitution, $2s^2 = u$. Is it correct?
 [/INST] let's make it easier than that!
Use this:
$$x + 2 = t^2 ~~~~~~~~~~~ x+3 = t^2 + 1 ~~~~~~~ \text{d}x = 2t\ \text{d}t$$
Obtaining
$$I = \int\frac{t^2 + 1}{t}\ 2t\ \text{d}t = 2\int t^2 + 1\ \text{d}t =  \frac{2}{3}t^3 + 2t$$
Coming back to $x$, having $t = \sqrt{x+2}$ and you'll have
$$I = \frac{2}{3}\sqrt{x+2}(x+5)$$
</s>