I've been given the calculus of variations problem of extremizing $$I=\int_a^bf(x,y,y')dx=\int_a^by\sqrt{1+y'^2}dx$$ where of course $y$ is a function of $x$. I came up with what I thought was a pretty sharp solution method that got around nonlinearities in the application of the Euler-Lagrange equation, but it leads to an apparent contradiction:

Since there is no direct $x$ dependence in the integrand, the Hamiltonian/first-integral must be constant for the extremizing $y$, i.e. $$f-y'\frac{\partial f}{\partial y'}=c_1\Leftrightarrow y\sqrt{1+y'^2}-\frac{yy'^2}{\sqrt{1+y'^2}}=c_1\Leftrightarrow y+yy'^2-yy'^2=c_1\sqrt{1+y'^2}$$ $$\Leftrightarrow y^2=c_1^2(1+y'^2)\Leftrightarrow 1+y'^2= \frac{y^2}{c_1^2}.\tag{1}$$ Extremal $y$ must also satisfy the normal Euler-Lagrange equations $$\frac{\partial f}{\partial y}=\frac{d}{dx}\frac{\partial f}{\partial y'}\Leftrightarrow \sqrt{1+y'^2}=\frac{d}{dx}\left[ \frac{yy'}{\sqrt{1+y'^2}} \right]$$ $$\Leftrightarrow \sqrt{1+y'^2}=\frac{y'^2}{\sqrt{1+y'^2}}+yy''\left(\frac{1}{\sqrt{1+y'^2}}- \frac{y'^2}{(1+y'^2)^{3/2}} \right)$$ $$\Leftrightarrow (1+y'^2)^2=y'^2+y'^4+yy''+yy'^2y''-yy'^2y''$$ $$\Leftrightarrow y'^4+2y'^2+1=y'^2+y'^4+yy''$$ $$\Leftrightarrow y'^2-yy''+1=0.\tag{2}$$ Substituting the first-integral expression for $1+y'^2$, $$\frac{y^2}{c_1^2}=yy''\Leftrightarrow y''-\frac{y}{c_1^2}=0.\tag{3}$$ However, the solution to this linear ODE is not a solution to the Euler-Lagrange ODE. The only way I can see that the argument is unjustified is if $c_1=0$ and therefore $y=0$, but boundary conditions were given in the problem that this solution cannot satisfy. I've even written out proofs of the E-L equations and Hamiltonian conservation that don't appear to make any unjustified assumptions.

Any ideas?

  • $\begingroup$ Why do you expect that an extremal exists? $\endgroup$
    – copper.hat
    Oct 17, 2021 at 6:24
  • $\begingroup$ Because I was asked to find it as a homework problem. I suppose the problem could be ill-posed... $\endgroup$
    – Duncan W
    Oct 17, 2021 at 6:26
  • $\begingroup$ Choose $y$ to be a constant, then $I(y) = (b-a)y$. It can have arbitrary values. $\endgroup$
    – copper.hat
    Oct 17, 2021 at 6:42
  • 1
    $\begingroup$ What are the boundary conditions? Can you show us precisely how you reach this contradiction? $\endgroup$
    – Sal
    Oct 17, 2021 at 12:28
  • 1
    $\begingroup$ @DuncanW I am familiar with calculus of variations. You need to specify the problem coimpletely. $\endgroup$
    – copper.hat
    Oct 17, 2021 at 17:58

2 Answers 2


You manipulate two pretty much equivalent (if we neglect the constant solutions) differential equations into the third equation. The manipulation is not an equivalence, i.e. the new equation may have more solutions that the original one(s). The only thing you know is that the extremals are going to satisfy the new equation (indeed, they do as they are $\cosh$), but you won't be able to purify the solutions of the third equation to become (spurious) extremals as well.

Example: neglecting constants $y'=y$ and $y''=y'$ have the same solution $Ce^x$, however, $y''=y$ have more solutions as $e^{-x}$ is not a solution to the first two equations.


Here is a partial answer.

  1. It should be stressed that the $x$-derivative of the first integral$^1$ $$\frac{y'^2+1}{y^2}~=~ \frac{1}{c_1^2}\tag{1}$$ is equivalent to the EL equation $$y'^2+1~=~yy''.\tag{2}$$ The constant $c_1$ is called the energy in the physics literature.

  2. The solutions to the non-linear 1st-order eq. (1) are also solutions to OP's linear 2nd-order eq. $$ y''~=~\frac{y}{c_1^2}\tag{3}$$ but the opposite is not necessarily the case.

  3. It is straightforward to derive the full solution $$y(x)~=~c_1\cosh \frac{\Delta x}{c_1}, \qquad \Delta x ~=~x-x_0,\tag{4}$$ to eq. (1) via separation of variables.

  4. OP has given the Dirichlet boundary conditions$^2$ $$ y(a)~=~A\qquad\text{and}\qquad y(b)~=~B.\tag{5}$$ A necessary condition for eq. (5) to have solutions is apparently that $A$ and $B$ have the same (strong) sign.

  5. Sufficient conditions are more cumbersome to derive. It is possible to scale the problem so that the integration region becomes $[a,b]=[0,1]$ to simplify the calculations.


$^1$ We assume for simplicity $c_1\neq 0$. The case $c_1= 0$ leads to the zero solution $y=0$.

$^2$ We assume $a\neq b$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.