Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculus of variations question

  1. Sep 28, 2006 #1
    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: Sep 28, 2006
  2. jcsd
  3. Sep 28, 2006 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Euler Lagrange equations find 'extreme' values- either max or min- just like the derivative test in calclulus.
     
  4. Sep 28, 2006 #3
    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: Sep 28, 2006
  5. Sep 28, 2006 #4

    StatusX

    User Avatar
    Homework Helper

    y=0 certainly extremizes (in this case minimizes) the integral of y^2, so that looks right.
     
  6. Sep 29, 2006 #5
    Hmmmm, I need to find the maximum value, is there one?
     
  7. Sep 29, 2006 #6

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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: Sep 29, 2006
  8. Sep 29, 2006 #7

    StatusX

    User Avatar
    Homework Helper

    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.
     
  9. Oct 4, 2006 #8
    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.
     
  10. Oct 5, 2006 #9

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Just a typo on my part.
    I don't get your second question.
     
  11. Oct 5, 2006 #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:

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

    so is the maximum value when the sin term goes to 1?
     
  12. Oct 5, 2006 #11

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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.
     
  13. Oct 5, 2006 #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.

    :)
     
  14. Oct 5, 2006 #13
    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
     
  15. Oct 5, 2006 #14

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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: Oct 5, 2006
  16. Oct 5, 2006 #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:

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

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

    Or can we forget about the n?
     
    Last edited: Oct 5, 2006
  17. Oct 5, 2006 #16

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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..
     
  18. Oct 5, 2006 #17
    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...
     
  19. Oct 5, 2006 #18

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    You can perfectly well use the n as well, so you have multiple stationary points for this problem, one for each n.
     
  20. Oct 5, 2006 #19
    I think we typed our questions at the same time!
     
  21. Oct 6, 2006 #20
    Arildno?

    Need your advice here buddy!

    :)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Calculus of variations question
Loading...