I'm trying to find the area of a semi-circle using definite integrals, but I'm not understanding the results.
www.desmos.com/calculator/1ucgmybjxx
It looks fine when $k=0$, but when translating the figure down, the area turns negative before the top is even under the $x$-axis.
What's going on?
Create $$g(x)=-\sqrt{r^2-(x-r)^2}+k$$ This is the lower half of the circle. Calculate $$\int_0^{2r}(f(x)-g(x))dx$$ If you calculate only integral of $f$ you calculate the area of the half of the disk plus the area between the horizontal diameter and the $x$ axis. In my case, this area will cancel