Why is force on a pulley two times the tension in the rope? 
Image source: https://en.wikipedia.org/wiki/File:Atwood.svg
In setups such as the one shown in the diagram above, why is it that the force on the pulley by the rope is twice the tension in the rope? (in the case where both pulley and rope are massless and frictionless)
I always thought of it as making intuitive sense but is there a more rigorous explanation?
What would change if there was some mass and friction present in our system?
Say the mass of pulley is $m_{1}$, mass per unit length of rope is $m_{2}/L$, friction coefficient of pulley is $\mu_{1}$ and friction coefficient of rope is $\mu_{2}$. (assume that static and kinetic coefficient of friction are equal in both cases)
What would be the force on the pulley by the rope in that case?
 A: The inward directed normal force due a short length of the rope on the pully is 
$$
{\bf N} = -\hat {\bf r} \frac {T}{R} dl
$$
Here $T$ is the tension (constant for a smooth pully), $\hat {\bf r}$ is the unit outward normal and $R$ is the radius of the pully. Deriving this expression for this  normal force is geometrically the same one as that giving $V^2/R$ for the centripetal acceleration in constant speed circular motion. 
Now, measuring with the angle $\theta=0$ at the top  of the pully, the component of this force downwards is $N \cos\theta$. The total downward force of the pully due to the contact with the rope is therefore
$$
{F}_{\rm down}= \int_{-\pi/2}^{+\pi/2} \frac{T}{R} \cos \theta  Rd\theta\\
=2T. 
$$ 
We used  $dl=Rd\theta$ to do convert the length into an change in angle.
I'm not going to do your frictionful case. 
A: Once friction is present, the difference is that the tension on both ends of the rope no longer have to be identical.  With a massless pulley or frictionless contact, if the forces on each end were different, the rope would accelerate and move to reduce the difference.
With friction and mass in the pulley, then the force on one end is not instantly transmitted.  Rather than the tension, there will be a (possibly different) tension on both ends.  
But in both cases, the tension in each segment is transmitted to the pulley, so the force on the pulley remains equal to sum of the tensions.
