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

In summary: I forgot to add the cos() term.In summary, the Lagrange equations give a nonlinear solution in the form:A\cdot \phi '+C\cdot cos(\phi )sin(\phi )+E sin(\phi )cos( \phi )where A, B, and C are constants.This solution can be approximated numerically by the bvp solver of Matlab.
  • #1
dirk_mec1
761
13
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:
Physics news on Phys.org
  • #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.
 
  • #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:
  • #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.
 
  • #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().
 
  • #6
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?
 
  • #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?
 
  • #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:
  • #9
dirk_mec1 said:
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?
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.
 

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

1. What is the purpose of using cos()^2 in minimization?

Cos()^2 is a mathematical function that is commonly used in minimization problems to represent the squared cosine of an angle. It is useful for finding the minimum value of a function, as it can help identify critical points and the overall shape of the curve.

2. How is cos()^2 used in optimization algorithms?

Cos()^2 is often used in optimization algorithms, such as gradient descent, to minimize a given function. It is used to calculate the slope of the function at a given point, and this information is then used to determine the direction in which the algorithm should move to find the minimum value.

3. What is the difference between cos()^2 and cos()?

Cos()^2 and cos() are both trigonometric functions, but they have different properties. Cos()^2 represents the squared cosine of an angle, while cos() represents the cosine of an angle. In minimization problems, cos()^2 is often used to find the minimum value of a function, while cos() is used to calculate the length of a side in a right triangle.

4. Can cos()^2 be used in any type of minimization problem?

Yes, cos()^2 can be used in a variety of minimization problems, including those involving single-variable and multi-variable functions. It is particularly useful in problems involving periodic functions, as it can help identify the minimum and maximum values of the function over a given period.

5. Are there any limitations to using cos()^2 in minimization?

Like any mathematical function, there may be limitations to using cos()^2 in minimization problems. It is important to understand the properties and behavior of cos()^2 in order to effectively use it in optimization algorithms. Additionally, it may not always be the most appropriate function for a given problem and other methods may need to be considered.

Similar threads

  • Topology and Analysis
Replies
9
Views
1K
Replies
2
Views
1K
  • Topology and Analysis
Replies
4
Views
287
  • Math POTW for Graduate Students
Replies
1
Views
984
Replies
3
Views
669
  • Introductory Physics Homework Help
Replies
4
Views
234
Replies
1
Views
822
  • Calculus and Beyond Homework Help
Replies
3
Views
573
  • Special and General Relativity
Replies
7
Views
436
  • Advanced Physics Homework Help
Replies
1
Views
451
Back
Top