We have a pendullum in a car, that is being pulled with:(adsbygoogle = window.adsbygoogle || []).push({});

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 Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Classical mechanics & runge-kutta

**Physics Forums | Science Articles, Homework Help, Discussion**