Consider all line segments of length 4 with one end-point on the line $y=x$ and the other end-point on the line $y=2x$. Find the equation of the locus of the midpoints of these line segments.
1. Let \( A = (a, a) \) and \( B = (b, 2b) \) be the endpoints of the line segment, and let \( C = (x, y) \) be the midpoint of \( AB \). The length of the line segment \( AB \) is given as 4. Therefore, we have:
   \[
   AB^2 = 16
   \]
2. The distance formula between points \( A \) and \( B \) is:
   \[
   (a - b)^2 + (a - 2b)^2 = 16
   \]
3. Expanding and simplifying the equation:
   \[
   (a - b)^2 + (a - 2b)^2 = (a - b)^2 + (a^2 - 4ab + 4b^2) = a^2 - 2ab + b^2 + a^2 - 4ab + 4b^2 = 2a^2 - 6ab + 5b^2 = 16
   \]
   \[
   2a^2 - 6ab + 5b^2 = 16
   \]
4. Solving for \( b \) in terms of \( a \):
   \[
   5b^2 - 6ab + 2a^2 - 16 = 0
   \]
   Using the quadratic formula \( b = \frac{-B \pm \sqrt{B^2 - 4AC}}{2A} \) where \( A = 5 \), \( B = -6a \), and \( C = 2a^2 - 16 \):
   \[
   b = \frac{6a \pm \sqrt{36a^2 - 40a^2 + 320}}{10} = \frac{6a \pm \sqrt{320 - 4a^2}}{10} = \frac{3a \pm \sqrt{80 - a^2}}{5}
   \]
5. The coordinates of the midpoint \( C \) are:
   \[
   x = \frac{a + b}{2} = \frac{a + \frac{3a \pm \sqrt{80 - a^2}}{5}}{2} = \frac{8a \pm \sqrt{80 - a^2}}{10}
   \]
   \[
   y = \frac{a + 2b}{2} = \frac{a + 2 \cdot \frac{3a \pm \sqrt{80 - a^2}}{5}}{2} = \frac{11a \pm 2\sqrt{80 - a^2}}{10}
   \]
6. To eliminate the parameter \( a \), we use the relationship:
   \[
   2(10x - 8a) = 10y - 11a \implies a = 2(2x - y)
   \]
7. Substituting \( a = 2(2x - y) \) into the equation for \( x \):
   \[
   x = \frac{8(2x - y) \pm \sqrt{80 - (2(2x - y))^2}}{5} = \frac{8(2x - y) \pm \sqrt{80 - 4(2x - y)^2}}{5}
   \]
8. Simplifying further:
   \[
   (8y - 11x)^2 = 20 - (2x - y)^2
   \]
9. Expanding and simplifying the equation:
   \[
   (8y - 11x)^2 = 20 - (2x - y)^2
   \]
   \[
   64y^2 - 176xy + 121x^2 = 20 - (4x^2 - 4xy + y^2)
   \]
   \[
   64y^2 - 176xy + 121x^2 = 20 - 4x^2 + 4xy - y^2
   \]
   \[
   64y^2 - 176xy + 121x^2 + 4x^2 - 4xy + y^2 = 20
   \]
   \[
   65y^2 - 180xy + 125x^2 = 20
   \]
   \[
   25x^2 - 36xy + 13y^2 = 4
   \]

The final answer is \(\boxed{25x^2 - 36xy + 13y^2 = 4}\)