Complex eigenvalue problem

You’re missing a few factors:

The variational forumation should be sesquilinear, you need to define the inner product to respect that, i.e. (u, v) = \int_\Omega u \overline{v} \; \mathrm{d} x = (u_r + j u_j, v_r - j v_j).

You can create a mixed function space to solve for the real and imaginary parts, e.g:

# mesh etc

W = FunctionSpace(mesh, MixedElement([FiniteElement("CG", mesh.ufl_cell(), 1), FiniteElement("CG", mesh.ufl_cell(), 1)]))
U, V = TrialFunction(W), TestFunction(W)
u_r, u_j = split(U)
v_r, v_j  = split(V)

# do variational forms and solve

Separate to this, if you’re feeling ambitious, dolfinx supports complex numbers. See the Helmholtz demo for example.