I have a following equation: $$ \vec{K}=(\vec{n} \times i\vec{B}) G+\vec{B}\times\nabla G $$ where $$ \vec n=(1,0,0) \\ \vec{K}=(K_x, K_y, K_z)\\ \vec B=(B_x,B_y, B_z)\\ G=\frac {exp(-i|\vec r_1 - \vec r_2|)} {|\vec r_1 - \vec r_2|}\\ \vec r_{1,2} = (r_{x_{1,2}}, r_{y_{1,2}}) $$ My goal is to split this equation in 3 individual component equations for: $K_x$, $K_y$ and $K_z$.
The only part that troubles me is $\nabla G$ (which by the way is the same as $grad(G)$). When I use this formula in my numerical calculations, my $\vec r_1, \vec r_2$ are known (these are simple vectors in a 2D coordinate system). So basically the terms $r_x, r_y$ are known scalars and the term $grad(G)$ results in this.
If I understand it right, $\vec grad(G)$ becomes $0$ in any case since both $r_x, r_y$ components are scalars and in the result, a derivative is applied to $r_x$ and $r_y$ component - and a derivative of a constant scalar is $0$. If so, then the whole equation becomes very simple and I get $$ K_x = 0\\ K_y = -iB_zG\\ K_z=iB_yG $$
Do I see it right or is there a mistake that I can't recognize?