Classical mechanics & runge-kutta

In summary, the conversation discussed solving a physics problem involving a pendulum in a car being pulled with a constant force or connected to a spring with a force equation. The goal is to use two differential equations to calculate the values for x(t) and theta(t) using Rugne-Kutta. The problem is that the equations have two independent variables, but the general approach is to convert them into a system of linear first order differential equations. A resource for implementing this method in C is available online.
  • #1
gulsen
217
0
We have a pendullum in a car, that is being pulled with:
a) constant F force
b) connectec to a spring, with force F = -kx

The physics part is done, and we have 2 differential equations (non-lineer), and we're supposed to write a C program to calculate theta(t) and x(t) from them. We should solve them with Rugne-Kutta. Here they are:

[tex](M+m)x'' + mL\theta''cos(\theta) - mL(\theta')^2 sin(\theta) - F = 0[/tex]
[tex]mL^2\theta'' + mLx''cos(\theta) + mgLsin(\theta) = 0[/tex]

The problem is, we've learned how to solve
[tex]f'' + p(t)f' + q(t)f + r(t) = 0[/tex]

but these equations have two independent variables. Now, what's the path to follow?

(note: yes, these two equations are confirmed to be enough to get values for x(t) and theta(t))
 
Physics news on Phys.org
  • #2
Numerical recipies in C is online now:

http://www.library.cornell.edu/nr/bookcpdf.html

The general approach is to convert your system of second order differential equations into a system of linear first order differential equations.

See for example

http://www.library.cornell.edu/nr/bookcpdf/c16-0.pdf

and later chapters.
 
Last edited by a moderator:
  • #3
I actually solved the simple pendulum this way in high school. What you need to do is use an RK4 to get [tex]\theta ' [/tex] and [tex]x'[/tex] from the second order equations, and then use the same RK4 to do a simple time integral of that velocity ([tex]dx = vdt[/tex]). At least, that's how I would do it.
 

Related to Classical mechanics & runge-kutta

1. What is classical mechanics?

Classical mechanics is a branch of physics that studies the motion of objects and the forces that act upon them. It is based on Newton's laws of motion and provides a framework for understanding the behavior of macroscopic objects.

2. What is the Runge-Kutta method?

The Runge-Kutta method is a mathematical algorithm used to solve ordinary differential equations. It is commonly used in numerical simulations of physical systems, including those described by classical mechanics.

3. How does the Runge-Kutta method work?

The Runge-Kutta method works by breaking down a differential equation into smaller, simpler steps. It uses a combination of weighted averages to approximate the solution at each step, resulting in a more accurate and efficient solution compared to other numerical methods.

4. What are the applications of classical mechanics and the Runge-Kutta method?

Classical mechanics and the Runge-Kutta method have a wide range of applications in various fields, including engineering, physics, and astronomy. They are used to model and predict the behavior of systems such as celestial bodies, pendulums, and mechanical systems.

5. What are some limitations of classical mechanics and the Runge-Kutta method?

Classical mechanics has been largely superseded by quantum mechanics, which explains the behavior of particles on a smaller scale. Additionally, the Runge-Kutta method may not provide accurate solutions for highly complex systems or when the initial conditions are not known precisely.

Similar threads

Replies
9
Views
1K
Replies
2
Views
941
Replies
9
Views
2K
Replies
7
Views
987
  • Introductory Physics Homework Help
2
Replies
55
Views
2K
Replies
1
Views
1K
Replies
9
Views
1K
  • Mechanics
Replies
15
Views
1K
Replies
17
Views
1K
Back
Top