DCP Rule set error

Code 1:
k(i)==pow_abs(V(i),2)/2; is a nonlinear equality constraint, which is not allowed.
http://cvxr.com/cvx/doc/dcp.html#constraints

Three types of constraints may be specified in disciplined convex programs:

An equality constraint, constructed using ==, where both sides are affine.
A less-than inequality constraint, using <=, where the left side is convex and the right side is concave.
A greater-than inequality constraint, using >=, where the left side is concave and the right side is convex.

Code 2:
In
E1=((V(i+1)^2-V(i)^2)/2)+h*Pb(i)+h*c*V(i)^3;

V(i+1)^2-V(i)^2)/2 is convex minus convex, which is not allowed.

Have you proved that this is a convex optimization problem?