# Help with algebraic development within integral $k\int_{0}^{L}\sqrt{Lx-x^2}dx = k\int_{0}^{L}\sqrt{\frac{L^2}{4}-(x-\frac{L}{2})^2}dx$

I am having a bit of a hard time figuring this one out. Would be very nice if anyone would like to help me (no more forehead banging against wall :))

while: $0 \leq x \leq L$

The function is: $\xi(x) = k\sqrt{x(L-x)}$ & $\xi(x)dx = k\sqrt{x(L-x)}dx$

$m = \int_{0}^{L}k\sqrt{x(L-x)}dx = k\int_{0}^{L}\sqrt{Lx-x^2}dx = k\int_{0}^{L}\sqrt{\frac{L^2}{4}-(x-\frac{L}{2})^2}dx$

I cannot understand how they develop that last step. Any help is much appreciated!

Thank you!

-

Note that $$\left(x-\frac L2\right)^2=x^2-xL+\frac{L^2}4 \hspace{5pt}\Rightarrow\hspace{5pt}\frac{L^2}4-\left(x-\frac L2\right)^2=xL-x^2$$
First recall that $-(x-a)^2=-x^2+2ax -a^2$ for any $a$. You are given $Lx-x^2=Lx-x^2+\frac{L^2}{4} - \frac{L^2}{4} =\frac{L^2}{4}-x^2+Lx - \frac{L^2}{4}=\frac{L^2}{4}-x^2+2\frac{L}{2}x - (\frac{L}{2})^2=\frac{L^2}{4}-(x-\frac{L}{2})$. This is done by just using the first formula I listed.