Nodal Analysis
1. **State the problem:**
We have a circuit with two voltage sources (25 V and 50 V) and resistors arranged with nodes A and B. We need to find the node voltages $V_1$ (at node A) and $V_2$ (at node B) and the branch currents using nodal analysis.
2. **Assign node voltages:**
Let $V_1$ be the voltage at node A and $V_2$ be the voltage at node B with respect to ground (bottom reference).
3. **Write KCL equations at nodes:**
At node A:
$$\frac{V_1 - 25}{5} + \frac{V_1}{2} + \frac{V_1 - V_2}{10} = 0$$
Explanation: Current through 5-ohm resistor from node A to 25 V source is $(V_1 - 25)/5$, through 2-ohm resistor to ground is $V_1/2$, and through 10-ohm resistor to node B is $(V_1 - V_2)/10$.
At node B:
$$\frac{V_2 - V_1}{10} + \frac{V_2}{4} + \frac{V_2 - (-50)}{2} = 0$$
Explanation: Current through 10-ohm resistor from B to A is $(V_2 - V_1)/10$, through 4-ohm resistor to ground is $V_2/4$, and through 2-ohm resistor to 50 V source (bottom positive terminal means node voltage is -50 V) is $(V_2 + 50)/2$.
4. **Simplify equations:**
Node A:
$$\frac{V_1 - 25}{5} + \frac{V_1}{2} + \frac{V_1 - V_2}{10} = 0$$
Multiply all terms by 10:
$$2(V_1 - 25) + 5V_1 + (V_1 - V_2) = 0$$
$$2V_1 - 50 + 5V_1 + V_1 - V_2 = 0$$
$$8V_1 - V_2 = 50$$
Node B:
$$\frac{V_2 - V_1}{10} + \frac{V_2}{4} + \frac{V_2 + 50}{2} = 0$$
Multiply all terms by 20:
$$2(V_2 - V_1) + 5V_2 + 10(V_2 + 50) = 0$$
$$2V_2 - 2V_1 + 5V_2 + 10V_2 + 500 = 0$$
$$17V_2 - 2V_1 = -500$$
5. **Solve the system:**
From first equation:
$$8V_1 - V_2 = 50 \Rightarrow V_2 = 8V_1 - 50$$
Substitute into second:
$$17(8V_1 - 50) - 2V_1 = -500$$
$$136V_1 - 850 - 2V_1 = -500$$
$$134V_1 = 350$$
$$V_1 = \frac{350}{134} \approx 2.61\,V$$
Then:
$$V_2 = 8(2.61) - 50 = 20.88 - 50 = -29.12\,V$$
6. **Calculate branch currents:**
- Current through 5-ohm resistor:
$$I_{5\Omega} = \frac{V_1 - 25}{5} = \frac{2.61 - 25}{5} = \frac{-22.39}{5} = -4.48\,A$$ (flows from node A to 25 V source)
- Current through 2-ohm resistor at node A:
$$I_{2\Omega A} = \frac{V_1}{2} = \frac{2.61}{2} = 1.305\,A$$ (to ground)
- Current through 10-ohm resistor:
$$I_{10\Omega} = \frac{V_1 - V_2}{10} = \frac{2.61 - (-29.12)}{10} = \frac{31.73}{10} = 3.173\,A$$ (from A to B)
- Current through 4-ohm resistor at node B:
$$I_{4\Omega} = \frac{V_2}{4} = \frac{-29.12}{4} = -7.28\,A$$ (negative means direction opposite to assumed)
- Current through 2-ohm resistor at node B:
$$I_{2\Omega B} = \frac{V_2 - (-50)}{2} = \frac{-29.12 + 50}{2} = \frac{20.88}{2} = 10.44\,A$$ (from B to 50 V source)
**Final answers:**
$$V_1 \approx 2.61\,V, \quad V_2 \approx -29.12\,V$$
Branch currents as above with directions noted.