Consider a block of mass $m$ hunged by a spring of spring constant $k$. Let it be in equilibrium position where $mg=kx$.
Now it is given a sudden impulse in upward direction so that it starts moving in upward direction, does the maximum height it would reach will be calculated as
$1/2mv^2=mgh$(where h is the max height reached)
Or the height reached will be different as spring will also exert force and thus involve itself in energy conservation equation. The above equation i think is only valid if there is no spring force throughout whole journey but this does not sit well with my intuition. So what is actually happening?