# Question about Ipopt solver

**URL:** <https://discourse.julialang.org/t/question-about-ipopt-solver/23835>\
**Category:** New to Julia\
**Tags:** jump\
**Created:** [May 3, 2019, 9:21pm UTC](https://discourse.julialang.org/t/question-about-ipopt-solver/23835 "2019-05-03T21:21:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Y\_Li](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/y_li/32/7573_2.png) [@Y\_Li](https://discourse.julialang.org/u/Y_Li)\
**Post date:** [May 3, 2019, 9:21pm UTC](https://discourse.julialang.org/t/question-about-ipopt-solver/23835/1 "2019-05-03T21:21:56Z")

</div>

```julia
using JuMP
using Ipopt

m=Model(solver=IpoptSolver())
@variable(m, x1)
@variable(m, x2)
@variable(m, x3)
@NLobjective(m, Max, (log(x1)+log(x2)+log(x3)-1/(1-x1-x2-x3)^2))
@constraint(m,0<=x1)
@constraint(m,0<=x2)
@constraint(m,0<=x3)
@constraint(m,x1+x2+x3<=1)
solve(m)
return getvalue(x1), getvalue(x2), getvalue(x3),getobjectivevalue(m)

```

After I run the code, it shows that “Invalid number in NLP function or derivative detected.” Could any one tell me what does that mean?

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [May 3, 2019, 9:28pm UTC](https://discourse.julialang.org/t/question-about-ipopt-solver/23835/2 "2019-05-03T21:28:48Z")

</div>

The default start value for variables is zero, so at the start value your objective function is taking the log of zero. You can use the `start` keyword when creating the variables to use a different value, see [Variables · JuMP](http://www.juliaopt.org/JuMP.jl/v0.19.0/variables/#Reference-1), or reformulate your problem with a change of variables `yi = log(xi)`.

---

<div class="post-metadata">

**Author:** ![Y\_Li](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/y_li/32/7573_2.png) [@Y\_Li](https://discourse.julialang.org/u/Y_Li)\
**Post date:** [May 3, 2019, 9:35pm UTC](https://discourse.julialang.org/t/question-about-ipopt-solver/23835/3 "2019-05-03T21:35:03Z")

</div>

Thanks!!
