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

spock0149
Messages
31
Reaction score
0
I need to find the maximum value of

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

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

\int_{0}^{1}(\frac{dy}{dx})^2=1

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
Euler Lagrange equations find 'extreme' values- either max or min- just like the derivative test in calclulus.
 
Hmmm. so how does this sound:

\frac{\partial f}{\partial y} - \frac{\partial}{\partial x}\frac{\partial f}{\partial y_x}=0

and we have

f=y^2

so then

2y-0 = 0

So y=0

I don't think this is correct. What is the approach please?
 
Last edited:
y=0 certainly extremizes (in this case minimizes) the integral of y^2, so that looks right.
 
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:
\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
where lambda is the Lagrange multiplier.
The associated Euler-Lagrange equation is therefore:
2y+2\lambda\frac{d^{2}y}{dx^{2}}=0\to{y}(x)=A\cos(\sqrt{\lambda}x)+B\sin(\sqrt{\lambda}x)
Using the boundary conditions yields A=0, \lambda=\pi^{2}
whereas a suitable B can be found by the constraint:
B^{2}\pi^{2}\int_{0}^{1}\cos^{2}({\pi}x)dx=1\to{B}=\pm\frac{\sqrt{2}}{\pi}
 
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.
 
Just a typo on my part.
I don't get your second question.
 
  • #10
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:

\frac{\sqrt 2}{\pi}sin(\sqrt\lambda x)

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

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

Furthermore, it is provable that this represents a local MINIMUM, not a maximum.
 
  • #12
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.

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

The integrand should read:

g=y^2+\lambda({\frac{\partial y}{\partial x}}^2-1)<br />
and the euler lagrange equations are:
\frac{\partial g}{\partial y}-\frac{d}{dx}{\frac{\partial g}{dy&#039;}}=0

Which gives us

y-\lambda y&#039;&#039;=0

Which has exponential solutions:

Ae^{\sqrt{\lambda}x}+Be^{-\sqrt{\lambda}x}

Could you possibly verify this?

Thank-you
 
  • #14
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:
  • #15
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:

\lambda=\pi^2

Should this be \lambda=n^2\pi^2

Or can we forget about the n?
 
Last edited:
  • #16
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..
 
  • #17
Ok:

y=Ae^{\sqrt{\lambda}x}+Be^{-\sqrt{\lambda}x}

Applying BC's

y(0)=0

So, A=0

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

Writing out as hyperbolic functions:

B(sinh(-\sqrt\lambda)+cosh(-\sqrt\lambda)=0

This gives us:

-tanh(\sqrt\lambda)=0

I'm getting lost now...
 
  • #18
You can perfectly well use the n as well, so you have multiple stationary points for this problem, one for each n.
 
  • #19
I think we typed our questions at the same time!
 
  • #20
Arildno?

Need your advice here buddy!

:)
 
  • #21
I've answered that question previously;
The only way(s) to get a non-zero solution in the exponential case is by setting \lambda^{2}=-n^{2}\pi^{2}
 
  • #22
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).
 
  • #23
No, the sign "error" was the plus sign.
I answered this in 14.
 
  • #24
Hi Arildno,

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

\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
 
  • #25
I said I meant to use the minus sign!
How many times must I tell you that.
 
  • #26
lol, I am sorry. I was editing the post then got distracted by a phone call.
 

Similar threads

Back
Top