I found a question to find an expression for the maximum height that a particle projected vertically with a velocity of u can reach if there is a resistive force acting on it of Kmv newton (where m is the particles mass, v being it velocity and k is a constant) and gravity acting on it as well.

after doing a bit of algebra/calculus i got an answer of

. . . . .
What i notice i that my solution i not defined for the case k=0, meaning there is a clearly insonsistent with the solution obtained when no air resistance is accounted for. So is my solution incorrect ?