Classical mechanics & runge-kutta

AI Thread Summary
The discussion focuses on solving two nonlinear differential equations related to a pendulum in a car, subjected to a constant force and a spring force. The equations are transformed into a system of first-order differential equations to facilitate the use of the Runge-Kutta method for numerical solutions. The approach involves calculating the derivatives of theta and x using the RK4 method, followed by integrating these velocities over time. Resources for implementing this in C are provided, including links to relevant numerical recipes. This method enables the calculation of theta(t) and x(t) effectively.
gulsen
Messages
215
Reaction score
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:

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

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

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
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:
I actually solved the simple pendulum this way in high school. What you need to do is use an RK4 to get \theta ' and x' from the second order equations, and then use the same RK4 to do a simple time integral of that velocity (dx = vdt). At least, that's how I would do it.
 
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Back
Top