I was trying to solve the following problem, but my results seem illogical when I graph my solution.

Assuming we have a bubble at the end of a coke glass, I want to solve for the speed of the bubble as a function of its position in the glass.
[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/7oxV1.png

Let's say the height of the glass is $y = H$, and we're looking for the speed of the bubble at $y=h$.
What I did was that I tried to find the amount of work done on the bubble. There are two forces exerted on the bubble. The buoyant force is $\rho \times V \times g$, in which $\rho$ is the density of water and $V$ is the volume of the bubble at that height. The other force is the gravitational force which is equal to $n \times g \times M$, in which $n$ is the number of gas moles in the bubble, $M$ is the molar mass, and $g$ is the gravitational constant.

So the overall force is: $(-nM \times g) + (\rho \times V \times g) = (-nM \times g) + (\rho \times \dfrac{nRT}{P} \times g)$

$P(y) = P_0 + \rho \times g \times y$

Since we have the overall force, we can calculate the work done on the bubble. If we assume the bubble goes straight up(without deviation), we can do so by integrating the overall force with respect to time. The result is:

$-nM \times g \times h + nRT \times ln(\dfrac{P_0 + \rho \times g \times H}{P_0 + \rho \times g \times (H - h)})$

Now using $W = 1/2 \times m \times v^2$, we get:

$v = \sqrt{\dfrac{2RT}{M}ln(\dfrac{P_0 + \rho gH}{P_0 + \rho g(H - h)}) - 2gh}$

When I graphed my results, my answers didn't make sense. What am I doing wrong?