# solving a physic problem using sage Hi, I'm new in this community.

I want to solve a physic problem which requires differential equation system solutions.

I don't know if my equations are correctly set. Any suggestion is good. My problem is described by this image: http://img805.imageshack.us/img805/70...

I have two masses (1/3m the first, 2/3m the second) linked with a rope. The rope is free to slide around a nail (the big black point in the image). The image shows the starting condition: a man keeps the first mass stopped and so the rope is kept stretched by the second mass.

I search three functions describing the kinematics of two masses after the man will leave the fist mass: vertical movement of mass A y(t), vertical movement of mass B j(t), and horizontal movement of mass B x(t).

My Cartesian reference system is x-y system in the image.

I have to solve the following equations:

1. $-\frac{2}{3}mg+T=\frac{2}{3}m \frac{d^2y}{dt^2}$
2. $-\frac{1}{3}mg+S_y=\frac{1}{3}m\frac{d^2j}{dt^2}$
3. $S_x=\frac{1}{3}m\frac{d^2x}{dt^2}$
4. $|T|=\sqrt{S_x^2+S_y^2}$
5. $|y(t)|=\sqrt{x(t)^2+j(t)^2}$

From the forth and the fifth equations I obtain two equations, so I have 5 equations in 5 unknowns. They are:

1) T force sustaining the second mass

2) Sx x-component of force sustaining the first mass

3) Sy y-component of force sustaining the first mass

4) y(t) position of the second mass

5) x(t) x-position of the first mass

6) j(t) y-position of the first mass

I hope my explanation is clear.

How can I obtain my solutions using Sage?

Thank you very much!!

edit retag close merge delete

Is my problem too difficult to set on Sage that no one could help me?

After years, someone else could suggest a solution with Sage?

Sort by » oldest newest most voted

I think the problem is that you are really asking a physics question, not a Sage question. So anyone trying to answer will first have to make sure your physics is right. Certainly Sage does include several ways to solve systems of differential equations, numerically or exactly - see these Maxima solvers or this well-understood library of numerical methods.

more

Your first three equations for the balance of the components of force look fine. Your fourth equation, while accurate, is less useful than writing the tensions $S_x$ and $S_y$ as projections of the total tension $T$:

$\qquad S_x = \frac{x}{\sqrt{x^2+j^2}}T \qquad S_y = \frac{j}{\sqrt{x^2+j^2}}T$

Your fifth equation is incorrect, since it says that the amount of rope on each side of the nail is always equal, which is not true for a sliding inelastic rope. If the rope is of length $L$, then the constraint you want is

$\qquad y + \sqrt{x^2+j^2} = L$

If you take a second derivative of this constraint with respect to time and substitute it in the first equation, you'll have an expression for the total tension $T$ as a function of $x$ and $j$ and their derivatives. You can use that to eliminate $T$ from the second and third equations. Then you should have three coupled nonlinear differential equations for $x$, $j$ and $y$ without $T$.

At that point you'll have to numerically integrate the equations as a system using for example this method. You'll need to solve for all second derivatives and then introduce intermediate variables for the first derivatives of $x$, $j$ and $y$ in order to write the system in terms of first-order equations.

The problem you're trying to solve is mathematically identical to the swinging Atwood machine, but with one point of support instead of two. While it can be done in Cartesian coordinates, it will look a lot simpler in polar coordinates.

Cheers!

more

Mmm, let me do some checks. Anyway your answer seems very interesting!

Great answer! Sorry I can't upvote it yet. I just created the account, and I need more points.