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

Minimization with cos()^2

  1. Mar 13, 2015 #1
    I'm trying to find a increasing postive function [itex]\phi (x) [/itex] that minimizes the following integral for x in [0, L]:

    [tex] \int_0^L A \frac{ d ^2 \phi (x) } {dx^2}+ (B +C cos( \phi (x)) ^2 \mbox{d}x [/tex]

    with A and B real positve numbers and
    [itex]\phi (0) =0 [/itex]
    [itex]\phi ' (L) =0 [/itex]

    When I use the the Lagrange equations I get:

    [tex] \phi '' (x) + D sin(\phi (x) ) + E sin(\phi (x) ) cos( \phi (x) ) = 0 [/tex]

    with D and E a constant.


    Is this correct?

    Can I find a numerical solution for this nonlinear ODE?
     
    Last edited: Mar 13, 2015
  2. jcsd
  3. Mar 13, 2015 #2
    I think there are problems with the integral, first of all first term in the integral is not in the differential form, secondly shouldn't the action be an integral taken by time dt instead of coordinate dx? Otherwise I'm not sure you can use Lagrangian to minimize that integral, I might be wrong. And one more thing, Lagrangian should not be dependent on the second derivatives.
     
  4. Mar 13, 2015 #3
    Yes only the x-coordinate is applicable. The first term should be a square.

    [tex] \int_0^L A \left( \frac{ d \phi (x) } {dx} \right) ^2 + (B +C cos( \phi (x)) ^2 \mbox{d}x [/tex]

    A, B and C are constants.

    Can I use a numerical solver like Runge-Kutta for the solution (as I posted in the first post)?
     
    Last edited: Mar 13, 2015
  5. Mar 13, 2015 #4
    Square of derivative is not same as second derivative and parentheses are missing:

    [tex] \int_0^L ( A \left( \frac{ d \phi (x) } {dx} \right) ^2 + (B +C cos( \phi (x)) ^2 \mbox ) {d}x [/tex]

    Applying Euler-Lagrange equation which has a form:

    [tex] \frac{d}{dx}\frac{\partial L}{\partial \frac{d\phi }{dx}}-\frac{\partial L}{\partial \phi }=0 [/tex]

    What I get is

    [tex] A\cdot \phi \:''+C\cdot cos\left(\phi \:\right)sin\left(\phi \:\right)=0 [/tex]

    And sure, you can now apply numerical analysis to solve this.
     
  6. Mar 16, 2015 #5
    Yes I forgot brackets. I am pretty sure you forgot a term.

    If you work out the second squared term you'll get this:

    [tex] B^2 +2BCcos( \phi) + C^2 cos( \phi ) [/tex]

    Which will lead to a sin() and a sin()*cos().
     
  7. Mar 16, 2015 #6
    Ups, sorry, I did. Did you figure out how to do the numerical approximation?
     
  8. Mar 17, 2015 #7
    Yes, I can use the bvp solver of Matlab. If I want to so this by hand I have to use finite elements, right?
     
  9. Mar 17, 2015 #8
    If D is some function of x is it still possbile to solve this numerically? Thus:

    [tex]\phi '' (x) + D(x) sin(\phi (x) ) + E sin(\phi (x) ) cos( \phi (x) ) = 0[/tex]

    Or do I have to use finite elements?
     
    Last edited: Mar 17, 2015
  10. Mar 23, 2015 #9
    If D is not constant you should have took care of it when writing Euler-Lagrange equation by applying derivative to it too.
     
  11. Mar 24, 2015 #10
    No, because it is only dependent on x and not of phi(x).
     
  12. Mar 27, 2015 #11
    Oh, you're right again.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Minimization with cos()^2
  1. Ker[cos(x)] Analysis (Replies: 2)

  2. Minimization with cos (Replies: 9)

Loading...