# Line Integral

1. Sep 28, 2014

### leonardthecow

1. The problem statement, all variables and given/known data
Hi there! So I'm working on an old homework problem for review so that I actually have the solution, but I'm not sure how to compute a certain part. Here it is:

$$\int \int rcos^2(\theta)dr - r^2cos(\theta)\sin(\theta)d\theta$$

2. Relevant equations
The solution involves (what I think is) a rewrite of $$dr$$ in terms of $$d\theta$$, but I don't follow the substitutions the author makes.

3. The attempt at a solution
Any thoughts on how to approach a problem like this? Thanks!

2. Sep 28, 2014

### LCKurtz

You have titled this thread "line integral". But it doesn't look like a line integral since it is a double integral. You haven't given us a statement of the problem or any equations to work with. We aren't mind readers.

3. Sep 28, 2014

### leonardthecow

Well, the original problem is to compute the line integral of $$v= r\cos^2(\theta)\hat{r} -r\cos(\theta)\sin(\theta)\hat{\theta} +3r \hat{\phi}$$ around a path depicted in the text. The path, in terms of spherical coordinates, runs as follows, broken into 3 segments:

1) $$r:0 \rightarrow 1, \theta = \frac{\pi}{2}, \phi = 0$$

2) $$r=1, \theta= \frac{\pi}{2}, \phi: 0 \rightarrow \frac{\pi}{2}$$

3) $$r: 1 \rightarrow \sqrt{5}, \phi = \frac{\pi}{2}, \theta: \frac{\pi}{2} \rightarrow \arctan(1/2)$$

The integral comes from computing the dot product of v with dl along the third path. I didn't inclue the rest of the problem since my question is one of how to reduce th double integral to a single integral in theta, as the author did in the solution.

4. Sep 28, 2014

### Orodruin

Staff Emeritus
Assuming that (3) is a straight line, you can parametrize it using the angle $\theta$ as the curve parameter. You can then use the relation $dr = \frac{dr}{d\theta} d\theta$ (essentially the chain rule) to rewrite the differential. Note that what you want for $r(\theta)$ is a linear function such that $r(\pi/2) = 1$ and $r(\arctan(1/2)) = \sqrt 5$.

5. Sep 28, 2014

### leonardthecow

Ah thank you! That's the step I was missing, 3 is a straight line. This is exactly what I needed.