202311081445 Pastime Exercise 006

The figure below is a representation of the \mathbf{E}-field by electric field lines in a family R of infinitely many quadratic functions

y_t(x_{t'})=a_tx_{t'}^2+b_tx_{t'}+c_t


Roughwork.

A tangent to any quadratic curve at some point in the locus gives the \mathrm{\pm ve} direction of the electric force experienced by a (positive) test charge placed there. I.e.,

\displaystyle{T(x_{t'},y_{t})=\frac{\mathrm{d}}{\mathrm{d}x}\big( y_t(x_{t'})\big) = 2a_tx_{t'}+b_{t}},

the slope of tangent.

WLOG we work with the first quadrant. First, begin with the repulsive force \mathrm{}_Q\mathbf{F}_{q} acting on the test charge +q due to point charge +Q.

\begin{aligned} \mathrm{}_QF_{q,x}^2+\mathrm{}_QF_{q,y}^2 & = \mathrm{}_QF_{q}^2 \\ \mathrm{}_QF_{q,y} & = \bigg(\frac{y_t}{x_{t'}+d/2}\bigg)\mathrm{}_QF_{q,x} \\ \cdots\cdots & \cdots\cdots\\ \mathrm{}_QF_{q,x} & = \frac{\mathrm{}_QF_{q}}{\sqrt{1+\Big(\frac{y_t}{x_{t'}+d/2}\Big)^2}} \\ \mathrm{}_QF_{q,y} & = \bigg(\frac{y_t}{x_{t'}+d/2}\bigg) \Bigg(\frac{\mathrm{}_QF_{q}}{\sqrt{1+\Big(\frac{y_t}{x_{t'}+d/2}\Big)^2}}\Bigg) \\ \cdots\cdots & \cdots\cdots\\ \mathrm{}_Q\mathbf{F}_{q} & = \mathrm{}_QF_{q,x}\,\hat{\mathbf{i}}+ \mathrm{}_QF_{q,y}\,\hat{\mathbf{j}} \\ \end{aligned}

Next, continue with the attractive force \mathrm{}_{-Q}\mathbf{F}_{q} acting on the test charge +q due to point charge -Q.

\begin{aligned} \mathrm{}_{-Q}F_{q,x}^2+\mathrm{}_{-Q}F_{q,y}^2 & = \mathrm{}_{-Q}F_{q}^2 \\ \mathrm{}_{-Q}F_{q,y} & = \bigg(\frac{y_t}{d/2-x_{t'}}\bigg)\mathrm{}_{-Q}F_{q,x} \\ \cdots\cdots & \cdots\cdots\\ \mathrm{}_{-Q}F_{q,x} & = \frac{\mathrm{}_{-Q}F_{q}}{\sqrt{1+\Big(\frac{y_t}{d/2-x_{t'}}\Big)^2}} \\ \mathrm{}_{-Q}F_{q,y} & = \bigg(\frac{y_t}{d/2-x_{t'}}\bigg) \Bigg(\frac{\mathrm{}_{-Q}F_{q}}{\sqrt{1+\Big(\frac{y_t}{d/2-x_{t'}}\Big)^2}}\Bigg) \\ \cdots\cdots & \cdots\cdots\\ \mathrm{}_{-Q}\mathbf{F}_{q} & = \mathrm{}_{-Q}F_{q,x}\,\hat{\mathbf{i}}+ \mathrm{}_{-Q}F_{q,y}\,\hat{\mathbf{j}} \\ \end{aligned}

Adding \mathrm{}_{Q}\mathbf{F}_{q} and \mathrm{}_{-Q}\mathbf{F}_{q} will give the resultant electric force \mathbf{F}_{E}(x_{t'},y_t).

Note that

\begin{aligned} \mathrm{}_QF_q & = k\frac{Q}{\mathrm{}_Qr_{q}^2} \\ \mathrm{}_{-Q}F_q & = k\frac{-Q}{\mathrm{}_{-Q}r_{q}^2} \\ \end{aligned}

where

\begin{aligned} \mathrm{}_Qr_q & = \sqrt{(d/2+x_{t'})^2+y_t^2} \\ \mathrm{}_{-Q}r_q & = \sqrt{(d/2-x_{t'})^2+y_t^2} \\ & \\ & \\ \end{aligned}

are the distances of a test charge at q(x_{t'},y_t) from point charges +Q at A(-d/2,0) and -Q at B(d/2,0).

The smallest angle between \mathbf{F}_{E}(x_{t'},y_{t}) and the level should be equal to the slope of tangent 2a_tx_{t'}+b_{t} at point q(x_{t'},y_t).

As of the vertex of each parabola, the x-coordinate is

\displaystyle{0=x_{t'}=-\frac{b_{t}}{2a_{t}}}

s.t. b_{t}=0, and the y-coordinate c_{t}=y_t(0).

I guess, under correction, the separation distance d is none any parameter of the loci.


Visualisation is \textrm{\scriptsize{NOT}} mathematical \textrm{\scriptsize{BUT}} conceptual.

202105251532 Homework 2 (Q1)

Prove that the electric field is always perpendicular to equipotential surface.


Solution.

(The solution below is based on the manuscript of 2016-2017 PHYS3450 Electromagnetism Homework 2 Solution.)

\mathbf{E} is the electric field vector; \mathbf{dr} is a line element vector on the equipotential surface.

For any two arbitrary points a and b on the equipotential surface, we have the same potential there (i.e., V(a)=V(b)). From -\int_a^b\mathbf{E}\cdot\mathbf{dr}=V(b)-V(a)=0. Thus \mathbf{E}\cdot \mathbf{dr}=0, or, \mathbf{E}\perp\mathbf{dr}.

202105241204 Homework 1 (Q3)

Prove

(a) \nabla \times (f\mathbf{A}) = f(\nabla \times \mathbf{A})-A\times (\nabla f)

(b) \nabla \times (\mathbf{A}\times \mathbf{B})=(\mathbf{B}\cdot\nabla )\mathbf{A}+(\nabla\cdot\mathbf{B})\mathbf{A}-(\mathbf{A}\cdot\nabla )\mathbf{B}-(\nabla\cdot\mathbf{A})\mathbf{B}


Attempts. (brute force)

(a)

\begin{aligned} & \quad \nabla\times (f\mathbf{A}) \\ & = \nabla \times (fA_x,fA_y,fA_z) \\ & = \begin{vmatrix} \hat{\mathbf{i}} & \hat{\mathbf{j}} & \hat{\mathbf{k}} \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\ fA_x & fA_y & fA_z \end{vmatrix} \\ & = \bigg( \frac{\partial}{\partial y}(fA_z)-\frac{\partial}{\partial z}(fA_y),\, \frac{\partial}{\partial z}(fA_x) - \frac{\partial}{\partial x}(fA_z),\, \frac{\partial}{\partial x}(fA_y) - \frac{\partial}{\partial y}(fA_x) \bigg) \\ & = \Bigg( \bigg( f\frac{\partial A_z}{\partial y} + \frac{\partial f}{\partial y}A_z - f\frac{\partial A_y}{\partial z} - \frac{\partial f}{\partial z}A_y \bigg) , \\ & \quad \qquad \bigg( f\frac{\partial A_x}{\partial z} + \frac{\partial f}{\partial z}A_x - f\frac{\partial A_z}{\partial x} - \frac{\partial f}{\partial x}A_z \bigg) , \\ & \qquad \qquad \bigg( f\frac{\partial A_y}{\partial x}-\frac{\partial f}{\partial x} - \frac{\partial f}{\partial y}A_x - f\frac{\partial A_x}{\partial y} \bigg) \Bigg) \\ & = f\Bigg( \bigg( \frac{\partial A_z}{\partial y} - \frac{\partial A_y}{\partial z} \bigg) ,\, \bigg( \frac{\partial A_x}{\partial z} - \frac{\partial A_z}{\partial z} \bigg),\, \bigg( \frac{\partial A_y}{\partial x} - \frac{\partial A_x}{\partial y}\bigg) \Bigg) \\ & \quad \qquad + \bigg( \frac{\partial f}{\partial y}A_z - \frac{\partial f}{\partial z}A_y,\, \frac{\partial f}{\partial z}A_x - \frac{\partial f}{\partial x}A_z,\, \frac{\partial f}{\partial x}A_y - \frac{\partial f}{\partial y}A_x \bigg) \\ & = f(\nabla \times \mathbf{A}) + \begin{vmatrix} \hat{\mathbf{i}} & \hat{\mathbf{j}} & \hat{\mathbf{k}} \\ \frac{\partial f}{\partial x} & \frac{\partial f}{\partial y} & \frac{\partial f}{\partial z} \\ A_x & A_y & A_z \end{vmatrix} \\ & = f(\nabla \times \mathbf{A}) + (\nabla f)\times\mathbf{A} \\ & = f(\nabla \times \mathbf{A}) - \mathbf{A}\times (\nabla f) \\ \end{aligned}

(b)

\begin{aligned} \textrm{LHS}\enspace & = \nabla \times (\mathbf{A}\times \mathbf{B}) \\ & = \nabla \times (A_yB_z-A_zB_y,\, -A_xB_z+A_zB_x,\, A_xB_y-A_yB_x) \\ & = \begin{vmatrix} \hat{\mathbf{i}} & \hat{\mathbf{j}} & \hat{\mathbf{k}} \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\ A_yB_z-A_zB_y & -A_xB_z + A_zB_x & A_xB_y - A_yB_x \end{vmatrix} \\ & = \Bigg( \bigg( \frac{\partial}{\partial y}(A_xB_y) - \frac{\partial}{\partial y}(A_yB_x) - \frac{\partial}{\partial z}(A_xB_z) + \frac{\partial}{\partial z}(A_zB_x) \bigg) ,\, \\ & \quad \qquad \bigg( -\frac{\partial}{\partial x}(A_xB_y) + \frac{\partial}{\partial x}(A_yB_x) + \frac{\partial}{\partial z}(A_yB_z) - \frac{\partial}{\partial z}(A_zB_y) \bigg) ,\, \\ & \qquad \qquad \bigg( \frac{\partial}{\partial x}(-A_xB_z) - \frac{\partial}{\partial x}(A_zB_x) - \frac{\partial}{\partial y}(A_yB_z) + \frac{\partial}{\partial y}(A_zB_y) \bigg) \Bigg) \\ & = \Bigg( \bigg( A_x\frac{\partial B_y}{\partial y} + \frac{\partial A_x}{\partial y}B_y - A_y\frac{\partial B_x}{\partial y} - \frac{\partial A_y}{\partial y}B_x - A_x\frac{\partial B_z}{\partial z} - \frac{\partial A_x}{\partial z}B_z + A_z\frac{\partial B_x}{\partial z} + \frac{\partial A_z}{\partial z}B_x \bigg) ,\, \\ & \quad \qquad \bigg( -A_x\frac{\partial B_y}{\partial x} - \frac{\partial A_x}{\partial x}B_y + A_y\frac{\partial B_x}{\partial x}+\frac{\partial A_y}{\partial x}B_x + A_y\frac{\partial B_z}{\partial z} + \frac{\partial A_y}{\partial z}B_z - A_z\frac{\partial B_y}{\partial z} - \frac{\partial A_z}{\partial z}B_y \bigg) ,\, \\ & \qquad \qquad \bigg( A_x\frac{\partial B_z}{\partial x} + \frac{\partial A_x}{\partial x}B_z - A_z\frac{\partial B_x}{\partial x} - \frac{\partial A_z}{\partial x}B_x - A_y\frac{\partial B_z}{\partial y} - \frac{\partial A_y}{\partial y}B_z + \frac{\partial A_z}{\partial y}B_y + A_z\frac{\partial B_y}{\partial y} \bigg) \Bigg) \\ \end{aligned}

\textrm{RHS}=(\mathbf{B}\cdot\nabla )\mathbf{A}+(\nabla\cdot\mathbf{B})\mathbf{A}-(\mathbf{A}\cdot\nabla )\mathbf{B}-(\nabla\cdot\mathbf{A})\mathbf{B}

Inspect these four terms on the right hand side by expanding one after the other.

The first term being

\begin{aligned} (\mathbf{B}\cdot\nabla )\mathbf{A} & = \bigg( B_x\frac{\partial}{\partial x} + B_y\frac{\partial}{\partial y} + B_z\frac{\partial}{\partial z} \bigg) \mathbf{A} \\ & = \bigg( B_x\frac{\partial A_x}{\partial x} + B_y\frac{\partial A_x}{\partial y} + B_z\frac{\partial A_x}{\partial z},\, \\ & \quad \qquad B_x\frac{\partial A_y}{\partial x} + B_y\frac{\partial A_y}{\partial y} + B_z\frac{\partial A_y}{\partial z},\, \\ & \qquad \qquad B_x\frac{\partial A_z}{\partial x} + B_y\frac{\partial A_z}{\partial y} + B_z\frac{\partial A_z}{\partial z} \bigg)\end{aligned}

the second term being

\begin{aligned} (\nabla \cdot \mathbf{B})\mathbf{A} & = \bigg( \frac{\partial B_x}{\partial x} + \frac{\partial B_y}{\partial y} + \frac{\partial B_z}{\partial z}\bigg)\mathbf{A} \\ & = \bigg( \frac{\partial B_x}{\partial x}A_x + \frac{\partial B_y}{\partial y}A_x + \frac{\partial B_z}{\partial z}A_x ,\, \\ & \quad \qquad \frac{\partial B_x}{\partial x}A_y + \frac{\partial B_y}{\partial y}A_y + \frac{\partial B_z}{\partial z}A_y , \, \\ & \qquad \qquad \frac{\partial B_x}{\partial x}A_z + \frac{\partial B_y}{\partial y}A_z + \frac{\partial B_z}{\partial z}A_z \bigg) \\ \end{aligned}

the third term being

\begin{aligned} -(\mathbf{A}\cdot\nabla )\mathbf{B} & = - \bigg( A_x\frac{\partial}{\partial x} + A_y\frac{\partial}{\partial y} + A_z\frac{\partial}{\partial z} \bigg) \mathbf{B} \\ & = -\bigg( A_x\frac{\partial B_x}{\partial x} + A_y\frac{\partial B_x}{\partial y} + A_z\frac{\partial B_x}{\partial z},\, \\ & \quad\qquad A_x\frac{\partial B_y}{\partial x} + A_y\frac{\partial B_y}{\partial y} + A_z\frac{\partial B_y}{\partial z},\, \\ & \qquad\qquad A_x\frac{\partial B_z}{\partial x} + A_y\frac{\partial B_z}{\partial y} + A_z\frac{\partial B_z}{\partial z} \bigg) \\\end{aligned}

and the fourth and last term being

\begin{aligned} -(\nabla \cdot \mathbf{A})\mathbf{B} & = -\bigg( \frac{\partial A_x}{\partial x} +\frac{\partial A_y}{\partial y} + \frac{\partial A_z}{\partial z} \bigg)\mathbf{B} \\ & = - \bigg( B_x\frac{\partial A_x}{\partial x} + B_x\frac{\partial A_y}{\partial y} + B_x\frac{\partial A_z}{\partial z} ,\, \\ & \quad\qquad B_y\frac{\partial A_x}{\partial x} + B_y\frac{\partial A_y}{\partial y} + B_y\frac{\partial A_z}{\partial z} ,\, \\ & \qquad \qquad B_z\frac{\partial A_x}{\partial x} + B_z\frac{\partial A_y}{\partial y} + B_z\frac{\partial A_z}{\partial z}\bigg) \\ \end{aligned}

One can check that \textrm{LHS}=\textrm{RHS}.


Solution. (proof)

(The solution below is based on the manuscript of 2016-2017 PHYS3450 Electromagnetism Homework 1 Solution.)

Using Einstein summation (/notation) and the Levi-Civita symbol \varepsilon_{ijk},

(a)

\begin{aligned} & \quad \nabla \times (f\mathbf{A}) \\ & = \sum_{i,j,k}\hat{\mathbf{e}}_i\frac{\partial}{\partial j}(f\mathbf{A}_k)\cdot\varepsilon_{ijk}\qquad\qquad\qquad i,j,k\in\{ x,y,z\} \\ & = \sum_{i,j,k}\hat{\mathbf{e}}_i\bigg(\frac{\partial}{\partial j}f\bigg)\cdot A_k\cdot\varepsilon_{ijk}+\sum_{i,j,k}\hat{\mathbf{e}}_i\bigg( \frac{\partial}{\partial j}A_k \bigg)\cdot f\cdot \varepsilon_{ijk} \\ & = (\nabla f)\times \mathbf{A} + f\cdot (\nabla\times\mathbf{A}) \\ & = (\nabla f)\times \mathbf{A} - A\times (\nabla f) \end{aligned}

(b)

\begin{aligned} \mathbf{A}\times\mathbf{B} & = \sum_{k,l,m}\hat{\mathbf{e}}_kA_lB_m\varepsilon_{klm}\\ \nabla\times (\mathbf{A}\times\mathbf{B}) & = \sum_{i,j,k}\hat{\mathbf{e}}_i\frac{\partial}{\partial j}(\sum_{l,m}A_lB_m\varepsilon_{klm})\varepsilon_{ijk} \\ & = \sum_{i,j,k,l,m}\hat{\mathbf{e}}_i \bigg[ \bigg( \frac{\partial}{\partial j}A_l \bigg) B_m + A_l\cdot \bigg( \frac{\partial}{\partial j}B_m\bigg) \bigg] \varepsilon_{klm}\varepsilon_{ijk} \\ \textrm{by } & \varepsilon_{klm}\varepsilon_{ijk} = \delta_{il}\delta_{jm} - \delta_{im}\delta_{jl} \\ \textrm{Thus, }& = \sum_{i,j,k,l,m}\hat{\mathbf{e}}_i \bigg[ \bigg( \frac{\partial}{\partial j}A_l \bigg) B_m + A_l\cdot \bigg( \frac{\partial}{\partial j}B_m\bigg) \bigg] (\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}) \\ & = \sum_{i,j,k,l,m}\bigg[ \hat{\mathbf{e}}_i\bigg( \frac{\partial}{\partial j}A_l \bigg) B_m\delta_{il}\delta_{jm} + \hat{\mathbf{e}}_i\bigg( \frac{\partial}{\partial j}A_l \bigg) B_m (-\delta_{im}\delta_{jl}) \\ & \quad\qquad + \hat{\mathbf{e}}_i\bigg( \frac{\partial}{\partial j}B_m\bigg) A_l\delta_{il}\delta_{jm} + \hat{\mathbf{e}}_i \bigg( \frac{\partial}{\partial j}B_m \bigg) A_l (-\delta_{im}\delta_{jl}) \bigg] \\ & = (\mathbf{B}\cdot\nabla )\mathbf{A}+(\nabla\cdot\mathbf{B})\mathbf{A}-(\mathbf{A}\cdot\nabla )\mathbf{B}-(\nabla\cdot\mathbf{A})\mathbf{B} \end{aligned}

QED

and the proof is more concise.

202104031305 Homework 1 (Q1)

Given two vectors \mathbf{A}=-4\,\hat{\mathbf{x}}-2\,\hat{\mathbf{y}}+\hat{\mathbf{z}} and \mathbf{B}=5\,\hat{\mathbf{x}}-3\,\hat{\mathbf{y}}-2\,\hat{\mathbf{z}}.

(a) Determine the angle \theta between \mathbf{A} and \mathbf{B}.

(b) Determine the angle that the vector \mathbf{A} makes with the y-axis, and the angle that the vector \mathbf{B} makes on the yz-plane when it is projected on it.

(c) The vector \mathbf{C} is the projection of vector \mathbf{A} on the xz-plane. Determine the unit vector along the direction of \mathbf{C}\times \mathbf{A}.

(d) Express the vector \mathbf{A} in terms of cylindrical coordinates, i.e., \mathbf{A}=a_r\,\hat{\mathbf{r}}+a_\theta\,\hat{\boldsymbol{\theta}}+a_z\,\hat{\mathbf{z}}, with vectors \hat{\mathbf{r}}, \hat{\boldsymbol{\theta}}, and \hat{\mathbf{z}} defined by the vector \mathbf{A}. Determine the unit vectors \hat{\mathbf{r}}, \hat{\boldsymbol{\theta}}, and \hat{\mathbf{z}} in terms of \hat{\mathbf{x}}, \hat{\mathbf{y}}, and \hat{\mathbf{z}}, and the values of the coefficients a_r, a_\theta, and a_z.


Solution.

(a) By the identity \mathbf{A}\cdot\mathbf{B}=|\mathbf{A}||\mathbf{B}|\cos\theta where \theta is the angle between vectors \mathbf{A} and \mathbf{B},

\begin{aligned} \mathbf{A}\cdot\mathbf{B} & = (-4)(5) + (-2)(-3) + (1)(-2) = -16 \\ |\mathbf{A}| & = \sqrt{(-4)^2 + (-2)^2 + (1)^2 } = \sqrt{21} \\ |\mathbf{B}| & = \sqrt{(5)^2 + (-3)^2 + (-2)^2 } =\sqrt{38} \end{aligned}

\begin{aligned} \cos\theta & = \frac{\mathbf{A}\cdot\mathbf{B}}{|\mathbf{A}||\mathbf{B}|} \\ & = \frac{(-16)}{(\sqrt{21})(\sqrt{38})} \\ & = \frac{-16}{\sqrt{798}} \\ \theta & = \arccos \bigg( \frac{-16}{\sqrt{798}} \bigg) \\ & \Bigg[ \textrm{\scriptsize{OR}} \quad \cos^{-1}\bigg( \frac{-16}{\sqrt{798}} \bigg) \Bigg] \end{aligned}

(b) Let the y-axis be denoted by the vector \mathbf{y}=(0,y,0).

Then

\begin{aligned} \mathbf{A}\cdot\mathbf{y} & = (-4)(0) + (-2)(y) + (1)(0) = -2y \\ |\mathbf{A}| & = \sqrt{(-4)^2+(-2)^2+(1)^2} = \sqrt{21}\\ |\mathbf{y}| & = \sqrt{(0)^2+(y)^2+(0)^2} = |y|\\ \end{aligned}

The angle \theta between vector \mathbf{A} and y-axis \mathbf{y} is given by

\begin{aligned} \theta & = \cos^{-1}\bigg( \frac{\mathbf{A}\cdot\mathbf{y}}{|\mathbf{A}||\mathbf{y}|} \bigg) \\ & = \cos^{-1}\bigg(\frac{-2y}{(\sqrt{21})(|y|)}\bigg) \\ & = \cos^{-1}\bigg(\frac{-2}{\sqrt{21}}\cdot \textrm{sgn}(y)\bigg) \\ \end{aligned}

where the sign function \textrm{sgn}(y) is defined below

\textrm{sgn}(y) = \begin{cases} +1 & \textrm{for\enspace}y\geqslant 0 \\ -1 & \textrm{for\enspace}y<0 \end{cases}

Let the yz-plane be denoted by the plane of vectors \mathbf{p}=(0,y,z) for any y,z\in\mathbb{R}.

Then,

\begin{aligned} \mathbf{B}\cdot\mathbf{y} & = (5,-3,-2)\cdot (0,y,z) \\ & = (5)(0)+(-3)(y)+(-2)(z) \\ & = -3y-2z \\ |\mathbf{B}| & = \sqrt{38} \\ |\mathbf{p}| & = \sqrt{y^2+z^2} \\ \theta & = \cos^{-1}\bigg( \frac{\mathbf{B}\cdot\mathbf{p}}{|\mathbf{B}||\mathbf{p}|}  \bigg) \\ & = \cos^{-1}\bigg( \frac{-3y-2z}{\sqrt{(38)(y^2+z^2)}} \bigg) \end{aligned}

Hold on, I smell a rat. Let’s go another way round. Find the angle \phi between vector \mathbf{B} and the x-axis \mathbf{x}=(x,0,0).

As a matter of routine, take dot product on \mathbf{B} and \mathbf{x}.

\begin{aligned} \mathbf{B}\cdot\mathbf{x} & = (5,-3,-2)\cdot (x,0,0) \\ & = (5)(x)+(-3)(0)+(-2)(0) \\ & = 5x \\ |\mathbf{B}| & = \sqrt{38} \\ |\mathbf{x}| & = \sqrt{x^2} = |x| \\ \phi & = \cos^{-1}\bigg( \frac{\mathbf{B}\cdot\mathbf{x}}{|\mathbf{B}||\mathbf{x}|}  \bigg) \\ & = \cos^{-1}\bigg( \frac{5x}{(\sqrt{38})(|x|)}\bigg) \\ & = \cos^{-1}\bigg( \frac{5}{\sqrt{38}}\cdot\textrm{sgn}(x) \bigg) \end{aligned}

The angle that the vector \mathbf{B} makes on the yz-plane is thus \theta =90^\circ - \phi.

Back to the original line of thought. I.e.,

\begin{aligned} \theta & = \cos^{-1}\bigg( \frac{\mathbf{B}\cdot\mathbf{p}}{|\mathbf{B}||\mathbf{p}|}  \bigg) \\ & =  \cos^{-1}\bigg( \frac{-3y-2z}{\sqrt{(38)(y^2+z^2)}} \bigg) \end{aligned}

When the vector \mathbf{B} is projected onto the yz-plane (i.e., \mathbf{p}), the angle of projection \theta is defined the angle between \mathbf{B} and its orthogonal projection \textrm{proj}_{\mathbf{p}}\mathbf{B} on that plane. It is clear that \textrm{proj}_{\mathbf{p}}\mathbf{B}=(0,-3,-2).

The more careful should have I written

\begin{aligned} \theta & = \cos^{-1}\bigg( \frac{\mathbf{B}\cdot\textrm{proj}_{\mathbf{p}}\mathbf{B}}{|\mathbf{B}||\textrm{proj}_{\mathbf{p}}\mathbf{B}|}  \bigg) \\ & = \cos^{-1}\bigg( \frac{(5,-3,-2)\cdot (0,-3,-2)}{(\sqrt{(5)^2+(-3)^2+(-2)^2})(\sqrt{(0)^2+(-3)^2+(-2)^2})} \bigg) \\ & = \cos^{-1}\bigg( \frac{13}{(\sqrt{38})(\sqrt{13})} \bigg) \\ & = \cos^{-1}\bigg(\sqrt{\frac{13}{38}} \bigg) \end{aligned}

As \theta=90^\circ - \phi, or, \theta +\phi =90^\circ

\cos (\theta +\phi )= \cos 90^\circ = 0.

One should check that

\cos\theta\cos\phi - \sin\theta\sin\phi = 0.

By brute force

\begin{aligned} \textrm{LHS} & = \cos\theta\cos\phi - \sin\theta\sin\phi \\ & = \bigg( \frac{\sqrt{13}}{\sqrt{38}}\bigg)\bigg( \frac{5}{\sqrt{38}}\bigg) - \bigg( \frac{\sqrt{(\sqrt{38})^2-(\sqrt{13})^2}}{\sqrt{38}}\bigg) \bigg( \frac{\sqrt{(\sqrt{38})^2-(5)^2}}{\sqrt{38}}\bigg) \\ & = 0 \\ & = \textrm{RHS} \end{aligned}

(c) \mathbf{C}=(-4,0,1)

\begin{aligned} \mathbf{C} \times \mathbf{A} & = \begin{bmatrix} \hat{\mathbf{x}} & \hat{\mathbf{y}} & \hat{\mathbf{z}} \\ -4 & 0 & 1 \\ -4 & -2 & 1 \end{bmatrix} \\ & = \begin{pmatrix} 0 & 1 \\ -2 & 1  \end{pmatrix} \hat{\mathbf{x}} - \begin{pmatrix} -4 & 1 \\ -4 & 1  \end{pmatrix} \hat{\mathbf{y}} + \begin{pmatrix} -4 & 0 \\ -4 & -2  \end{pmatrix} \hat{\mathbf{z}} \\ & = 2\,\hat{\mathbf{x}} + 8\,\hat{\mathbf{z}} \\ & = (2,0,8) \end{aligned}

Thus,

\begin{aligned} \hat{\mathbf{n}} & = \frac{\mathbf{C}\times\mathbf{A}}{|\mathbf{C}\times\mathbf{A}|} \\ & = \frac{(2,0,8)}{\sqrt{(2)^2+(0)^2+(8)^2}} \\ & = (\frac{2}{\sqrt{70}} , 0, \frac{8}{\sqrt{70}}) \end{aligned}

(d)

\begin{aligned} \hat{\mathbf{r}} & = \hat{\mathbf{x}}\cos\theta + \hat{\mathbf{y}}\sin\theta \\ \hat{\boldsymbol{\theta}} & = -\hat{\mathbf{x}}\sin\theta + \hat{\mathbf{y}}\cos\theta \\ \hat{\mathbf{z}} & = \hat{\mathbf{z}} \end{aligned}

As

\begin{aligned} \cos\theta & =\displaystyle{\frac{-4}{\sqrt{(-4)^2+(-2)^2}}=\frac{-4}{\sqrt{20}}} \\ \sin\theta & = \displaystyle{\frac{-2}{\sqrt{(-4)^2+(-2)^2}}=\frac{-2}{\sqrt{20}}} \end{aligned}
\begin{aligned} \hat{\mathbf{r}} & = -\frac{2\sqrt{5}}{5}\,\hat{\mathbf{x}} -\frac{\sqrt{5}}{5}\,\hat{\mathbf{y}}\\ \hat{\boldsymbol{\theta}} & = \frac{\sqrt{5}}{5}\,\hat{\mathbf{x}} -\frac{2\sqrt{5}}{5}\,\hat{\mathbf{y}} \\ \hat{\mathbf{z}} & = \hat{\mathbf{z}} \end{aligned}

\therefore \quad \mathbf{A}=2\sqrt{5}\,\hat{\mathbf{r}}+\hat{\mathbf{z}}.