Ok, so while I understand 2nd Order ODEs... I really don't understand MATLAB.(adsbygoogle = window.adsbygoogle || []).push({});

I have 2 questions that I just can't get any code to work for:

1

Question: Consider the model of an undampened spring-mass system with a time-dependent spring constant k(t) given by:

d2y/dt2 + k(t)y = 0,

Use the ODE45-solver to obtain the solution curves satisfying the initial conditions on interval [0, 100] and function k(t). Predict the behavios as t approaches infinity and discuss the nature of the oscillations (if any)

1) y(0) = 1, y'(0) = 1, k(t) = cos(t)

2) y(0) = 1, y'(0) = 1, k(t) = 1+t^2

---------------

2

Question: Consider the following model for a linear mass-spring system with damping and forcing:

d2y/dt2 + (1/5)(dy/dt) + (1/5)y = coswt, y(0) = 0, y'(0) = 0

1) Use ODE45-solver to obtain the solution curves for values of w = 0.5, 1, 1.5, 2. Plot the solutions and estimate the amplitudeAof the steady response in each case.

2) Using the data from part 1), plot the graph ofAversus w. For what w is the amplitude greatest?

---------------

I know how to use ODE45 to solve a 1st Order ODE and I know how to use other parts of MATLAB (tspan, y0, plot, etc.) but I have no idea how to approach this problem (mainly due to the 2nd Order ODE) nor has my professor been the best teacher when it comes to MATLAB.

Thanks!

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# 2nd Order ODE in MATLAB help

Loading...

Similar Threads - Order MATLAB help | Date |
---|---|

Matlab Simulink: designing a 2nd order sliding controller | Jul 5, 2017 |

Matlab help - 2nd order ODE | Mar 12, 2015 |

[Matlab] Order of precedence in computations | Jul 30, 2014 |

Coupled 1st order differential equations in matlab | May 1, 2014 |

Help with Matlab solving second order differential equations | Oct 19, 2010 |

**Physics Forums - The Fusion of Science and Community**