x = var('x')
y = function('y',x)

k = var('k')

DE = diff(y,x) + k*y^2

desolve(DE, [y,x])