The water density is changing linearly with the displacement x>0, i.e. $\rho = \rho_0 + kx$, where $\rho$ > 0 and k>0. Also, assume that $\rho_0V < m $.
I know that potential energy, $V = - \int F \ dx $.
I have that my Force, $F = mg - \rho Vg$. Where $m$ = mass, $g$ = gravity force and $\rho $ = water density.
$ \begin{align*} V &= - \int F \ dx \\ &= - \int (mg - \rho Vg) \ dx \\ &= - ( mgx - \rho Vgx + C) \\ &= -mgx + \rho Vgx + C_1 \end{align*} $
When displacement is 0, the potential energy is 0, so this implies $C_1$ is 0. Therefore substituting in the value for $\rho = \rho_0 + kx$ we have that
$ \begin{align*} V &= \rho_0Vgx + Vgkx^2 -mgx \end{align*} $
I have to sketch this as a graph, where $V$ is a function of $x$. Don't know how to do this, because of all variables.
Call $E$ the potential energy (don't use the same letter for Volume and energy...) $$ E (x)= \rho_0Vgx + Vgkx^2 -mgx=\underbrace{Vgk}_ax^2+\underbrace{(\rho_0V-m)g}_bx=ax^2+bx=x(ax+b) $$ is a parabola.