An archived instance of discourse for discussion in undergraduate PDE.

Laplace’s equation on a disk

Mark

Solve Laplace's equation $\Delta u = 0$ on the unit disk subject to the boundary condition $u(1,\theta)=\theta(2\pi-\theta)$.

shill2

Mark showed us in class and in the Mathematica notebook that the solution to the polar Laplacian: $u_{rr}+\frac{1}{r}u_r+\frac{1}{r^2}u_{\theta\theta}=0$ for the basic Dirichlet problem is $$u(r,\theta)=\frac{a_0}{2}+\Sigma^\infty_{n=1}r^n(a_ncos(n\theta)+b_nsin(n\theta))$$ where $a_n$ and $b_n$ are chosen to satisfy the boundary condition on the domain. In this case the domain is the unit disk, and the boundary condition is $u(1,\theta)=\theta(2\pi-\theta)$. Thus for this particular problem $a_n$ and $b_n$ are the full Fourier coefficients of the boundary condition. $$a_0=\frac{1}{\pi}\int_{0}^{2\pi}\theta(2\pi-\theta)d\theta=\frac{4\pi^2}{3}$$ $$a_n=\frac{1}{\pi}\int_{0}^{2\pi}\theta(2\pi-\theta)cos(n\theta)d\theta=2\int_{0}^{2\pi}\theta cos(n\theta)d\theta-\frac{1}{\pi}\int_{0}^{2\pi}\theta^2cos(n\theta)d\theta)$$ letting $u=\theta$ and $dv=cos(n\theta)d\theta$ for the first, and $u=\theta^2$ and $dv=cos(n\theta)d\theta$ for the second gives: $$\frac{-2}{n}\int_{0}^{2\pi}sin(n\theta)d\theta+\frac{2}{n\pi}\int_{0}^{2\pi}\theta sin(n\theta)d\theta$$ integrating again and noting that $cos(2n\pi) = 1$ $\forall n \in \{\mathbb{N}\cup 0\}$ gives: $$\frac{2}{n\pi}(-\frac{2\pi}{n}+\frac{1}{n}(\frac{sin(n\theta)}{n}\|_0^{2\pi})) = \frac{-4}{n^2}$$ Thus $a_n =\frac{-4}{n^2}$.
Now we can calculate $b_n$ as: $$b_n = \frac{1}{\pi}\int_{0}^{2\pi}\theta(2\pi-\theta)sin(n\theta)d\theta = 2\int_{0}^{2\pi}\theta sin(n\theta)d\theta-\frac{1}{\pi}\int_{0}^{2\pi}\theta^2sin(n\theta)d\theta$$. Using the same procedure as before (IBP) we get to: $$2(\frac{-\theta cos(n\theta)}{n}\|_0^{2\pi}+\frac{1}{n}\int_{0}^{2\pi}cos(n\theta)d\theta)-\frac{1}{\pi}(\frac{-\theta^2cos(n\theta)}{n}\|_0^{2\pi}+2\int_{0}^{2\pi}\frac{\theta cos(n\theta)}{n}d\theta)$$ Evaluating the cosines at $2\pi$ note that we get $cos(2n\pi)=1$ again. Additionally the middle integral goes to zero leaving: $$\frac{-4\pi}{n}-\frac{1}{\pi}(\frac{-4\pi^2}{n}+2\int_{0}^{2\pi}\frac{\theta cos(n\theta)}{n}d\theta) =$$ $$ \frac{-4\pi}{n}-\frac{1}{\pi}(\frac{-4\pi^2}{n}+\frac{2}{n}(\frac{\theta sin(n\theta)}{n}\|_0^{2\pi}-\frac{1}{n}\int_{0}^{2\pi}sin(n\theta)d\theta))$$ The $sin(2n\pi)$ and $0$ both evaluate to $0$, giving: $$\frac{-4\pi}{n}-\frac{1}{\pi}(\frac{-4\pi^2}{n}+\frac{2}{n}(\frac{-1}{n}(\frac{cos(n\theta)}{n}\|_0^{2\pi})))$$ With $cos(2n\pi)=1=cos(0)$ the right side evaluates to zero. Thus $$b_n= \frac{-4\pi}{n}+\frac{4\pi}{n}=0$$ Therefore: $$u(r,\theta) = \frac{2\pi^2}{3}-4\Sigma_{n=1}^{\infty}r^n(\frac{cos(n\theta)}{n^2}) $$. $\blacksquare$
I had one question for Mark though: given the length $L$ here is $2\pi$, and our cartesian Fourier coefficients are calculated using $sin(\frac{n\pi x}{L})$ or $cos(\frac{n\pi x}{L})$, why do we use $sin(n\theta)$ instead of $sin(\frac{n\theta}{2})$?

Mark

I think you dropped a factor of 4 somewhere but it's so close that I upvoted it anyway. I checked it with Mathematica as follows:

u[r_, t_] = 2 Pi^2/3 - Sum[r^n Cos[n*t]/n^2, {n, 1, 20}];
D[u[r, t], r, r] + D[u[r, t], r]/r + D[u[r, t], t, t]/r^2 // Expand
Plot[{u[1, t], t (2 Pi - t)}, {t, 0, 2 Pi}]

(* Out: 0 *)

The fact that the Laplacian returns zero means that your function certainly solves Laplace's equation. The plot shows that the boundary condition is a bit off but again, it's quite close. The correct answer is
$$u(r,\theta) = \frac{2\pi^2}{3}-4\sum_{n=1}^{\infty}r^n\left(\frac{\cos(n\theta)}{n^2}\right).$$

shill2

Thanks for catching that, I went back and edited my post to reflect the correction.
I checked my answer with the 4 out front and it worked perfectly!

rjensen

@shill2

I had one question for Mark though: given the length $L$ here is $2\pi$, and our cartesian Fourier coefficients are calculated using $sin(\frac{n\pi x}{L})$ or $cos(\frac{n\pi x}{L})$, why do we use $sin(n\theta)$ instead of $sin(\frac{n\theta}{2})$

So looking at the mathematica notebook for polar Laplacian the eigenvalues were $n^2$ and in general $\Theta(\theta)) = a_n sin(\sqrt{\lambda}\theta)) + b_n cos(\sqrt{\lambda}\theta)$. Plugging in $\lambda=n^2$ gives:

$$\Theta(\theta)) = a_n sin(n\theta)) + b_n cos(n\theta).$$

When we solved for $\lambda$ we didn't need to include $L$ I'm assuming because $L$ is a multiple of $\pi$, so there is no need to normalize for the length $L$. In contrast on a bar of length $L$ for rectangle coordinates $\lambda = \frac{n^2\pi^2}{L^2}$ which helps fulfill the boundary conditions when $L \ne 1$. When solving for the Fourier coefficients we still need to include $L$ in the equation.

$$a_n = \frac{2}{L}\int_0^{2\pi}f(\theta)sin(n\theta)dx = \frac{2}{2\pi}\int_0^{2\pi}f(\theta)sin(n\theta)dx=\frac{1}{\pi}\int_0^{2\pi}f(\theta)sin(n\theta)dx.$$

Hope that helps, I was confused about the same thing, but I think I mostly get it now.