# Using Nodal Voltage Analysis when we have both a current- and a voltage source

#### Anders Imenes

Joined Sep 16, 2017
3
Hi!

The following circuit is given, and I am supposed to find the current I2 using the Nodal Analysis Method.

I've tried back and forth for a while. I defined x in the upper node, then I defined y in the lower node.The first thing I tried was to put the reference behind the Voltage Source, E. I also defined I1 as the current going through R1 from x to y (not on the figure).

I figured that for x
Ik = I1 + I2

This gave me the first equation
2A = ( (x - y)/R1 ) + ( (x - 30V) / R2 )

Then for y I get the same KCL
Ik = I1 + I2

This gave me the second equation
2A = ( (x - y) / R1) + ( y / (R4 + R3) )

X is supposed to be 31V, and Y is supposed to be -4V. Which is supposed to give me 250mA through R2. However I end up with totally different numbers.

Any ideas? Thanks for help!

#### Anders Imenes

Joined Sep 16, 2017
3

#### WBahn

Joined Mar 31, 2012
26,141
Hi!

The following circuit is given, and I am supposed to find the current I2 using the Nodal Analysis Method.

I've tried back and forth for a while. I defined x in the upper node, then I defined y in the lower node.The first thing I tried was to put the reference behind the Voltage Source, E. I also defined I1 as the current going through R1 from x to y (not on the figure).

I figured that for x
Ik = I1 + I2

This gave me the first equation
2A = ( (x - y)/R1 ) + ( (x - 30V) / R2 )

Then for y I get the same KCL
Ik = I1 + I2

This gave me the second equation
2A = ( (x - y) / R1) + ( y / (R4 + R3) )

X is supposed to be 31V, and Y is supposed to be -4V. Which is supposed to give me 250mA through R2. However I end up with totally different numbers.

Any ideas? Thanks for help!

Ik = I1 + I2

Ik is a current flowing OUT of node y, so you need to set that equal to the currents flowing INTO node y.

I1 = (x - y)/R2

is a current flowing INTO node y, so that's fine.