# Equality-Constrained Optimization With Differential Forms

**URL:** <https://community.wolfram.com/t/equality-constrained-optimization-with-differential-forms/4348>\
**Category:** Ideas\
**Tags:** operations-research, calculus, optimization\
**Created:** [December 17, 2014, 4:59pm UTC](https://community.wolfram.com/t/equality-constrained-optimization-with-differential-forms/4348 "2014-12-17T16:59:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [December 17, 2014, 4:59pm UTC](https://community.wolfram.com/t/equality-constrained-optimization-with-differential-forms/4348/1 "2014-12-17T16:59:52Z")

</div>

Equality-constrained optimization can be performed without Lagrange mulitpliers, using differential forms.

See “Differential forms for constrained max-min problems: eliminating Lagrange multipliers”, College Mathematics Journal 29 (November 1998), no. 5, 387–396, by Frank Zizza

The differential forms condition to minimize or maximize f subject to g1 == 0, g2 == 0, etc.  
is df ^ dg1 ^ dg2 … == 0 where df, dg1, dg2, etc. are differentials of f, g1, g2, etc. and ^ is the wedge product.

This operation can be carried out in Mathematica using the TensorWedge function. For example, considering minimizing x + y subject to x^2+ y^2==1

```
In[1]:= f = x + y; g = x^2 + y^2 - 1; vars = {x, y};

In[4]:= df = Grad[f, vars]; dg = Grad[g, vars];

In[7]:= w = SymmetrizedArrayRules[TensorWedge[df, dg]]

Out[7]= {{1, 2} -> -2 x + 2 y, {_, _} -> 0}

In[10]:= Reduce[w[[All, 2]] == 0 && g == 0, vars, 
 Backsubstitution -> True]

Out[10]= (x == -(1/Sqrt[2]) && y == -(1/Sqrt[2])) || (x == 1/Sqrt[2] &&
    y == 1/Sqrt[2])

```

The Lagrange multiplier approach would be

```
In[11]:= Reduce[df == \[Lambda] dg && g == 0, vars, 
 Backsubstitution -> True]

Out[11]= (\[Lambda] == -(1/Sqrt[2]) && x == -(1/Sqrt[2]) && 
   y == -(1/Sqrt[2])) || (\[Lambda] == 1/Sqrt[2] && x == 1/Sqrt[2] && 
   y == 1/Sqrt[2])

```
