Answer :

To determine which of the given functions has a vertex at the origin, we need to analyze each function and identify its vertex.

### Function 1: [tex]\( f(x) = (x+4)^2 \)[/tex]
This function is a quadratic function in the standard form [tex]\((x-h)^2 + k\)[/tex], where the vertex is at [tex]\((h, k)\)[/tex]. Here, it can be rewritten as:
[tex]\[ f(x) = (x - (-4))^2 + 0 \][/tex]
This indicates that the function has a vertex at [tex]\((-4, 0)\)[/tex].

### Function 2: [tex]\( f(x) = x(x-4) \)[/tex]
To find the vertex of this quadratic function [tex]\( f(x) = x(x - 4) \)[/tex], we can rewrite it in the standard quadratic form [tex]\( ax^2 + bx + c \)[/tex]:
[tex]\[ f(x) = x^2 - 4x \][/tex]
The vertex of a quadratic function [tex]\( ax^2 + bx + c \)[/tex] is located at [tex]\( x = -\frac{b}{2a} \)[/tex]. Here, [tex]\( a = 1 \)[/tex] and [tex]\( b = -4 \)[/tex]:
[tex]\[ x = -\frac{-4}{2 \cdot 1} = 2 \][/tex]
Substituting [tex]\( x = 2 \)[/tex] back into the function to find the y-coordinate of the vertex:
[tex]\[ f(2) = 2(2 - 4) = 2(-2) = -4 \][/tex]
Thus, the vertex is at [tex]\((2, -4)\)[/tex].

### Function 3: [tex]\( f(x) = (x-4)(x+4) \)[/tex]
This function can be rewritten in the standard quadratic form:
[tex]\[ f(x) = x^2 - 16 \][/tex]
Using the vertex formula for [tex]\( ax^2 + bx + c \)[/tex], with [tex]\( a = 1 \)[/tex] and [tex]\( b = 0 \)[/tex], the vertex is:
[tex]\[ x = -\frac{b}{2a} = -\frac{0}{2 \cdot 1} = 0 \][/tex]
Substituting [tex]\( x = 0 \)[/tex] back into the function:
[tex]\[ f(0) = 0^2 - 16 = -16 \][/tex]
Thus, the vertex is at [tex]\((0, -16)\)[/tex].

### Function 4: [tex]\( f(x) = -x^2 \)[/tex]
This function is already in the standard quadratic form [tex]\(-x^2 + 0x + 0 \)[/tex], with [tex]\( a = -1 \)[/tex], [tex]\( b = 0 \)[/tex], and [tex]\( c = 0 \)[/tex]. The vertex formula [tex]\( x = -\frac{b}{2a} \)[/tex]:
[tex]\[ x = -\frac{0}{2 \cdot -1} = 0 \][/tex]
Substituting [tex]\( x = 0 \)[/tex] back into the function:
[tex]\[ f(0) = -(0)^2 = 0 \][/tex]
Thus, the vertex is at [tex]\((0, 0)\)[/tex].

### Conclusion:
The function that has a vertex at the origin [tex]\((0, 0)\)[/tex] is:
[tex]\[ f(x) = -x^2 \][/tex]

Thus, the correct answer is:
[tex]\[ \boxed{4} \][/tex]