How Can a Positive Increasing Function Minimize a Cosine-Squared Integral?

  • Thread starter Thread starter dirk_mec1
  • Start date Start date
  • Tags Tags
    Minimization
dirk_mec1
Messages
755
Reaction score
13
I'm trying to find a increasing postive function \phi (x) that minimizes the following integral for x in [0, L]:

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

with A and B real positve numbers and
\phi (0) =0
\phi ' (L) =0

When I use the the Lagrange equations I get:

\phi '' (x) + D sin(\phi (x) ) + E sin(\phi (x) ) cos( \phi (x) ) = 0

with D and E a constant.Is this correct?

Can I find a numerical solution for this nonlinear ODE?
 
Last edited:
Physics news on Phys.org
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.
 
Yes only the x-coordinate is applicable. The first term should be a square.

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

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:
Square of derivative is not same as second derivative and parentheses are missing:

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

Applying Euler-Lagrange equation which has a form:

\frac{d}{dx}\frac{\partial L}{\partial \frac{d\phi }{dx}}-\frac{\partial L}{\partial \phi }=0

What I get is

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

And sure, you can now apply numerical analysis to solve this.
 
Yes I forgot brackets. I am pretty sure you forgot a term.

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

B^2 +2BCcos( \phi) + C^2 cos( \phi )

Which will lead to a sin() and a sin()*cos().
 
dirk_mec1 said:
I am pretty sure you forgot a term.

Ups, sorry, I did. Did you figure out how to do the numerical approximation?
 
Yes, I can use the bvp solver of Matlab. If I want to so this by hand I have to use finite elements, right?
 
If D is some function of x is it still possbile to solve this numerically? Thus:

\phi '' (x) + D(x) sin(\phi (x) ) + E sin(\phi (x) ) cos( \phi (x) ) = 0

Or do I have to use finite elements?
 
Last edited:
dirk_mec1 said:
If D is some function of x is it still possbile to solve this numerically? Thus:

\phi '' (x) + D(x) sin(\phi (x) ) + E sin(\phi (x) ) cos( \phi (x) ) = 0

Or do I have to use finite elements?
If D is not constant you should have took care of it when writing Euler-Lagrange equation by applying derivative to it too.
 
  • #10
No, because it is only dependent on x and not of phi(x).
 
  • #11
dirk_mec1 said:
No, because it is only dependent on x and not of phi(x).
Oh, you're right again.
 
Back
Top