We know velocity of a planet in an elliptical orbit is given by: $$v^2 = GM * (\frac{2}{r} - \frac{1}{a})$$ in an elliptical orbit. [Here r is distance between particle and sun] source
We also know, areal velocity in an elliptical orbit is given by $$\frac{dA}{dt} = \frac{1}{2}vr$$
By putting value of velocity in this equation we find that areal velocity is dependant on r, and thus ever changing(since distance between sun and a planet is also changing)
But keplers second law states that areal velocity of a particle is always constant.
How do I resolve this contradiction? What am I doing wrong? I assumed r would cancel out leaving only contants behind. If I am putting the value of velocity wrong what is the correct one?