Taking the integral of unit vectors? Question: 

Solution: 

This is confusing to me since it appears the solution takes an integral of unit vectors. How is this possible? Can't you only take integrals of scalars?
The notation used is: $(x,y,z)$ is for rectangular coordinates, $(\rho,\varphi,z)$ for cylindrical coordinates and $(r,\theta,\varphi)$ for spherical coordinates. ${ { \hat { a }  } }_{ ρ }$ represents the unit vector for $\rho$ (same applies to $x, y, z$ and other coordinates).
For each of these integrals, can't you simply take the vector out of the integral? What is the unit vector being substituted with?
 A: In Cartesian coordinates, the integral of a vector (unit or not) is a vector, the components of which are the integrals of the respective components.
E.g.
$$\int \big(x(t),y(t)\big)\,dt=\left(\int x(t)\,dt,\int y(t)\,dt\right).$$
The integrals in the RHS are scalar. Same of course in 3D or with vector notation.
A: Yes, they are integrating vectors, with length 1, as the angle varies.
A: A definite integral is a limit of Riemann sums, and a Riemann sum is a linear combination of values of a function. The above make sense both for scalar and vector valued functions. For a vector-valued function (such as $\hat{a}_{\rho}$), the end result is a vector.
The rules for computing integrals of vector-valued functions are similar to those for scalar ones; for example, you can take a constant quantity (scalar or vector) outside the integral, but not a variable quantity. In the first example, $\hat{a}_{\rho}$ depends on $\varphi$, hence it can't be taken out; but $\hat{a}_x$ and $\hat{a}_{y}$ do not depend on $\varphi$, so you can move them outside the integral.
