How to Find the Maximum Value in This Calculus of Variations Problem?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
25 replies · 4K views
spock0149
Messages
31
Reaction score
0
I need to find the maximum value of

[tex]A[y(x)]= \int_{0}^{1}y^2 dx[/tex]

with boundary conditions y(0)=y(1)=0 and

[tex]\int_{0}^{1}(\frac{dy}{dx})^2=1[/tex]

Do I have to use the Euler lagrange equations? I thought that found the minimum value??

Any hints on the steps to take would be appreciated.
 
Last edited:
Physics news on Phys.org
Hmmm. so how does this sound:

[tex]\frac{\partial f}{\partial y} - \frac{\partial}{\partial x}\frac{\partial f}{\partial y_x}=0[/tex]

and we have

[tex]f=y^2[/tex]

so then

[tex]2y-0 = 0[/tex]

So y=0

I don't think this is correct. What is the approach please?
 
Last edited:
Hmmmm, I need to find the maximum value, is there one?
 
You must use a Lagrange multiplier since you have a constraint problem!
We look at the problem:
[tex]\hat{A}=\int_{0}^{1}y^{2}dx-\lambda(\int_{0}^{1}(\frac{dy}{dx})^{2}dx-1)=\int_{0}^{1}(y^{2}+\lambda((\frac{dy}{dx})^{2}-1))dx,y(0)=y(1)=0, \int_{0}^{1}(\frac{dy}{dx})^{2}dx-1=0[/tex]
where lambda is the Lagrange multiplier.
The associated Euler-Lagrange equation is therefore:
[tex]2y+2\lambda\frac{d^{2}y}{dx^{2}}=0\to{y}(x)=A\cos(\sqrt{\lambda}x)+B\sin(\sqrt{\lambda}x)[/tex]
Using the boundary conditions yields [itex]A=0, \lambda=\pi^{2}[/itex]
whereas a suitable B can be found by the constraint:
[tex]B^{2}\pi^{2}\int_{0}^{1}\cos^{2}({\pi}x)dx=1\to{B}=\pm\frac{\sqrt{2}}{\pi}[/tex]
 
Last edited:
spock0149 said:
Hmmmm, I need to find the maximum value, is there one?

I have a bad habit of not reading people's question fully before answering. Let me now officially make the resolution to kick this habit. Ok, I feel better now.
 
Awesome post Arildno.

This really have me somewhere to start and using this I could actually figure out what my math book was (not) explaining to me.

One thing, in your first line you subtract the term containing the lagrange multiplier, and then directly after that you add it.

Was this a mistake or is there something I'm just not getting.

Also, is the maximum value of the function just when Cos(x) goes to 1?

Thanks again.
 
Oh ok thanks.

Well, the question asked for the maximum value of the function A[y(x)] and so as we discovered the the function was:

[tex]\frac{\sqrt 2}{\pi}sin(\sqrt\lambda x)[/tex]

so is the maximum value when the sin term goes to 1?
 
No, first of all:
A(y(x)) is a SCALAR, not a function!

We have, for the extremum function satisfying the given constraint:
[tex]\hat{A}(y)=\frac{\sqrt{2}}{\pi}\int_{0}^{1}\sin^{2}(\pi{x})dx=\frac{1}{\sqrt{2}\pi}[/tex]

Furthermore, it is provable that this represents a local MINIMUM, not a maximum.
 
Is that because the second derivative of y is positive?

Hold on, If y^2 is sin^2 then the second derivative will be negative won't it?

Thanks for your patience with me.

:)
 
Actually I want to verify a small sign mistake with you that alters the solution:

The integrand should read:

[tex]g=y^2+\lambda({\frac{\partial y}{\partial x}}^2-1)[/tex]
and the euler lagrange equations are:
[tex]\frac{\partial g}{\partial y}-\frac{d}{dx}{\frac{\partial g}{dy'}}=0[/tex]

Which gives us

[tex]y-\lambda y''=0[/tex]

Which has exponential solutions:

[tex]Ae^{\sqrt{\lambda}x}+Be^{-\sqrt{\lambda}x}[/tex]

Could you possibly verify this?

Thank-you
 
Well, that's true enough if you use the plus sign, rather than the minus sign. In that case, the solution of the boundary value problem requires imaginary square root of lambda in order to provide a non-zero solution.
The complex exponential is, of course, directly related to the trig. functions.
Thereby, you get the solution I gave you using the minus sign.
 
Last edited:
Hmmm...am I right in saying that its up to you which sign you give lambda?

I prefer your solution by the way! ;)

Oh, one last thing: You mentioned that:

[tex]\lambda=\pi^2[/tex]

Should this be [tex]\lambda=n^2\pi^2[/tex]

Or can we forget about the n?
 
Last edited:
spock0149 said:
Hmmm...am I right in saying that its up to you which sign you give lambda?
No, it isn't. When applying the boundary conditions, the only viable exponential function is a complex choice (imaginary square root of lambda). Just try it!

I have to bit back what I said about the stationary function being a minimum, it is only a saddle point. Sorry about that; I got confused by my own sign mistake..
 
Ok:

[tex]y=Ae^{\sqrt{\lambda}x}+Be^{-\sqrt{\lambda}x}[/tex]

Applying BC's

[tex]y(0)=0[/tex]

So, A=0

And [tex]y(1)=0[/tex]
So
[tex]0=Be^{-\sqrt \lambda}[/tex]

Writing out as hyperbolic functions:

[tex]B(sinh(-\sqrt\lambda)+cosh(-\sqrt\lambda)=0[/tex]

This gives us:

[tex]-tanh(\sqrt\lambda)=0[/tex]

I'm getting lost now...
 
I think we typed our questions at the same time!
 
Arildno?

Need your advice here buddy!

:)
 
I've answered that question previously;
The only way(s) to get a non-zero solution in the exponential case is by setting [tex]\lambda^{2}=-n^{2}\pi^{2}[/tex]
 
Sure, but your solution contained the Cos and Sin term, but then we realized there was a sign error and this gave Sinh and Cosh solutions and

I wanted to confirm with you that this was correct (see post 17 for modified solution).
 
Hi Arildno,

Let me show you what I've got so far:

[tex]\hat{A}=\int_{0}^{1}y^{2}dx+\lambda(\int_{0}^{1}(\frac{dy}{dx})^{2}dx-1)=\int_{0}^{1}(y^{2}+\lambda((\frac{dy}{dx})^{2}-1))dx,y(0)=y(1)=0, \int_{0}^{1}(\frac{dy}{dx})^{2}dx-1=0[/tex]
 
lol, I am sorry. I was editing the post then got distracted by a phone call.