Mesh current method question here?Is this correct

circuit analysis

We have the circuit in the figure.I have to find Vo in terms of Vi.
enter image description here

So I have the system of equations
{-Vi+ (1k+1k)I1- 1kI2-5=0

5+1k*I2+I2*1k-I1*1k=0

and Vo=1k*I2

We have 5-Vi=2kI1-I2 and 5=I1-2kI2 and Vo =1k*I2.I know that I should find I2 in terms of Vi from the first and second equation and then replace it at Vo ok?
So I do that,and I have

I2=(-5-Vi)/3

Now I have Vo=I2*1k= (-5-Vi)/3 Volt

I think that I have made a mistake and Vo should be equal to Vo=-1k* I2?

Best Answer

The first two equations you wrote are correct. You made mistake while re-arranging them. The equations should be:

$$5 + V_i = 2k\times I_1 - 1k\times I_2\tag1$$ $$5 = 1k\times I_1 - 2k\times I_2 \tag2$$

Solving which you will get the value for \$I_2\$. $$I_2 = \frac{-5+V_i}{3k}$$

And then, $$V_o = I_2 \times 1k = (V_i-5)/3$$

It was more easy if nodal analysis or superposition theorem was used.