Sufficient condition for irreducibility of homogeneous polynomial (Exercise I. 5.9 in Hartshorne) From Hartshorne Algebraic Geometry. Exercise I. 5.9 states:

Let $f\in k[x,y,z]$ be a homogeneous polynomial, let $Z(f)\subseteq \mathbf{P}^2$ be the algebraic set defined by $f$, and suppose that for every $P\ \in Z(f)$, at least one of $(\partial f /\partial x)(P)$, $(\partial f /\partial y)(P)$, $(\partial f /\partial z)(P)$ is nonzero. Show that $f$ is irreducible.

Hartshorne gives a hint to use Exercise I. 3.7., which states,

If $Y \in \mathbf{P}^n$ is a projective variety of dimension $\geq 1$,  and if $H$ is a hypersurface, then $Y \cap H \neq \emptyset$.

I tried the following:
Suppose that $\forall P \in Z(f)$, $(\partial f /\partial x)(P)$, $(\partial f /\partial y)(P)$, $(\partial f /\partial z)(P)$ are not all zero. This means that $Z(f) \cap Z(f_x, f_y, f_z) = \emptyset$. By exercise 3.7, $Y \cap H \neq \emptyset$ for $Y$ a variety and $H$ a a hypersurface (i.e., the zero set of a single irreducible polynomial). If $A$ is any algebraic set, then $A$ decomposes into irreducible components,
$A=W_1 \cup \dots \cup W_q$.
So $A \cap H=(W_1 \cup \dots \cup W_q) \cap H = [W_1 \cap H]\cup\dots\cup[W_q \cap H]$. By exercise 3.7, each $[W_i \cap H] \neq \emptyset$, hence $A \cap H \neq \emptyset$.
So, if $Z(f) \cap Z(f_x,f_y,f_z)=\emptyset$, then since $Z(f_x,f_y,f_z)$ is an algebraic set, $Z(f)$ cannot be a hypersurface. That is, $f$ cannot be irreducible.
Obviously this is very wrong, but even in such a simple argument I cannot pinpoint why. Please help. I am not looking for unrelated correct solutions to this exercise. I just want to understand the mistake in the above argument. Thank you.
Edit: By $f_x$ I mean $\partial f / \partial x$, the polynomial which is the partial derivative of $f$ with respect to $x$.
 A: Just because $Z(f)\cap Z(f_x,  f_y, f_z)\neq \phi$ does not imply that $Z(f)$ is not irreducible.
What we have is that the closure of $Z(f)\setminus Z(f_x, f_y, f_z)$ is the whole space $Z(f)$.
So we have $Z(f)= X_1\cup X_2$ where $X_1=Z(f)\setminus Z(f_x, f_y, f_z)$, $X_2=\overline{Z(f)\cap X_1}$. $X_1, X_2$ are both closed but $X_2=Z(f)$ so it doesn't contradict it being irreducible.
The point is that the intersection of the two curves will be points. But the closure of its complement in $Z(f)$ just yields the curve back.
A: $\mathcal{Z}(f_x, f_y,f_z)$ must have dimension at least one to apply the result from the Exercise I.3.7. Have you checked if this is true?
You will find that in fact this is not the case! $\mathcal{Z}(f_x, f_y,f_z)$ is $0$-dimensional!
Later edit: To see that $\mathcal{Z}(f_x, f_y,f_z)$ has dimension $0$ is very easy. Assume the contrary. Since $\mathcal{Z}(f)$ is an hypersurface (not necessarily irreducible) in $\mathbb{P}^2$, then using the Exercise I.3.7 we would get $\mathcal{Z}(f) \cap \mathcal{Z}(f_x, f_y,f_z) \neq \emptyset$, which is a contradiction.
I think it is a good idea to have a look at the Projective dimension theorem (Theorem I.7.2) from Hartshorne to see the general phenomena (the Exercise I.3.7 is just a particular case of this theorem).
Later edit #2 Write $f = p_1^{\alpha_1} \ldots p_l^{\alpha_l}$ with $p_i$ irreducible polynomials. Then
$$\mathcal{Z}(f) = \bigcup_{i=1}^l \mathcal{Z}(p_i)$$
Now, $\mathcal{Z}(p_i)$ are hypersurfaces as in the definition of Hartshorne. Then, working in the assumption that $\text{dim}(\mathcal{Z}(f_x, f_y,f_z)) \ge 1$ and applying Exercise I.3.7 we get that for any $i$
$$\mathcal{Z}(p_i) \cap \mathcal{Z}(f_x, f_y,f_z) \neq \emptyset$$
and hence, in particular
$$\mathcal{Z}(f) \cap \mathcal{Z}(f_x, f_y,f_z) \neq \emptyset$$
which is a contradiction.
