Solving Initial Value Problems in polar coordinates

Hi there. So I'm trying to solve a differential equation, but I just don't know where to start. I have a problem where a block is connected to a spring, and that spring is a swinging pendulum (think a normal pendulum but instead of a string, a spring is used).
I have the following differential equations:
-in the r direction: d2rdt2 = -(k*r)/m + g*cos(theta)
-in the theta direction: d2thetadt2 = -g*sin(theta)
I want to use something along the lines of 'ode45' to solve these, I'm just not sure how to do this. Eventually, I want to get to the total displacement of the swinging/bouncing block over a set period of time.
If anybody could help in anyway, or just get me started in the right direction, that would be greatly appreciated!
Thank You, Brayden

1 Kommentar

Mohammad Abouali
Mohammad Abouali am 16 Okt. 2014
Bearbeitet: Mohammad Abouali am 16 Okt. 2014
My question is regarding your equations. How did you got these equations? Theta seems to be completely independent of r. So in a way you do not have a coupled equation.
If your equations are correct, you should be first solving Theta completely independently and then solve r by plugin in the value of Theta back into r equation.
However, I think something is missing in your equations. The period of movement is related to the length of the rope (or spring here). and that period is related to changes in time of theta. So, somehow I do think that the equation for theta should have some sort of r in it.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 16 Okt. 2014

Bearbeitet:

am 16 Okt. 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by