# Where is pi/4 coming from in the line integral?

1. Nov 25, 2016

### garylau

• Moved from a technical forum, so homework template missing
Sorry

where is pi/4 coming from in the line integral(section 3)?

because i think it should be 1/2=tan(theta) which theta is 26.5651....

it is impossible that the angle is pi/4??? where is pi/4 coming from inside the circle?

thank

#### Attached Files:

• ###### images.jpg
File size:
34.3 KB
Views:
47
2. Nov 25, 2016

### vanhees71

Hm, I don't know what $\theta$ is. Also this should be posted in the home-work section of these forums. Thus I give only a hint:

I'd only do the quarter circle in cylindrical coordinates. All other parts of the path are very easily done in Cartesian ones. To give more specific hints, I'd need to know the conventions used concerning the angles (are $\theta$ and $\phi$ interchanged compared to the standard choice of spherical coordinates with $\theta$ the polar and $\phi$ the azimuthal angle?).

3. Nov 25, 2016

### garylau

in section 3
which is the part of the straight line toward z axis
i think the angle should not be pi/4?

this is spherical coordinate

4. Nov 25, 2016

### vanhees71

Ok, I assume that you have the standard definition of spherical coordinates with the $z$ axis as the polar axis, as
$$\begin{pmatrix}x\\y\\z \end{pmatrix}=r \begin{pmatrix} \cos \varphi \sin \vartheta \\ \sin \varphi \sin \vartheta \\ \cos \vartheta \end{pmatrix}.$$
Then the straight line parallel to the $z$ axis is at $\varphi=\pi/2=\text{const}$. Otherwise it's awful to describe in spherical coordinates.
For the quarter-circle it's easy to use spherical coordinates, it's given by $\vartheta=\pi/2$, $\varphi \in [0,\pi/2]$, $r=1$.
For the straight lines I'd use Cartesian coordinates, where they are expressed straight forwardly. It's easy to rewrite the field in terms of Cartesian coordinates. Just note that
$$\hat{r}=\begin{pmatrix} \cos \varphi \sin \vartheta \\ \sin \varphi \sin \vartheta \\ \cos \vartheta \end{pmatrix}, \quad \hat{\vartheta}=\begin{pmatrix} \cos \varphi \cos \vartheta \\ \sin \varphi \cos \vartheta \\ - \sin \vartheta \end{pmatrix}, \quad \hat{\varphi}=\begin{pmatrix} -\sin \varphi \\ \cos \varphi \\0 \end{pmatrix}.$$

5. Nov 26, 2016

### vela

Staff Emeritus
You're right. It's a mistake.