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

In summary, the conversation discusses a problem with a 2nd order ode and how to solve it using MATLAB. The equation is shown and it is suggested to write it in first-order form for easier solving. The conversation also mentions using the help files for odes and introduces the concept of using u and v as variables.
  • #1
amir99civil
3
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 Alot
 
Physics news on Phys.org
  • #2
you are going to have to make the equation more clear. What are all the 0s? Try to put it up in tex.
 
  • #3
I think this is how it's supposed to look:
[tex]\left(
\begin{array}{cc}
M + m_f & m_f \\
m_f & m_f
\end{array}
\right)
\left(
\begin{array}{cc}
\ddot{x} \\
\ddot{y}
\end{array}
\right) +
\left(
\begin{array}{cc}
C & 0 \\
0 & c_f
\end{array}
\right)
\left(
\begin{array}{cc}
x\\
y
\end{array}
\right) +
\left(
\begin{array}{cc}
K & 0 \\
0 & k_f
\end{array}
\right) =
\left(
\begin{array}{cc}
F_{e}(t)\\
0
\end{array}
\right)[/tex]

I don't know how to use MATLAB to solve it, though.
 
Last edited:
  • #4
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:
 
  • #5
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.
 
  • #6
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.
 

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

1. What is a second order ODE?

A second order ordinary differential equation (ODE) is a mathematical equation that involves a function and its derivatives up to the second order. It is used to model many physical phenomena in science and engineering.

2. How does Matlab help with solving second order ODEs?

Matlab is a powerful software that allows for easy and efficient numerical solutions of mathematical problems, including second order ODEs. It provides built-in functions and tools for solving various types of ODEs and can handle complex equations and systems.

3. What is the procedure for solving a second order ODE with Matlab?

The general procedure for solving a second order ODE with Matlab involves defining the equation, specifying initial conditions, selecting a suitable solver, and running the code. Matlab also allows for customization of the solution and plotting of the results.

4. Can Matlab handle boundary value problems for second order ODEs?

Yes, Matlab has functions and tools for solving both initial value problems and boundary value problems for second order ODEs. The choice of solver and input parameters may vary depending on the type of problem, but Matlab can handle both with ease.

5. Are there any limitations to solving second order ODEs with Matlab?

While Matlab is a powerful tool for solving second order ODEs, there are some limitations to keep in mind. It may not be suitable for solving certain types of stiff or highly nonlinear equations, and the accuracy of the solutions may depend on the choice of solver and input parameters.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
850
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Replies
4
Views
688
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
Back
Top