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

4 ビュー (過去 30 日間)
William Stenzel
William Stenzel 2012 年 12 月 22 日
回答済み: Steve Miller 2022 年 12 月 21 日
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 件のコメント
Walter Roberson
Walter Roberson 2012 年 12 月 22 日
You could convert theta to radians, or you could use sind() instead of sin()
Roger Stafford
Roger Stafford 2012 年 12 月 22 日
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

サインインしてコメントする。

回答 (1 件)

Steve Miller
Steve Miller 2022 年 12 月 21 日
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

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by