By "density" I assume you mean "probability density function". For this to be the case for [tex]f(x)[/tex], we require
[tex]\displaystyle\int_{-\infty}^\infty f(x)\,\mathrm dx=1[/tex]
Since
[tex]f(x)=\begin{cases}cx^{1/2}&\text{for }0<x<2\\0&\text{otherwise}\end{cases}[/tex]
you have
[tex]\displaystyle\int_{-\infty}^\infty f(x)\,\mathrm dx=\int_0^2cx^{1/2}\,\mathrm dx=\dfrac{2c}3x^{3/2}\bigg|_{x=0}^{x=2}=\dfrac{2^{5/2}c}3=1[/tex]
which means
[tex]c=\dfrac3{2^{5/2}}=\dfrac3{4\sqrt2}[/tex]