# Homework Help: Taylor expansion in radial coordinates

1. Aug 28, 2011

### MJD3366

1. The problem statement, all variables and given/known data

This shouldn't be so hard to do I guess, but I just cannot figure it out. The problem statement:

Prove that the special form of the discrete Laplacian operator in radial coordinates acting on a grid function $u_{l,m}$ at the central grid point $l=0, m=0$, given by:

$\displaystyle\delta_{\Delta\circ}u_{0,0}=\frac{4}{N_{\theta}h_{r}^{2}} \sum_{m=0}^{N_{\theta}-1} \left(u_{1,m}-u_{0,0}\right)$

is a second-order accurate approximation to the continuous Laplacian. In order to do this, consider the values of the grid function $u_{1,m}$ to be values of a continuous function at the location $x=h_{r}\cos mh_{\theta}, y=h_{r}\sin mh_{\theta}$ and perform Taylor expansions about the point $x=0, y=0$. To be clear: $h_{r}$ and $h_{\theta}$ denote the radial and angular grid spacings respectively.

2. Relevant equations

$\displaystyle u_{1,m} = u\left(x,y\right) = u\left(h_{r}\cos mh_{\theta}, h_{r}\sin mh_{\theta}\right)$

$\displaystyle u\left(x,y\right) = u\left(0,0\right) + x \frac{\partial u}{\partial x} + y \frac{\partial u}{\partial y} + \frac{1}{2!} \left(x^{2}\frac{\partial^{2}u}{\partial x^{2}} + 2xy \frac{\partial^{2}u}{\partial x\partial y} + y^{2}\frac{\partial^{2}u}{\partial y^{2}}\right) + \dots$

$\displaystyle \frac{\partial u}{\partial x} = \cos mh_{\theta} \frac{\partial u}{\partial h_{r}} - \frac{\sin mh_{\theta}}{h_{r}} \frac{\partial u}{\partial mh_{\theta}}$

$\displaystyle \frac{\partial u}{\partial y} = \sin mh_{\theta} \frac{\partial u}{\partial h_{r}} + \frac{\cos\displaystyle mh_{\theta}}{h_{r}} \frac{\partial u}{\partial mh_{\theta}}$

$\displaystyle \frac{\partial^{2}u}{\partial x^{2}} = \cos^{2}mh_{\theta} \frac{\partial^{2}u}{\partial h_{r}^{2}} - \frac{2\sin mh_{\theta}\cos mh_{\theta}}{h_{r}} \frac{\partial^{2}u}{\partial h_{r}\partial mh_{\theta}} + \frac{\sin^{2}mh_{\theta}}{h_{r}^{2}} \frac{\partial^{2}u}{\partial \left(mh_{\theta}\right)^{2}} + \frac{\sin^{2}mh_{\theta}}{h_{r}} \frac{\partial u}{\partial h_{r}} + \frac{2\sin mh_{\theta}\cos mh_{\theta}}{h_{r}^{2}} \frac{\partial u}{\partial mh_{\theta}}$

$\displaystyle \frac{\partial^{2}u}{\partial y^{2}} = \sin^{2}mh_{\theta} \frac{\partial^{2}u}{\partial h_{r}^{2}} + \frac{2\sin mh_{\theta}\cos mh_{\theta}}{h_{r}} \frac{\partial^{2}u}{\partial h_{r}\partial mh_{\theta}} + \frac{\cos^{2}mh_{\theta}}{h_{r}^{2}} \frac{\partial^{2}u}{\partial \left(mh_{\theta}\right)^{2}} + \frac{\cos^{2}mh_{\theta}}{h_{r}} \frac{\partial u}{\partial h_{r}} - \frac{2\sin mh_{\theta}\cos mh_{\theta}}{h_{r}^{2}} \frac{\partial u}{\partial mh_{\theta}}$

$\displaystyle \frac{\partial^{2}u}{\partial x\partial y} = \sin mh_{\theta}\cos mh_{\theta} \frac{\partial^{2}u}{\partial h_{r}^{2}} + \frac{1}{h_{r}} \left(\cos^{2}mh_{\theta} - \sin^{2}mh_{\theta}\right) \frac{\partial^{2}u}{\partial h_{r}\partial h_{\theta}} - \frac{\sin mh_{\theta}\cos mh_{\theta}}{h_{r}^{2}} \frac{\partial^{2}u}{\partial mh_{\theta}}$

$\displaystyle \Delta u=\frac{\partial^{2}u}{\partial r^{2}} + \frac{1}{r^{2}} \frac{\partial^{2}u}{\partial\theta^{2}} + \frac{1}{r} \frac{\partial u}{\partial r}$

3. The attempt at a solution

From what I can make up from the problem statement, I thought the way to go to solve this problem is just to substitute for the cartesian operators and variables in terms of the radial ones up to second-order in the expansion of $u_{1,m}$ and then by cancellation I would be left with something which resembles the continuous Laplacian in radial coordinates. However, when I do this I get the following result:

$\displaystyle u_{1,m} = u\left(h_{r}\cos mh_{\theta},h_{r}\sin mh_{\theta}\right) = u\left(0,0\right) + h_{r} \frac{\partial u}{\partial h_{r}} + \frac{1}{2!}\left[h_{r}^{2} \frac{\partial^{2}u}{\partial h_{r}^{2}} + 2h_{r}\sin^{2}mh_{\theta}\cos^{2}mh_{\theta} \frac{\partial u}{\partial h_{r}} + 2\sin mh_{\theta}\cos mh_{\theta}\left(\cos^{2}mh_{\theta} - \sin^{2}mh_{\theta}\right) \frac{\partial u}{\partial mh_{\theta}}\right]$

This substitution is kind of tedious, so I have carried it out twice now in order to avoid any mistakes, but this is the result I get. The first term naturally cancels with the term $u_{0,0}$ from the definition and the linear term seems to be correct (shouldn't this cancel, since it shoulde be second-order accurate???). However, the second-order terms do not really fit in for some reason. The first second-order term looks sort of right (except for a factor of 2 that is), but the other two second-order terms don't make much sense. Maybe I am going about this in completely the wrong way, but I do not really no what do differently really...

If someone could help me out with this, I would be very grateful.

2. Sep 1, 2011

### MJD3366

Is there nobody who can help me out with this? Maybe the problem statement is not clear enough? (although this is exactly how it is stated in the original text).

3. Sep 3, 2011

### foxjwill

I'm currently trying my hand it this guy, but you might consider also posting this on the advanced physics part of the homework subform. These are the kind of manipulations physicists eventually become quite adept at doing.

EDIT: [STRIKE]Alright, I got it. Try substituting your expressions for $\frac{\partial^2u}{\partial x^2}$ and $\frac{\partial^2u}{\partial y^2}$ into the rectangular Laplacian.[/STRIKE]

EDIT: I take that back. oops.

Last edited: Sep 3, 2011
4. Sep 4, 2011

### MJD3366

Wow, how embarrassing...

I made a huge mistake regarding the operator $\frac{\partial^2}{\partial x\partial y}$. In my haste I assumed you could just multiply the operators $\frac{\partial}{\partial x}$ and $\frac{\partial}{\partial y}$, but this obviously is not true. It's correct expression is:

$\displaystyle \frac{\partial^2}{\partial x\partial y} = \sin mh_{\theta}\cos mh_{\theta} \frac{\partial^2}{\partial h_r^2} + \frac{\sin^2mh_{\theta} - \cos^2mh_{\theta}}{h_r^2} \frac{\partial}{\partial mh_{\theta}} - \frac{\sin^2mh_{\theta} - \cos^2mh_{\theta}}{h_r} \frac{\partial^2}{\partial h_r\partial mh_{\theta}} + \frac{\sin^2mh_{\theta} - \cos^2mh_{\theta}}{h_r^2} \frac{\partial}{\partial mh_{\theta}} - \frac{\sin mh_{\theta}\cos mh_{\theta}}{h_r^2} \frac{\partial^2}{\partial mh_{\theta}^2}$

Haven't yet got around to trying this out, but surely this is why I did not end up with the right answer to the original problem.

5. Sep 5, 2011

### MJD3366

[STRIKE]
][/STRIKE]

This isn't right, I made some errors again. It really should be:

$\displaystyle \frac{\partial^2}{\partial x\partial y} = \sin mh_{\theta}\cos mh_{\theta} \frac{\partial^2}{\partial h_r^2} - \frac{\sin mh_\theta\cos mh_\theta}{h_r} \frac{\partial}{\partial h_r} - \frac{\sin^2mh_{\theta} - \cos^2mh_{\theta}}{h_r} \frac{\partial^2}{\partial h_r\partial mh_{\theta}} + \frac{\sin^2mh_{\theta} - \cos^2mh_{\theta}}{h_r^2} \frac{\partial}{\partial mh_{\theta}} - \frac{\sin mh_{\theta}\cos mh_{\theta}}{h_r^2} \frac{\partial^2}{\partial mh_{\theta}^2}$