Solving a Coupled Trigonometric ODE System in MATLAB?

  • Context: Graduate 
  • Thread starter Thread starter a.mlw.walker
  • Start date Start date
  • Tags Tags
    2nd order Linear Ode
Click For Summary

Discussion Overview

The discussion revolves around solving a coupled system of second-order nonlinear ordinary differential equations (ODEs) in MATLAB, specifically involving trigonometric relationships between variables. Participants explore methods to incorporate these relationships into the equations of motion.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant expresses difficulty in formulating the coupled equations due to their nonlinear nature and the trigonometric relationships involved.
  • Another participant requests clarification by asking for the specific equations to better understand the problem.
  • A later reply suggests using Lagrange multipliers as a method to handle the constraints without substituting them directly into the equations of motion.
  • The original problem is described as involving two pistons connected to a flywheel, with one piston experiencing an external force and both undergoing damping, which adds complexity to the equations.
  • There is mention of the challenges in correctly performing the necessary differentials, indicating that the equations can become quite complex.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to solve the problem, as there are differing suggestions regarding the use of Lagrange multipliers and the need for more information about the equations.

Contextual Notes

Limitations include the lack of specific equations initially provided, which may hinder the ability to fully analyze the problem. The discussion also highlights the complexity of the mathematical relationships involved.

Who May Find This Useful

Individuals interested in solving nonlinear ODEs, particularly in mechanical systems involving constraints, may find this discussion relevant.

a.mlw.walker
Messages
144
Reaction score
0
So I have never solved a second order NON LINEAR ode before, but my current project has thrown one at me.

I am going to use MATLAB to solve it when I have it in the correct state, but at the mo, I can't get it to that...
Its three coulped equations, in terms of x,theta and x2. They are in a matrix, ma + cv + kx = force

for each one.

The way they are coupled though is a trigonometric relationship between x and theta and x2.

I.E
theta = f(x)
x2 = f(x)
and x changes with time.

What should I do to include this relationship?
 
Physics news on Phys.org
The question is too vague. Post the equations
 
OK.
Please see attached PDF. It was easier to do it in word than using latex.

Doing all those differentials correctly is very difficult, and it quicly becomes quite ugly.
 

Attachments

Sorry, but I think I don't understand where the constraint between [tex](\theta,x_{2},x)[/tex] is coming. Could you post the original problem? Anyway, instead of explicitly using the constraints in the equations of motion, you might try using lagrange multipliers, which work better in this cases. Add this to your lagrangian:

[tex]\Lambda_{1}[x_{2}-rSin\theta+\sqrt{l^{2}-r^{2}Cos\theta}]+\Lambda_{2}[2rxCos\theta-x^{2}+l^{2}-r^{2}][/tex]

And derive the equations of motion without substituing the constraints. When simulating, the equations for the evolution of the unknowns [tex]\Lambda_{1,2}[/tex] are [tex]\dot{\Lambda_{1,2}}=0[/tex], as they are constants
 
The original problem is two pistons attached to one flywheel, where one of them has an applied force on it, and both are experiencing dampening, x is the displacement of the piston experiencing the external force, and x2 is the displacement on the other piston (attached image).

then the equations I posted before have come from this diagram.

I haven't heard of Lagrange multipliers, i shall look them up
 

Attachments

  • two pistons.jpg
    two pistons.jpg
    10.8 KB · Views: 433

Similar threads

  • · Replies 28 ·
Replies
28
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K