I have a question on solving an optimization problem with calculus of variations.

I am attempting to maximize the functional

$$ J[y] = \displaystyle\int_a^b F(x,y,y') \, \mathrm{d}x, \tag{1}$$

but my constraint is not in integral form; it is an inequality

$$ 0 \leq g(x,y,y') \leq 1, \tag{2}$$

Is it possible to solve this with calculus of variations?

I have rewritten the constraint to the form of $ g(x,y,y')-g(x,y,y')^2 \geq 0 $ and I think I should use Lagrange multiplier in form of $\lambda(x)$ and $\lambda(x) \geq 0 $ as follows:

$$ L(y)=\int_a^b F(x,y,y')+\lambda(x)(g(x,y,y')-g(x,y,y')^2) \, \mathrm{d}x $$

In this way my problem got very complicated and non-solvable, can anybody guide me to the correct or better solution. Thanks in advance and any suggestion will be appreciated.

  • $\begingroup$ I'm confused. You want to maximize the set of functions that satisfy that inequality, right? $\endgroup$ May 25, 2016 at 16:06
  • $\begingroup$ Hi, I want to find the function $ y(x) $ that maximize the $ J[y] $ and also satisfy the constraint. $\endgroup$
    – Mostafa
    May 25, 2016 at 16:09
  • $\begingroup$ If I recall correctly you should be able to use a substitution to force g(x,y,y') to be bounded. $\endgroup$ May 25, 2016 at 16:22

1 Answer 1


We can introduce slack functions $s_1, s_2$ such that the inequality constraints $g (x, y, y') \geq 0$ and $g (x, y, y') \leq 1$ can be replaced by the following equality constraints

$$g (x, y, y') - s_1^2 (x, y, y') = 0, \qquad \qquad g (x, y, y') + s_2^2 (x, y, y') = 1$$

The Lagrangian then becomes

$$F (x, y, y') + \lambda_1 (x) \left( g (x, y, y') - s_1^2 (x, y, y')\right) + \lambda_2 (x) \left( g (x, y, y') + s_2^2 (x, y, y') - 1\right)$$

I do not know what the corresponding Euler-Lagrange equations would be, though.

  • $\begingroup$ Thanks for your answer, but after using this Lagrangian and solving the Euler-Lagrange equation, two constraint are omitted and only the $s_1^2(x) + s_2^2(x)=1$ remains that cannot be used to solve the equation. $\endgroup$
    – Mostafa
    May 26, 2016 at 11:15
  • $\begingroup$ @Mostafa Did you include the slack functions in the Lagrangian? I suppose the Lagrangian should be something like $$\mathcal{L} (x,y,\lambda,s_1,s_2,y')$$ $\endgroup$ May 26, 2016 at 11:17
  • $\begingroup$ It's correct, but adding s1 and s2 to lagrangian only give me the result of $\lambda_1 (x)*2 s_1(x)=0 $ and $\lambda_2 (x)*2 s_2(x)=0 $ I Don't know how to use them to solve my equations $\endgroup$
    – Mostafa
    May 26, 2016 at 14:01

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.