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

4 views (last 30 days)
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 Comments
Roger Stafford
Roger Stafford on 22 Dec 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

Sign in to comment.

Answers (1)

Steve Miller
Steve Miller on 21 Dec 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

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!