Simple Pendulum motion - Numerical Integration

Click For Summary

Homework Help Overview

The discussion revolves around the numerical integration of the differential equation governing the motion of a simple pendulum, specifically the equation \(\ddot{\theta} = -\frac{g}{L} \sin{\theta}\). Participants are tasked with determining the time required for the pendulum to reach a specific position, given certain parameters and initial conditions.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation, Assumption checking

Approaches and Questions Raised

  • Participants discuss various numerical methods, including Euler's method and the 4th order Runge-Kutta method, for solving the second-order differential equation. Questions arise regarding the appropriate use of linear versus non-linear approximations, particularly in relation to the initial conditions provided.

Discussion Status

The discussion is active, with participants exploring different methods and clarifying the formulation of the problem. Some guidance has been offered regarding the setup of the Runge-Kutta method and the interpretation of the equations involved. There is ongoing inquiry into the specifics of implementing these methods.

Contextual Notes

Participants are navigating the complexities of numerical integration for a non-linear system, with specific attention to the implications of initial conditions and the validity of approximations. The original poster expresses uncertainty about the calculations and the methods to employ, indicating a need for further clarification.

Alexanddros81
Messages
177
Reaction score
4

Homework Statement


The differential equation of motion for the simple pendulum can be shown to be
##\ddot {θ} = -(g/L)sinθ##. Given that L=9.81 m and that the pendulum is released
from rest at θ=60deg, determine the time required for the pendulum to reach the position
θ=0deg. Use Δt=0.10s, and compare your answer with the analytical solution of 1.686s

Fig P13_81.png

Homework Equations

The Attempt at a Solution



Pytels_Dynamics095.jpg


I guess I am missing something...
I need to compute θ value? How do I do that? Do I find θ by using x, L, s ?
 

Attachments

  • Fig P13_81.png
    Fig P13_81.png
    7.2 KB · Views: 1,095
  • Pytels_Dynamics095.jpg
    Pytels_Dynamics095.jpg
    14.7 KB · Views: 1,389
Physics news on Phys.org
What method are you using? Eulers? What is your question for us?
 
Last edited:
Since ##u_{\theta} = \dot \theta##, ##\dot u_{\theta} = \ddot \theta##.
So, you are solving the equation ##\ddot \theta = -\sin{\theta}##. No need to introduce x or s.
 
  • Like
Likes   Reactions: scottdave
Hi.
Can you check the following if it is correct?
By reading on a Dover book regarding differential equations and browsing on the web
i give the following as a linear solution for the undamped pendulum problem for small angle θ.
Pytels_Dynamics096.jpg


Do I proceed with the linear equation of the pendulum equation or with non-linear for this
particular problem? (Initial condition for θ = 60deg)

Also I want to use the 4th order Runge-Kutta method.
 

Attachments

  • Pytels_Dynamics096.jpg
    Pytels_Dynamics096.jpg
    30.7 KB · Views: 888
With an initial condition of θ=60 degrees, θ in radians is 1.05, and sin(θ) = 0.866, so you can see that the small angle approximation fails badly. You need to use the full non-linear equation in your Runge-Kutta code. That is the whole point of the exercise. With the small angle approximation, the equation can be solved analytically and there is no need for numeric integration.
 
So the equivalent first-order diff.equations are

##u_θ=\dot {θ}## and ##\dot {u_θ} = -(g/L)sinθ##

Correct?
 
Alexanddros81 said:
So the equivalent first-order diff.equations are

##u_θ=\dot {θ}## and ##\dot {u_θ} = -(g/L)sinθ##

Correct?

Correct.
 
Pytels_Dynamics097.jpg


How do I implement the above runge-kutta 4th order to this specific problem?
I don't know how...

Is ##k1=f(θ_i)## ? and ## k2=f(θ_i + 1/2h) ## etc. ?
Is ##\dot {u} = f(θ)## ? (not according to the above)

Is ##k1=f(θ_ι, ω_i)## etc ?
 

Attachments

  • Pytels_Dynamics097.jpg
    Pytels_Dynamics097.jpg
    27.6 KB · Views: 729
  • #10
Since this is a second order problem, your yi's and k's are two component vectors, with the components being y_i = (\theta, \dot \theta). Here your function f(t, y_i) = f(t, (\theta, \dot \theta)) = (\dot \theta, -\frac{g}{L} \sin(\theta)). Note that f is independent of t, which simplifies things. So you start with y_0 = (\theta, \dot \theta) = (\theta_0, 0). So then k_1 = f(0,(\theta_0,0)) = (0, -\frac{g}{L} \sin(\theta_0)) , k_2 = f(h/2,y_0 + h/2*k_1) = f(h/2,(\theta_0,-\frac{g}{L} \sin(\theta_0)*h/2))=(-\frac{g}{L} \sin(\theta_0)*h/2, -\frac{g}{L} \sin(\theta_0)) and so on. Does this help?
 
  • #11
to phyzguy:
thanks this is the information I needed. Is there some more info related to this?
 
  • #12
A few questions:
1) since ##y_0 = (\theta, \dot \theta) = (\theta_0, 0)## we say that ##k_1 = f(0,(\theta_0,0)) = (0, -\frac{g}{L} \sin(\theta_0))##

the last expression for k1 is ##f(0,(\theta_0,0)) = (0, -\frac{g}{L} \sin(\theta_0))##
The above means that t=0 (first parameter) and ##y_0 = (\theta_0,0) = -\frac{g}{L} \sin(\theta_0)## (second parameter). Correct?

2) Is your expression for k2 correct? If yes how did you derived it?
 
  • #13
I think you're still not getting it. The function f returns the derivative of y, so since y = (\theta, \dot \theta), f(y) = (\dot \theta,-\frac{g}{L} \sin(\theta)). From there you just plug in. To find k2 you just plug in y_0 + \frac{h}{2} k1 into f. You wrote:

Alexanddros81 said:
##y_0 = (\theta_0,0) = -\frac{g}{L} \sin(\theta_0)## (second parameter).

The first equality is correct, but the second is not.

Here is a link which explains in more detail. Are you writing some computer code to do this? If so in what language? You might try defining the code, maybe that will help. Define a function f that takes y as its input, and define another function that does one RK4 step.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
1
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K