# Divergence problem

1. Jan 26, 2016

### Dopplershift

So I have this problem which wants me to find the divergence of:

\vec{B}(x,y,z) = (x^3+y^2z)\hat{x}+(y^3+x^2z)\hat{y}

Given that the divergence is given by:

\nabla \cdot \vec{B} = (\hat{x}\frac{\partial}{\partial x}+ \hat{y}\frac{\partial}{\partial y}) \cdot (B_x \hat{x} +B_y \hat{y} ) = \frac{\partial B_x}{\partial x} + \frac{\partial B_y}{\partial y}

By doing that I get:

3x^2+3y^2

I feel like the answer should be a scalar, can someone give me a hint if I am doing the correct steps, or provide me a hint on where I am going wrong?

2. Jan 26, 2016

### RUber

$3x^2 + 3y^2$ is a scalar. It is just a different scalar at any given point in the plane.

3. Jan 26, 2016