Difference between $I^2R$ and $V^2/R$ and $VI$ for measuring power $P$ We use $I^2R$ or $V^2/R$ or $VI$ for measuring power $P$. Are all of these  applicable for all circuits? I have seen in some circuit $V^2/R$ is not equal to $I^2R$. Why is that?
 A: $P = IV$ applies to all circuit branches.
$P = I^2R$ or $P = V^2/R$ are restatements of the general rule that apply when we are considering power delivered to an ideal resistor that behaves according to Ohm's law $V = IR.$

I have seen in some circuit $V^2/R$ is not equal to $I^2R$ (like when there is capacitor or inductor). Why is that?

Those components are not ideal resistors. The forms with R are a special case for when we are considering an ideal resistor. 
For other components in static (DC) circuits, you should use the general form $P=IV$.
As Tinchito says, when dealing with a time-varying circuit, you should use the instantaneous form
$p(t) = i(t) v(t)$.
A: After solving problems on circuits and power dissipation in them, I observed that $V^2/R$ is used when the voltage is constant across the elements in the circuit and $I^2R$ is used when current is constant through the elements in the circuit.
They yield the same result when a purely resistive load is used. Even the formula $P=VI$ will give the answer. This is because when only resistors are used, the real power comes into action. With capacitors and inductors, reactive power come into action. That is why the answers don't match. When solving problems with inductors and capacitors, the impedance (which is a complex quantity) is used. 
A: All the formulae are valid. But sometimes people confuse what variables to to plug to the equations when using them.
For example consider a DC circuit with a battery $10V$ and with two resistances $R_1$ and $R_2$ in series . Suppose the question asks to find the power dissipated by the $R_1$.
We have 3 formulae :
$P=IV$
$P=I^2R$
$P=\frac{V^2}{R}$
Ofcourse all of them are valid but you cannot apply every one of them directly.
Consider using $P=\frac{V^2}{R}$.
Some people will directly use it on $R_1$ to get the answer as
$P=\frac{10^2}{R_1}$
But this is wrong. Because the $V$ in the equation actually means potential across the resistor $R$ (and not potential of the circuit).
Therefore you have to first find the potential across $R_1$ by using Ohms Law. ($V=IR$) . For series $I=\frac{E}{R_1 + R_2}$
Put the variables in $P=\frac{V^2}{R}$.
You get $P=\frac{V^2R_1}{(R_1+R_2)^2}$.
Oh wait! Thats the same thing you would get if you would have used $P=I^2R$ . Its not a coincidence. In series,  the total current flowing thought the circuit is equal to the current flowing through any resistor. Therefore you donot need to calculate individual currents for the resistors.
The same is for $P=VI$ . You need potential across $R_1$ and not of the whole circuit. Plug in the correct variablesyou would get the answer from all of them.
Side note :
As you just saw from the example, it is always easy to find Power from a Resistor in series by using $P=I^2R$. Similarly for parallel circuits,  it is easy to get the power by $P=\frac{V^2}{R}$. But in then end of the day, both of them will yield the correct results.
A: The measure $ R $ of resistance is an invented one. It was deduced long ago by experiment that many materials had a constant ratio $ \frac {V}{I}$ between the voltage applied and the current flowing. Thus the quantity 'resistance' was defined to be precisely this ratio. Later, when inductive and capacitive effects were observed, 'reactance' $ Z $ was defined to be this quantity instead, while resistance now refers to the value of this quantity when no capacitive or inductive effects are at play. 
Voltage and current are measurable, physical, well defined quantities. Resistance and reactance are quantities which are defined in the process of modelling electrical circuits. The equations you give are correct only in the context of modelling circuits without capacitive or inductive effects. If you replace $ R $ with $ Z $, then the equations would be correct in the context of a more general model-- one accounting for capacitors and inductors too. 
A: The formulas are of course all true if used and interpreted correctly. But human error is the wild card. For practical reasons, I-squared-R is the most reliable formula because it's almost impossible to apply it incorrectly.
