How Do You Solve a 2nd Order ODE Using Matlab?

  • Context: MATLAB 
  • Thread starter Thread starter amir99civil
  • Start date Start date
  • Tags Tags
    2nd order Matlab Ode
Click For Summary

Discussion Overview

The discussion centers around solving a second-order ordinary differential equation (ODE) using MATLAB. Participants explore the formulation of the equation, the necessary transformations to first-order form, and the application of MATLAB for numerical solutions. The context includes technical aspects of modeling and simulation in engineering applications.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant presents a second-order ODE in matrix form but initially lacks clarity on the representation of zeros in the equation.
  • Another participant suggests using LaTeX for clearer formatting of the equation.
  • A participant corrects the original equation by indicating the need for velocity terms after the damping and stiffness matrices.
  • There is a proposal to convert the second-order ODE into a first-order system, with suggestions on how to represent the variables.
  • One participant expresses uncertainty about how to handle the matrices when transforming to first-order form.
  • Another participant outlines the transformation process by defining new variables for the first-order equations.

Areas of Agreement / Disagreement

Participants generally agree on the need to convert the second-order ODE into a first-order system for solving in MATLAB. However, there is no consensus on the specific steps or methods to achieve this transformation, and some uncertainty remains regarding the representation of the equation.

Contextual Notes

Limitations include potential misunderstandings in the representation of the original equation, the need for clarity in variable definitions, and the specifics of MATLAB implementation that are not fully explored in the discussion.

amir99civil
Messages
3
Reaction score
0
Dear All,

I have a Problem about a 2nd order ode. I don't know how it can be solved with Matlab. If someone know about it then please let me know. I need to get the values of x & y. All other values are known.

The equation is:

[ M + mf mf
mf mf ][ ¨x
¨y ]+
[ C 0
0 cf ][ x˙
y˙ ]+[ K 0
0 kf][ x
y ] = [ Fe(t)
0 ]

Thanks a lot
 
Physics news on Phys.org
you are going to have to make the equation more clear. What are all the 0s? Try to put it up in tex.
 
I think this is how it's supposed to look:
[tex]\left(<br /> \begin{array}{cc}<br /> M + m_f & m_f \\<br /> m_f & m_f<br /> \end{array}<br /> \right)<br /> \left(<br /> \begin{array}{cc}<br /> \ddot{x} \\<br /> \ddot{y}<br /> \end{array}<br /> \right) +<br /> \left(<br /> \begin{array}{cc}<br /> C & 0 \\<br /> 0 & c_f<br /> \end{array}<br /> \right)<br /> \left(<br /> \begin{array}{cc}<br /> x\\<br /> y<br /> \end{array}<br /> \right) +<br /> \left(<br /> \begin{array}{cc}<br /> K & 0 \\<br /> 0 & k_f<br /> \end{array}<br /> \right) =<br /> \left(<br /> \begin{array}{cc}<br /> F_{e}(t)\\<br /> 0<br /> \end{array}<br /> \right)[/tex]

I don't know how to use MATLAB to solve it, though.
 
Last edited:
There should be an [tex]\dot{x}[/tex] after the damping terms (c's) and an [tex]x[/tex] after the stiffness terms (k's)...

For the simulation, first write it in first-order form.

It's quite simple to solve this forced msk system as an IVP in Matlab, check the help files on odes...

:smile:
 
yes. This is an equation of motion for a Tuned Liquid Column Damper with (xdot & ydot) after damping terms and (x & y) after the stiffness matrix.I don't know how i can handle the matrics if i change it to first order. If you know something then please explain a little more about the problem. How to handle the matrics to get a first order system.

The zeros 0s are 0.There is no entry where there is zero.
 
Write:

[tex]u=\dot{x}[/tex] and [tex]v=\dot{y}[/tex]

then...

[tex]\dot{u}=\ddot{x}[/tex] and [tex]\dot{v}=\ddot{y}[/tex]

ie. you now have 4 first-order equations.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K