# I Numerical Calculus of Variations

Tags:
1. Oct 18, 2016

### Pablo Brubeck

I attempt to solve the brachistochrone problem numerically. I am using a direct method which considers the curve $y(x)$ as a Lagrange polynomial evaluated at fixed nodes $x_i$, and the time functional as a multivariate function of the $y_i$. The classical statement of the problem requires the curve $y(x)$ to have its endpoints on $(x_0, 0)$ and $(x_1, y_1)$ and the initial velocity of the particle to be $v_0=0$, so that the time functional would take the form

$$T[y]=\int_{x_0}^{x_1} \sqrt{\frac{1+\left[\frac{dy}{dx}\right]^2}{2gy}} dx$$.

The derivative $\frac{dy}{dx}$ is approximated from the Lagrange polynomial and the integral is computed using a quadrature rule, then the functional is minimized using an interior point method. But the problem comes when the denominator of the integrand vanishes, which will always happen at the endpoint $(x_0, 0)$. I tried to avoid this by setting $v_0$, but the method fails to converge to a continuous curve for arbitrary small $v_0$.

What would be the proper way to handle this situation?

2. Oct 20, 2016

### Stephen Tashi

Intuitively, your formulation makes velocity a function of displacement, so if there is no initial displacement then there "is no reason" the particle should begin moving. You could reformulate the model so velocity depends on acceleration.