Is power equal to $\vec{F}\cdot\vec{v}$ where $\vec{F}$ is force and $\vec{v}$ is velocity? Can you please tell me when $P=\vec{F}\cdot\vec{v}$ is valid?
Let us consider $\vec{F}$ as to be a function of time $t$. We know that $P=\frac{dW}{dt}$, where $W$ stands for the work done. 
$$P=\frac{d(F.x)}{dt}$$
and on should use the product rule for differentiation.
Is $P=\vec{F}\cdot\vec{v}$ not valid if the force is variable (i.e. a function of displacement or time)?
 A: $P$ is the instantaneous power; it only depends on the values of the force and velocity at a given moment $t$. It does not depend on the history of the force (i.e. if the force is constant, or varies with position or velocity).
It may seem confusing because you have written that the work $W = F \cdot x$. This is not true in general. Instead, the work done by the point of application of a force moving a distance $x$ is: $W = \int_0^x F(x')\, \text dx'$. If you differentiate this integral you obtain the correct result that $P = F \cdot v$.
A: Power is defined as rate of change of work. Since we are talking about derivatives, the power concerned is instantaneous power which is defined as
$$P = dW/dt$$
Now remember that by definition, work done
$$W = \int _C \overrightarrow F \cdot d \overrightarrow r$$
where $\int _C$ represents a line integral over the required path.
Therefore
$$dW = \overrightarrow F \cdot d \overrightarrow r$$
To get dW/dt, we divide both sides by dt to get
$$P = dW/dt = \overrightarrow F \cdot \frac{d \overrightarrow r}{dt}$$
We know that velocity $\overrightarrow v = \frac{d \overrightarrow r}{dt}$
Thus we have 
$$P = \overrightarrow F \cdot \overrightarrow v$$
The source of the error was that work done is defined by the equation
$$dW = \overrightarrow F \cdot d \overrightarrow r$$
rather than the more well known one
$$W = \overrightarrow F \cdot \Delta \overrightarrow r$$
where $\Delta \overrightarrow r$ is the vector displacement. This equation is valid only for the case where the force is constant, and can in fact be derived from the more general $dW = \overrightarrow F \cdot d \overrightarrow r$
Hope this helps
A: If you define $P$ as $\frac{d E_k}{dt}$, where $E_k = \frac{1}{2}m v^2$ is the kinetic energy, then $P = \overrightarrow{F}\cdot \overrightarrow{v}$ simply follows from Newton's second law: 
$$\frac{1}{2}m \frac{d(v^2)}{dt} = \overrightarrow{v} \cdot \left( m \frac{d \overrightarrow{v}}{dt}\right) = \overrightarrow{v} \cdot (m \overrightarrow{a}) = \overrightarrow{v} \cdot \overrightarrow{F}$$
On the other hand, the definition of the work done by $\overrightarrow{F}$ between two points $a$ and $b$ can not be expressed simply as the difference of potential energies:
$$W_{a \to b} = E_{k,b} - E_{k,a} = \int \limits_{t_a}^{t_b} \frac{d E_k}{dt} dt =  \int \limits_{t_a}^{t_b} \overrightarrow{F} \cdot \overrightarrow{v} dt = \int \limits_{x_a}^{x_b} \overrightarrow{F} \cdot \overrightarrow{dx} \neq V(x_b, t_b) - V(x_a, t_a),$$
where $V(x,t)$ is defined as $- \overrightarrow{\nabla} V(x,t) = \overrightarrow{F}(x,t)$. The last equality does not hold anymore because $d V = \overrightarrow{\nabla}V \cdot \overrightarrow{dx} + \frac{\partial V}{\partial t} dt \neq - \overrightarrow{F} \cdot \overrightarrow{dx}.$
