I am trying to run my first example of optimization using `JuMP`

.

I have a problem with the definition of the values of `x`

. I want to do `x != 0`

but it gives me an error. It only works for `x >= 0`

or `x <= 0`

.

using JuMP

import Ipopt

model = Model(Ipopt.Optimizer)

@variable(model, y >= 0)

@variable(model, x != 0) # x >= 0 works

@NLobjective(model, Max, (x^2)*y)

@NLconstraint(model, x^2 + y^2 == 1)

print(model)

optimize!(model)

@show value(x) # sqrt(2/3)

@show value(y) # sqrt(1/3)