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

  • Context: Graduate 
  • Thread starter Thread starter dirk_mec1
  • Start date Start date
  • Tags Tags
    Minimization
Click For Summary
SUMMARY

The discussion focuses on minimizing the integral of a positive increasing function \(\phi(x)\) defined over the interval [0, L]. The integral involves constants A, B, and C, and the Euler-Lagrange equation is applied to derive the corresponding ordinary differential equation (ODE). Participants confirm that numerical methods, such as the Runge-Kutta method and MATLAB's bvp solver, can be utilized to solve the nonlinear ODE. The conversation also addresses the implications of variable coefficients in the differential equation and the necessity of finite element methods for certain cases.

PREREQUISITES
  • Understanding of calculus, specifically integration and differentiation
  • Familiarity with the Euler-Lagrange equation
  • Knowledge of numerical methods, particularly Runge-Kutta and boundary value problem (BVP) solvers
  • Basic concepts of finite element analysis
NEXT STEPS
  • Explore the application of the Euler-Lagrange equation in variational problems
  • Learn about numerical methods for solving ordinary differential equations, focusing on Runge-Kutta
  • Investigate MATLAB's bvp solver for boundary value problems
  • Study finite element methods and their application in solving differential equations with variable coefficients
USEFUL FOR

Mathematicians, physicists, and engineers interested in optimization problems, numerical analysis, and the application of variational principles in differential equations.

dirk_mec1
Messages
755
Reaction score
13
I'm trying to find a increasing positive 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.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K