# Differential variational inequality

In mathematics, a differential variational inequality (DVI) is a dynamical system that incorporates ordinary differential equations and variational inequalities or complementarity problems.
DVIs are useful for representing models involving both dynamics and inequality constraints. Examples of such problems include, for example, mechanical impact problems, electrical circuits with ideal diodes, Coulomb friction problems for contacting bodies, and dynamic economic and related problems such as dynamic traffic networks and networks of queues (where the constraints can either be upper limits on queue length or that the queue length cannot become negative). DVIs are related to a number of other concepts including differential inclusions, projected dynamical systems, evolutionary inequalities, and parabolic variational inequalities.
Differential variational inequalities were first formally introduced by Pang and Stewart, whose definition should not be confused with the differential variational inequality used in Aubin and Cellina (1984).
Differential variational inequalities have the form to find $u(t)\in K$ such that
    $\langle v-u(t),F(t,x(t),u(t))\rangle \geq 0$
for every $v\in K$ and almost all t; K a closed convex set, where
    ${\frac {dx}{dt}}=f(t,x(t),u(t)),\quad x(t_{0})=x_{0}.$
Closely associated with DVIs are dynamic/differential complementarity problems: if K is a closed convex cone, then the variational inequality is equivalent to the complementarity problem:
    $K\ni u(t)\quad \perp \quad F(t,x(t),u(t))\in K^{*}.$

## Examples
### Mechanical Contact

Consider a rigid ball of radius $r$ falling from a height towards a table. Assume that the forces acting on the ball are gravitation and the contact forces of the table preventing penetration. Then the differential equation describing the motion is
    $m{\frac {d^{2}y}{dt^{2}}}=-mg+N(t)$
where $m$ is the mass of the ball and $N(t)$ is the contact force of the table, and $g$ is the gravitational acceleration. Note that both $y(t)$ and $N(t)$ are a priori unknown. While the ball and the table are separated, there is no contact force. There cannot be penetration (for a rigid ball and a rigid table), so $y(t)-r\geq 0$ for all $t$. If $y(t)-r>0$ then $N(t)=0$. On the other hand, if $y(t)-r=0$, then $N(t)$ can take on any non-negative value. (We do not allow $N(t)<0$ as this corresponds to some kind of adhesive.) This can be summarized by the complementarity relationship
    $0\leq y(t)-r\quad \perp \quad N(t)\geq 0.$
In the above formulation, we can set $K=\{\,z\mid z\geq 0\,\}$, so that its dual cone $K^{*}=K$ is also the set of non-negative real numbers; this is a differential complementarity problem.

### Ideal diodes in electrical circuits

An ideal diode is a diode that conducts electricity in the forward direction with no resistance if a forward voltage is applied, but allows no current to flow in the reverse direction. Then if the reverse voltage is $v(t)$, and the forward current is $i(t)$, then there is a complementarity relationship between the two:
    $0\leq v(t)\quad \perp \quad i(t)\geq 0$
for all $t$. If the diode is in a circuit containing a memory element, such as a capacitor or inductor, then the circuit can be represented as a differential variational inequality.

## Index

The concept of the index of a DVI is important and determines many questions of existence and uniqueness of solutions to a DVI. This concept is closely related to the concept of index for differential algebraic equations (DAE's), which is the number of times the algebraic equations of a DAE must be differentiated in order to obtain a complete system of differential equations for all variables. It is also a notion close to the relative degree of Control Theory, which is, roughly speaking, the number of times an "output" variable has to be differentiated so that an "input" variable appears explicitly in Control Theory this is used to derive a canonical state space form which involves the so-called "zero-dynamics", a fundamental concept for control). For a DVI, the index is the number of differentiations of F(t, x, u) = 0 needed in order to locally uniquely identify u as a function of t and x.
This index can be computed for the above examples. For the mechanical impact example, if we differentiate $y(t)$ once we have $dy/dt(t)$, which does not yet explicitly involve $N(t)$. However, if we differentiate once more, we can use the differential equation to give $d^{2}y/dt^{2}=(1/m)[-mg+N(t)]$, which does explicitly involve $N(t)$. Furthermore, if $d^{2}y/dt^{2}=b(t)$, we can explicitly determine $N(t)$ in terms of $b(t)$.
For the ideal diode systems, the computations are considerably more difficult, but provided some generally valid conditions hold, the differential variational inequality can be shown to have index one.
Differential variational inequalities with index greater than two are generally not meaningful, but certain conditions and interpretations can make them meaningful (see the references Acary, Brogliato and Goeleven, and Heemels, Schumacher, and Weiland below). One crucial step is to first define a suitable space of solutions (Schwartz' distributions).