# Differential Equation with Vectors

1. Aug 6, 2009

### nburo

Hello everyone, I have the following differential equation :

$$\dot{\theta}(t) = \omega(t) - \frac{1}{2}\theta(t)\times\omega(t) + \frac{1}{\Vert\theta(t)\Vert^2}\left(1-\frac{\Vert\theta(t)\Vert}{2}cot\frac{\Vert\theta(t)\Vert}{2}\right)\theta(t)\times[\theta(t)\times\omega(t)]$$

where $$\omega(t)$$ is a known 3D vector with the form :

$$\omega(t) = [a_1+b_1*t , a_2+b_2*t , a_3+b_3*t ]$$

also, $$\theta(t)$$ is the unknown 3D vector that we need to find. Its norm is $$\Vert\theta(t)\Vert$$.

This type of math is too high for me. If you guys know a way to solve it for $$\theta(t)$$ with Maple, Mathlab or Scilab, I'd be happy, because anyone of those seems to explain how to solve an equation that contains vectors. I think a solver would be more appropriate because the equation is quite "big", if you know what I mean.

Thanks.

2. Aug 6, 2009

### djeitnstine

Try decomposing it into its scalar components first.

Then you get a system of 3 diffeq's

3. Aug 6, 2009

### nburo

Thanks, but ok, le's say I decomposed it in 3 differential equations. Here I'll have :

$$\frac{d}{dt}\theta_1(t) = F(\theta_1(t), \theta_2(t), \theta_3(t) )$$
$$\frac{d}{dt}\theta_2(t) = F(\theta_1(t), \theta_2(t), \theta_3(t) )$$
$$\frac{d}{dt}\theta_3(t) = F(\theta_1(t), \theta_2(t), \theta_3(t) )$$

Let's say I use Maple to solve, what do I have to do next?

4. Aug 18, 2009

### Marin

Hi there!

Why not trying to simplify the equation at first:

$$\theta\times(\theta\times\omega)=\theta(\theta\omega)-\omega ||\theta||^2)$$

plugging it in the equation gives:

$$\dot\theta=\omega-\frac{1}{2}\theta\times\omega+\frac{1}{||\theta||^2}(1-\frac{||\theta||}{2}\cot\frac{||\theta||}{2})(\theta(\theta\omega)-\omega ||\theta||^2)$$

now, let's get rid of some terms, let's left-operate with x theta:

$$\theta\times\dot\theta=\theta\times\omega-\frac{1}{2}\theta\times(\theta\times\omega)+\theta\times\frac{1}{||\theta||^2}(1-\frac{||\theta||}{2}\cot\frac{||\theta||}{2})(\theta(\theta\omega)-\omega ||\theta||^2)$$

$$\theta\times\dot\theta=\theta\times\omega-\frac{1}{2}\theta\times(\theta\times\omega)+\frac{1}{||\theta||^2}(1-\frac{||\theta||}{2}\cot\frac{||\theta||}{2})(\theta\times\theta(\theta\omega)-\theta\times\omega ||\theta||^2)$$

observe that $$\theta\times\theta=0$$ and (\theta\omega) is a scalar

$$\theta\times\dot\theta=\theta\times\omega-\frac{1}{2}\theta\times(\theta\times\omega)+\frac{1}{||\theta||^2}(1-\frac{||\theta||}{2}\cot\frac{||\theta||}{2})(-\theta\times\omega ||\theta||^2)$$

now, simplfying a little gives:

$$\theta\times\dot\theta=\theta\times\omega-\frac{1}{2}\theta\times(\theta\times\omega)+(1-\frac{||\theta||}{2}\cot\frac{||\theta||}{2})(-\theta\times\omega)$$

and using $$\omega\times\theta=-\theta\times\omega$$

$$\theta\times\dot\theta=\theta\times\omega-\frac{1}{2}\theta\times(\theta\times\omega)-\theta\times\omega-\frac{||\theta||}{2}\cot\frac{||\theta||}{2}\theta\times\omega$$

or

$$-2\theta\times\dot\theta=\theta\times(\theta\times\omega)+||\theta||\cot\frac{||\theta||}{2}\theta\times\omega$$

Well, to me it looks a tiny little bit better, the inhomogenety is at least not there any more , but the equation remains nonlinear which makes it hardly solvable analytically.

5. Aug 20, 2009

### matematikawan

Marin had taken all the trouble to show that probably there is no analytical solution. So I suggestion is that we go for numerical solution. Much easier. How about using Runge-Kutta method?

6. Aug 20, 2009

### nburo

Wow thanks guys! Your responses are very interesting and useful! Unfortunately, I don't really know much about the Runge-Kutta method =/

7. Aug 20, 2009

### Feldoh

That's all right there are a lot of programs that will do Runge-Kutta 4th order method for you. I know in particular that Matlab has ode45() which is pretty easy to use if you have matlab.