- #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))
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))