Backward Euler method with a cross-product.

453 Views Asked by At

I want to solve the following differential equation with the backward Euler method

$\frac{d\vec{r}(t)}{dt}=\frac{\lambda(t)}{\gamma}\times\vec{r}(t)+\frac{\{\vec{r}(t)\times\vec{F}(t)\}\times\vec{r}}{\gamma}$

Which is equivalent to:

$\frac{d\vec{r}(t)}{dt}=\frac{\lambda(t)}{\gamma}\times\vec{r}(t)+\frac{r^{2}\vec{F}(t)}{\gamma}-\frac{\vec{r}(t)\{\vec{r}(t)\cdot\vec{F}(t)\}}{\gamma}$

I get confused about the cross-product, I don't know what to do with it, should I treat it like a normal product?

Some side information:

This describes the torque on a sphere and the evolution of the vector $\vec{r}$ normal the the sphere.

$\lambda$ is a random Gaussian noise variable

$\vec{F}$ is the force acting on the sphere.

Update:

So I can write it as

$\gamma\left[\begin{array}{c} \frac{\mathrm{d}r_{x}}{\mathrm{d}x}\\ \frac{\mathrm{d}r_{y}}{\mathrm{d}x}\\ \frac{\mathrm{d}r_{z}}{\mathrm{d}x} \end{array}\right]=\left[\begin{array}{ccc} 0 & -\lambda_{z} & \lambda_{y}\\ \lambda_{z} & 0 & -\lambda_{x}\\ -\lambda_{y} & \lambda_{x} & 0 \end{array}\right]\left[\begin{array}{c} r_{x}\\ r_{y}\\ r_{z} \end{array}\right]+\left|\vec{r}\right|^{2}\left[\begin{array}{c} F_{x}\\ F_{y}\\ F_{z} \end{array}\right]-\left[\begin{array}{c} r_{x}\\ r_{y}\\ r_{z} \end{array}\right]\left(\left[\begin{array}{c} r_{x}\\ r_{y}\\ r_{z} \end{array}\right]\cdot\left[\begin{array}{c} F_{x}\\ F_{y}\\ F_{z} \end{array}\right]\right) $

Which gives me seperate equations.

$\dot{r}_{x}=\gamma^{-1}\left(\lambda_{y}(t)r_{z}(t)-\lambda_{z}(t)r_{y}(t)+r^{2}F_x(t)-\left(\vec{r}(t)\cdot\vec{F}(t)\right)r_{x}\right)$

$\dot{r}_{y}=\gamma^{-1}\left(\lambda_{z}(t)r_{x}(t)-\lambda_{x}(t)r_{z}(t)+r^{2}F_{y}(t)-\left(\vec{r}(t)\cdot\vec{F}(t)\right)r_{y}\right)$

$\dot{r}_{z}=\gamma^{-1}\left(\lambda_{x}(t)r_{y}(t)-\lambda_{y}(t)r_{x}(t)+r^{2}F_{z}(t)-\left(\vec{r}(t)\cdot\vec{F}(t)\right)r_{z}\right)$

The Backward Euler scheme:

$y_{k+1}=y_{k}+hf(t_{k+1},y_{k+1})$

Where I need to calculate the following:

$f(y_{k+1})\approx f(y_{k})+\frac{\partial f(y_{k})}{\partial y}(y_{k+1}-y_{k}).$

What is $\frac{d}{dr_x}\left(\vec{r}(t)\cdot\vec{F}(t)\right)r_{x}$?