.. _responses-mixed_hessians-interval_type:

"""""""""""""
interval_type
"""""""""""""


Specify how to compute gradients and hessians


.. toctree::
   :hidden:
   :maxdepth: 1

   responses-mixed_hessians-interval_type-forward
   responses-mixed_hessians-interval_type-central


**Specification**

- *Alias:* None

- *Arguments:* None

- *Default:* forward


**Child Keywords:**

+-------------------------+--------------------+--------------------+-----------------------------------------------+
| Required/Optional       | Description of     | Dakota Keyword     | Dakota Keyword Description                    |
|                         | Group              |                    |                                               |
+=========================+====================+====================+===============================================+
| Required (Choose One)   | Finite Difference  | `forward`__        | (Default) Use forward differences             |
|                         | Type               +--------------------+-----------------------------------------------+
|                         |                    | `central`__        | Use central differences                       |
+-------------------------+--------------------+--------------------+-----------------------------------------------+

.. __: responses-mixed_hessians-interval_type-forward.html
__ responses-mixed_hessians-interval_type-central.html



**Description**


The ``interval_type`` setting is used to select between ``forward`` and
``central`` differences in numerical gradient and hessian calculations. The
``dakota``, DOT ``vendor``, and OPT++ ``vendor`` routines have both forward
and central differences available, the CONMIN, NL2SOL and ROL ``vendor``
routines support forward differences only, and the NPSOL and NLSSOL
``vendor`` routines start with forward differences and automatically
switch to central differences as the iteration progresses (the user has
no control over this). The following forward difference expression

.. math:: 

   \nabla f ({\bf x}) ong
   \frac{f ({\bf x} + h {\bf e}_i) - f ({\bf x})}{h}

and the following central difference expression

.. math:: 

   \nabla f ({\bf x}) ong
   \frac{f ({\bf x} + h {\bf e}_i) - f ({\bf x} - h {\bf e}_i)}{2h}

are used to estimate the :math:`i^{th}`  component of the gradient vector.


