The principle of superposition also applies to electrical circuits. If there are multiple sources in a circuit, it can be easier to deal with them one at a time instead of all at once. The principle of superposition says that the effect of all of the sources on an element will be the sum of the effects of each source independently.

This helps tremendously if sources are placed in strange places and you can't really tell which direction current is flowing. Normally, node analysis is sufficient, but in some cases using superposition is necessary. Superposition is somewhat slow, because you have to redraw the circuit as many times as sources you have, unless you become very good at it.

This is a typical circuit you might choose to analyze with superposition:

                           R1                          
     -----------------/\/\/\/\/\----------------
     |             |                           |              
     |             |                           |
    /+\            \                          / \
   /   \           /               I Amp     /  ^\
  |  V  |V Volt    \ R2            Current  | I | |
   \   / Voltage   /               Source    \  |/
    \-/  Source    \                          \ /
     |             |                           |
     |             |                           |
     -------------------------------------------
                            |
                          -----  Ground
                           ---
                            -
Let's say R1=R2=R. You can't really tell which way current is going to flow in this circuit. Though there is a current source pointing counterclockwise, different values for V, I, and R may give you different results. The voltage source may very well end up overpowering the current source.

So, we have to remove each source and analyze the circuit. Let's start by removing the voltage source. When we do that, we replace the voltage source with a short circuit. The circuit now looks like this:

                           R1                          
e2-->O----------------/\/\/\/\/\---------------O --> e1
     |             |                           |              
     |             |                           |
     |             \                          / \
     |             /                I Amp    /  ^\
     |             \ R2             Current | I | |
     |             /                Source   \  |/
     |             \                          \ /
     |             |                           |
     |             |                           |
     -------------------------------------------
                            |
                          -----  Ground
                           ---
                            -
Now the analysis becomes trivial. R2 is in parallel with a short circuit, so no current will travel down R2's path. The current follows the path of least resistance, so it's as if R2 is not even there. The node marked e1 will have a voltage of V = I * R. The other node, marked as e2, is grounded. The current traveling through R2 is zero. The current traveling through R1 is I, because all of the current from the source goes through that resistor.

That wasn't too painful. Now we replace the voltage source, and take out the current source. When you take out current sources, they must be replaced with open circuits. Here is that circuit:

                           R1                          
e2-->O----------------/\/\/\/\/\---------------O --> e1
     |             |                           |              
     |             |                           |
    /+\            \                         ----- +
   /   \           /               
  |  V  |V Volt    \ R2                            VOC
   \   / voltage   /                
    \-/  source    \                         ----- -
     |             |                           |
     |             |                           |
     -------------------------------------------
                            |
                          -----  Ground
                           ---
                            - 
The first thing that we can see is that e2 must be equal to V, because it's hooked up right to the voltage source. The voltage source does not make a complete loop with R1, so the current flowing through R1 has to be zero. As a result, the voltage across R1 is zero. So e1 is also equal to V now. Since the only functional loop contains the source and R2, all of the voltage drop has to occur across R2. According to Ohm's Law, then, the current through R1 must be V/R.

Now we can find the total analysis by summing the results we have obtained. First, the voltage e2 turns out to be 0 + V = V. This makes sense because that node is hooked up directly to the voltage source. Next let's look at e1. e1 = (I * R) + V. The current going through the voltage source is I + (V/R). The current through R1 is I + 0 = I. The current through R2 is 0 + V/R = V/R.

This circuit can also be easily analyzed by node analysis. Node analysis gives you a system of equations, though. If there are many nodes and many sources, it will be difficult to solve this system. Superposition helps to alleviate this complexity, though it can be time consuming.