Action minimization (Euler-Lagrange equation)

The shape of a hanging wire is a classial problem in Euler-Lagrange equations, but here the shape is found from minimizing the potential starting from an initial estimate. To solve for the shape we can look at the problem in view of a constrained optimization problem. The Lagrangian is given below in continous form.

Lagrangian

The continous form is discretized. The average height from two neighboring points is used to give a symmetric Lagrangian, which leads to a better solution. It also leads to more complicated terms in the Jacobian and Hessian.

Lagrangian

The Jacobian of the Lagrangian is given by

Jacobian

The Hessian of the Lagrangian is given by

Hessian

The constraints are the boundary fixed position of the wire, and the total wire length l.

constraint

The optimization algorithm can converge faster if given the analytical expressions for Jacobian and Hessian of the nonlinear constraint. The Jacobian is given by

constraintjacobian

The Hessian of the constraint is given by

constrainthessian

The solution is given below

Solution

The initial guessed path is a based on a sine curve, which doesn't optimize the potential function. The iterated solution is closer to the true shape of a hanging wire. A parabola is a better approximation to the solution, which is a catenary. We can try with a parabola initial condition. The solution is seen below

Solution

Home