Ordinary differential equations for a buckled column

I am unsure on how to do this question could someone please show me how to do it.
The transverse vibration of a buckled column under the effect of an external periodic force is
described by the ordinary differential equation (ODE).
d^2x/dt^2 + βdx/dt −[1 + μcos(ωt)]x + x3 = 0,
where x is the positionn, t is the time, T is the final time, β = 0.21 is a damping parameter
and the parameters μ = 0.29 and ω = 1 define the periodic forcing term.
The initial value problem is completed with the following initial conditions corresponding to
the initial position and the initial velocity
x(0) = 0 m,
dx/dt (0) = v0 m/s
Create a Matlab function that, given the initial velocity v0 and the final time T, solves
the ODE and returns two vectors:
x: containing the value of the position from time 0 to time T.
v: containing the value of the velocity from time 0 to time T.
If anyone could show me how to do the code it would be a great help. Been pretty frustrated by this.

7 comentarios

This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
One small hint: look at ode45.
greg
greg el 19 de Jul. de 2022
b = 0.21
u = 0.29
w = 1
(d^2x/dt^2)+b*(dx/dt)-[1+u*cos(wt)]x+x^3=0
This is the code i have written so far. How do i split the differentiation up to allow me to use the ode45?
Sam Chak
Sam Chak el 19 de Jul. de 2022
Editada: Sam Chak el 19 de Jul. de 2022
Hi @greg, can you convert it into the state-space model? Because your code is no where similar to the example pointed out by @Steven Lord.
Are you 100% sure that your code is referred from the ode45 documentation?
If you have trouble accessing the code in the documentation, please specify and let us help.
No, the poster's code is not the same as the code from the ode45 documentation. Their code won't actually run. But I believe that they should be able to adapt the documentation example to solve their problem, which is why I directed them to look at the example.
greg
greg el 19 de Jul. de 2022
I dont have access to the code. i am trying to do practise questions for revision however the questions we have been given do not come with any answers.
Torsten
Torsten el 19 de Jul. de 2022
I dont have access to the code.
Don't you have access to internet ?
Example: Solve Nonstiff Equation
greg
greg el 19 de Jul. de 2022
Editada: greg el 19 de Jul. de 2022
factor1 = -1+cos(wt)+x^3
factor2 = b
dydt = [x(2); (factor2*x(1))- (factor1)];
a = linspace(0,T,50);
[v0,T] = ode45
Does this look any closer to being right?

Iniciar sesión para comentar.

Respuestas (1)

Steven Lord
Steven Lord el 19 de Jul. de 2022
The "Solve Nonstiff Equation" example on the ode45 documentation page bears some resemblance to your ODE if you replace in the example with x in your problem. See if you can adapt that example to solve your problem instead.

Categorías

Más información sobre Oceanography and Hydrology en Centro de ayuda y File Exchange.

Preguntada:

el 19 de Jul. de 2022

Editada:

el 19 de Jul. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by