Getting started solving ODE's - solve m [d^2(theta)/dt^2] + c [d(theta)/dt^2] + k sin(theta) = 0

4 visualizzazioni (ultimi 30 giorni)
Hi all, I'm just starting to learn to solve ODE's and this is a practise question from the internet on a pendulum. given -
Pendulum motion equation=
m [d^2(theta)/dt^2] + c [d(theta)/dt^2] + k sin(theta) = 0
m = 2kg c = 0.1 k = mg/L g= 9.81m/s/s L = 1m
initial condition at t=0, theta= 60deg
I'm basically wondering if I should go about solving this in MATLAB using a numerical approach like I would on paper, or if there an easier way? (preferably looking for the easier way). Also confused by theta in the equation and weather i need to do anything special like converting the eq to radians first? Thanks in advance!
  2 Commenti
Walter Roberson
Walter Roberson il 22 Dic 2012
You could convert theta to radians, or you could use sind() instead of sin()
Roger Stafford
Roger Stafford il 22 Dic 2012
I think you have no choice but to solve it numerically. Even without the friction term in the middle this differential equation leads to elliptic integrals - see the site
You should therefore make a careful study of the 'ode' family of matlab functions for solving differential equations numerically.
In answer to your question, yes, indeed theta, the angle of the pendulum to the vertical, is to be represented in terms of radians. If you multiply the equation by 'L', the length of the pendulum, the quantity L*theta represents distance measured along the circular path only if theta is in radians, not degrees. The quantity L*d^2theta/dt2 would therefore be acceleration and m*g*sin(theta) the component of the force of gravity on the bob tangent to the circle. The middle term is an approximation to air and other friction effects. Thus, this is simply Newton's law of motion F = m*a applied to the circular pendulum path.
Roger Stafford

Accedi per commentare.

Risposte (1)

Steve Miller
Steve Miller il 21 Dic 2022
As mentioned by Roger above:
I think you have no choice but to solve it numerically. Even without the friction term in the middle this differential equation leads to elliptic integrals - see the site
You should therefore make a careful study of the 'ode' family of matlab functions for solving differential equations numerically.
In answer to your question, yes, indeed theta, the angle of the pendulum to the vertical, is to be represented in terms of radians. If you multiply the equation by 'L', the length of the pendulum, the quantity L*theta represents distance measured along the circular path only if theta is in radians, not degrees. The quantity L*d^2theta/dt2 would therefore be acceleration and m*g*sin(theta) the component of the force of gravity on the bob tangent to the circle. The middle term is an approximation to air and other friction effects. Thus, this is simply Newton's law of motion F = m*a applied to the circular pendulum path.
Roger Stafford

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by