# Nonlinear Objective Function Splatting

**URL:** <https://discourse.julialang.org/t/nonlinear-objective-function-splatting/51251>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [December 4, 2020, 1:25pm UTC](https://discourse.julialang.org/t/nonlinear-objective-function-splatting/51251 "2020-12-04T13:25:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [December 5, 2020, 3:00am UTC](https://discourse.julialang.org/t/nonlinear-objective-function-splatting/51251/2 "2020-12-05T03:00:30Z")

</div>

JuMP doesn’t support second-derivative information for multivariate user-defined functions (docs: [https://jump.dev/JuMP.jl/stable/nlp/#User-defined-Functions-1](https://jump.dev/JuMP.jl/stable/nlp/#User-defined-Functions-1)).

You can see this by comparing the number of non-zero elements in the Lagrangian Hessian of approach 1:

```julia
-------------------------1-------------------------
This is Ipopt version 3.13.2, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).

Number of nonzeros in equality constraint Jacobian...: 15185
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 0

```

and approach 4:

```julia
-------------------------4-------------------------
This is Ipopt version 3.13.2, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).

Number of nonzeros in equality constraint Jacobian...: 15185
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 45544

```

---

_[View the full topic](https://discourse.julialang.org/t/nonlinear-objective-function-splatting/51251)._
