# Simultaneous Differential Equations

1. Jun 29, 2004

### Dburghoff

Hello, everyone! I'm working on a simulation of charged particles, and I'm trying to figure out a way to get exact equations which fit the particles' motions. However, I've arrived at math which is very difficult, so I thought that I'd ask for help. Basically, I want to know how to find the exact equations for two particles, and then I'll extend it to many of them.

So, imagine that there are two charged particles, y and Y. They each have the same mass and charge, so I'll ignore those aspects. Just know that the product of their charges and Coulomb's constant divided by their mass is a constant I'll dub k. Each has properties that pertain to it. The capital letters always refer to Y's properties, and the lowercase letters refer to y's. Their positions are known as (a,b) and (A,B). So, I know the following pieces of information, based on the force between the two:

$\frac{d^{2}A}{dt^2}=\frac{k(A-a)}{((A-a)^2+(B-b)^2)^{1.5}}$
$$\frac{d^{2}B}{dt^{2}}=\frac{k(B-b)}{((A-a)^2+(B-b)^2)^{1.5}}$$

$$\frac{d^2a}{dt^2}=\frac{k(a-A)}{((A-a)^2+(B-b)^2)^{1.5}}$$
$$\frac{d^2b}{dt^2}=\frac{k(b-B)}{((A-a)^2+(B-b)^2)^{1.5}}$$

So, with just two particles, I have four differential equations. I have no idea how to solve it. BTW, I also know the particles' positions and velocities at time t=0, so you don't have to bother with the constants of integration. Just leave those C's as they are and I won't complain. :)

Also, I'd appreciate it if you showed me how to work through the problem. If I'm going to extend it to other problems, I'll need to know how. Thanks!

2. Jun 30, 2004

### stefanfuglsang

It sounds very complicated - have you considered a stochastic simulation (Monte Carlo)?
I think it is impossible to solve with more than two particles (?)

Is the power 1.5 correct (since I haven't studied your problem in details, I'm not sure)?

3. Jul 3, 2004

not sure if there would be an exact solution to this system
it would be nice to have some initial conditions on A, a, B, b, A', a', B', and b'
knowing that you can obtain a system of equations by letting
x1=A
x2=A'
x3=B
x4=B'
x5=a
x6=a'
x7=b
x8=b'

so that we have
x1'=x2
x2'=k/r*(x1-x5)
x3'=x4
x4'=k/r*(x3-x7)
x5'=x6
x6'=k/r*(x5-x1)
x7'=x8
x8'=k/r*(x7-x4)
where r=((A-a)^2+(B-b)^2)^(1.5)
then you can choose your favourite method, for example Eulers method
y_n+1=y_n+h*f(t,x)
and f(t,x)=(x1',x2',x3',x4',x5',x6',x7',x8') evaluated at (t_n,x_n)
can take any h<1, your solution will be more accurate to closer to 0 h is, so take h as small as possible

you can code this into matlab and it will churn through the calculations quite nicely and you can also plot the solutions of A, a, B and b

hope that was helpful in some way

Last edited: Jul 3, 2004
4. Jul 3, 2004

### arildno

Let's write the equations in vectorial form:
$$\frac{1}{4\pi\epsilon_{0}}\frac{q_{1}q_{2}(\vec{r}_{1}-\vec{r}_{2})}{||\vec{r}_{1}-\vec{r}_{2}||^{3}}=m_{1}\frac{d^{2}\vec{r}_{1}}{dt^{2}}$$
$$\frac{1}{4\pi\epsilon_{0}}\frac{q_{1}q_{2}(\vec{r}_{2}-\vec{r}_{1})}{||\vec{r}_{1}-\vec{r}_{2}||^{3}}=m_{2}\frac{d^{2}\vec{r}_{2}}{dt^{2}}$$

Note that the C.M moves with uniform speed, since there are no external forces. Let's set it to zero, and place the C.M at the origin.

We then have:
$$m_{1}\vec{r}_{1}+m_{2}\vec{r}_{2}=\vec{0}$$

Hence, we may eliminate one particle path, and retain, for example:
$$\frac{m_{2}^{2}}{4\pi\epsilon_{0}(m_{1}+m_{2})^{2})}\frac{q_{1}q_{2}\vec{r}_{1}}{||\vec{r}_{1}||^{3}}=m_{1}\frac{d^{2}\vec{r}_{1}}{dt^{2}}$$

Since we have a central force, we have motion in a plane only, and the angular momentum with respect to the origin is constant through time.

Write
$$\vec{r}_{1}(t)=r(t)(\cos\theta(t)\vec{i}+\sin\theta(t)\vec{j})=r(t)\vec{i}_[r}$$
We then have:
$$\vec{v}_{1}(t)=\dot{r}\vec{i}_{r}+r\dot{\theta}\vec{i}_{\theta}$$
Or, for conservation of angular momentum:
$$r^{2}\dot{\theta}=r_{0}^{2}\dot{\theta}_{0}$$

The radial component of the equation of motion may now be written as:
$$\frac{A}{r^{2}}=-\frac{(r_{0}^{2}\dot{\theta}_{0})^{2}}{r^{3}}+\frac{d^{2}r}{dt^{2}}$$

$$r_{0}$$ is the initial radius, $$\dot{\theta}_{0}$$ the initial angular velocity, A is some constant.

Hence, your problem has been reduced to solve a single, 2.order differential equation.
Alternatively, you may eliminate time as a variable, and regard the radius as a function of the angle (this will give you the form of the path, but not the traversal times).

Last edited: Jul 3, 2004