<s>[INST] Integrate $(1-\sqrt{x})/(1+\sqrt{x})$ 
Integrate $(1-\sqrt{x})/(1+\sqrt{x})$.

So, this was on my test, and I got
$$4(1+\sqrt{x})-4\ln(1+\sqrt{x})-x+c$$
as a result using symbolab. But my teacher gave the result shown below (his solution is shown here, and transcribed below).
$$\int \frac{1-\sqrt{x}}{1+\sqrt{x}} \, dx \;=\; 6\left(1-\sqrt{x}\right)-\left(1-\sqrt{x}\right)^2-2\ln\big|1-\sqrt{x}\big|+c.$$
I'm trying to understand what is wrong in symbolab or in his result, but I really can't find out.

Teacher's solution:
Let $u = 1+\sqrt{x}$. Then $1-\sqrt{x} = 2-u$, and $dx = 2(u-1)du$. Then
\begin{align*}
\int \frac{1-\sqrt{x}}{1+\sqrt{x}} \, dx 
&= \int \frac{(2-u)2(u-1)}{u} \, du
= 2 \int \frac{3u-u^2-2}{u} \, du
\\&= \int 6 \, du - 2 \int u \, du - 2 \int \frac{1}{u} \, du
\\&= 6u - u^2 - 2\ln|u| + C
\\&= 6(1-\sqrt{x}) - (1-\sqrt{x})^2 - 2\ln|1-\sqrt{x}| + C
\end{align*}

 [/INST] Your teacher made 2 separate mistakes. First when splitting the integrals:
$$2\int\frac{3u-u^2-2}{u}du=\int6\,du-2\int u \,du-4\int \frac1udu$$
They wrote a 2 instead of 4 in the final term. Then when resubstituting the expression for $u$ they used $1-\sqrt{x}$ instead of $1+\sqrt{x}$:
$$6(1+\sqrt{x})-(1+\sqrt{x})^{2}-4\ln\left(1+\sqrt{x}\right)+c$$
Indeed, this is equivalent to $4(1+\sqrt{x})-4\ln(1+\sqrt{x})-x+K$ as:
$$6(1+\sqrt{x})-(1+\sqrt{x})^{2}-4\ln\left(1+\sqrt{x}\right)+c=
6+6\sqrt{x}-1-2\sqrt{x}-x-4\ln\left(1+\sqrt{x}\right)+c$$
$$=5+4\sqrt{x}-x-4\ln\left(1+\sqrt{x}\right)+c=4(1+\sqrt{x}-\ln\left(1+\sqrt{x}\right))-x+1+c$$
And finally, let $K=1+c$.
</s>