# solution for ODE problem

I was trying to simulate a physical system which lead me to this equation. I don't know if it has any solution or not, but I guess you guys can help me find the answer. $$v'(t) = a + s * \frac{v(t)}{|v(t)|}$$ in which t is an scalar variable, s is an scalar constant and a is a vector with same dimensions as v(t) (either 2D or 3D)

-
If $s$ and $v$ are vectors, what kind of a product does $*$ denote? The only product that produces a vector from two vectors is the cross product, but that's usually not denoted by $*$, and also that wouldn't work in two dimensions. –  joriki Aug 27 '12 at 23:17
I believe $s$ is not a vector. –  Tunococ Aug 27 '12 at 23:58
@joriki s was an scalar constant as tunococ suggested, I've fixed the question. –  Ali.S Aug 28 '12 at 11:10

Interpretation 1: Perhaps we can write your problem as

$$\frac{dv}{dt} - \frac{s}{|v|}v=a$$

Provided $s$ is in fact a scalar. Take the dot-product with $v$ to obtain:

$$v \cdot \frac{dv}{dt} - \frac{s}{|v|}v\cdot v= v \cdot a$$

Hence,

$$\frac{1}{2}\frac{d}{dt} (v \cdot v )-s|v| = v \cdot a$$

One silly solution is $v(t)=v_o$ where $v_o$ is taken to fit the condition $v_o \cdot a=-s|v_o|$. I assume $s,a$ are given constants.

Interpretation 2: Another solution, suppose we seek a constant speed solution then $|v|= s_o$. We face

$$\frac{dv}{dt} - \frac{s}{s_o}v=a$$

Suppose $s$ is a scalar function of $t$. We can use the obvious generalization of the usual integrating factor technique (note $v$ is a vector in contrast to the usual context where the typical DEqns student faces $\frac{dy}{dt}+py=q$). Construct $\mu = exp( -\int \frac{s}{s_o} dt)$. Multiply by this integrating factor,

$$\mu\frac{dv}{dt} - \frac{s}{s_o}\mu v= \mu a$$

By the product rule for a scalar function multiplying a vector,

$$\frac{d}{dt}\biggl[ \mu v \biggr] = \mu a$$

Integrating, we reduce the problem to quadrature:

$$v = \frac{1}{\mu} \int \mu a \, dt$$

where $\mu = exp( -\int \frac{s}{s_o} dt)$ and we choose constants of integration such that $|v|=s_o$ (if that's even possible...)

-
your answer makes sense but the problem is I don't know how can I use it in my application! as I said both a and s are constants given and I know initial value for $v_0$. –  Ali.S Aug 28 '12 at 11:18