Real part of an analytic function is
u(x,y)=3x2y−y3−x+6
To find the imaginary part of the function let's use Cauchy-Riemann equations:
∂x∂u=∂y∂v∂x∂v=−∂y∂u
Calculating derivatives we get:
∂x∂v=−∂y∂u=−(3x2−3y2)=3y2−3x2∂y∂v=∂x∂u=6xy−1
Let's find v(x,y).
v(x,y)=∫∂x∂vdx+c(x)=3y2x−x3+c(y)
where c(y) is an arbitrary function of y. Let's differentiate the last equality by y:
∂y∂v=6xy+c′(y)=6xy−1
So c′(y)=−1, so c(y)=−y+c, c is arbitrary constant. So
v(x,y)=3y2x−x3+c(y)=3y2x−x3−y+c
So analytic function with real part u(x,y) is
u(x,y)+iv(x,y)=3x2y−y3−x+6+i(3y2x−x3−y+c)