Modeling a Vibrating Drumhead II

When you solve an initial boundary value problem, the boundary condition is used to find eigenvalues while initial conditions are used to determined Fourier coefficients of the series solution. In the previous discussion, we find the solution $R(r)=AJ_n(\lambda r)$ of Bessel’s equation. The boundary condition $R(1)=0$ results the equation $$J_n(\lambda)=0.$$ This is an eigenvalue equation and its solutions are called Bessel zeros. We can easily find Bessel zeros using Maple. First open Maple and type

Bess:=(n,m)->evalf(BesselJZeros(n,m));

and press enter. This defines a function Bess that returns $m$-th zero $\lambda_{nm}$ of $J_n(\lambda)$ for given positive integer $m$ as shown in the screenshot.


To calculate, for example, 1st zero of $J_0(\lambda)$ i.e. $\lambda_{01}$ simply type

Bess(0,1);

and press enter. It will return the value $2.40482558$ as shown in the screenshot.

In Maxima, unfortunately such a command (as BesselJZeros in Maple) does not appear to be available. But we can still find Bessel zeros using an elementary technique from calculus, Newton’s Method. If the initial approximation $x_0$ to a zero of a differentiable function $f(x)$ is given, then the $(n+1)$-th approximation is given by $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}.$$ In Maxima, Newton’s Method can be performed as follows. As an example we calculate the 1st Bessel zero of $J_0(\lambda)$.

First we define $J_0(x)$ as a function $f(x)$:

(%i1) f(x):=bessel_j(0,x);

Newton’s method applied to $f(x)$ is performed by

(%i2) newton(t):=subst(t,x,x-f(x)/diff(f(x),x));

To use Newton’s method we need the initial approximation. We can make a guess from its graph. As you can see the first zero is near 2, so we choose $x_0=2$. If you just run

(%i3) newton(2);

the output will not be a numerical value. In order to have a numerical value as output, run

(%i4) ev(newton(2),numer);

The output will be

(%o4)                          2.388210765567796

In order to calculate next approximation $x_1$, simply run

(%i5) ev(newton(%),numer);

and its output is

(%o5)                          2.404769548213657

For the next approximation $x_2$, again run

(%i6) ev(newton(%),numer);

and its output is

(%o6)                          2.404825557043583

This value is accurate to nine decimal places. If you think this is good enough, you can stop. The whole process is seen in the following screenshot.


Let us denote the eigenvalues by $\lambda_{nm}$. Then the radial eigenfunctions are given by $$R_{nm}(r)=J_n(\lambda_{nm}r).$$
The solution $U(r,\theta)$ to the Helmholtz boundary value problem is
$$U_{nm}(r,\theta)=J_n(\lambda_{nm}r)[A\cos(n\theta)+B\sin(n\theta)].$$
Using a simple trigonometric identity, one can write
$$A\cos(n\theta)+B\sin(n\theta)=\sqrt{A^2+B^2}\cos(n(\theta-\psi))$$ for some $\psi$. Thus $U_{nm}(r,\theta)$ can be written as
$$U_{nm}(r,\theta)=AJ_n(\lambda_{nm}r)\cos(n\theta).$$
Oscillatory facotrs satisfy the equation $$\ddot{T}_{nm}+\lambda_{nm}^2c^2T_{nm}=0$$ and they are
$$T_{nm}(t)=C\cos(\lambda_{nm}ct)+D\sin(\lambda ct).$$
Now we are ready to put pieces together to write down the solution $u(r,\theta,t)$ as the following Fourier series:
$$u(r,\theta,t)=\sum_{n=0}^\infty\sum_{m=1}^\infty J_n(\lambda_{nm}r)\cos(n\theta)[A_{nm}\cos(\lambda_{nm} ct)+B_{nm}\sin(\lambda_{nm}ct)].$$

The only things remained for us to do are to determine the unknown Fourier coefficients $A_{nm}$ and $B_{nm}$. We can determine the Fourier coefficients using the initial conditions $u(r,\theta,0)$ and $u_t(r,\theta,0)$. This will be discussed in the next lecture.

Symmetry and Transformations II

In this notes, we study the remaining transformations of a function, namely horizontal shifting, vertical shifting, and dilation (stretching and shrinking). We also discuss how those transformations can be used to sketch the graph of a complicated function from its most basic form.

Horizontal Shifting (translation to the right or left):

Example. Let us plot $y=x^2$, $y=(x-3)^2$, and $y=(x+3)^2$ all together. As you can see clearly, the graph of $y=(x-3)^2$ is 3 units translation to the right of the graph of $y=x^2$, while the graph of $y=(x+3)^2$ is 3 units translations to the left of the graph of $y=x^2$.

Let $a>0$. Then:

The graph of $y=f(x-a)$ is $a$ units translation to the right of the graph of $y=f(x)$;

The graph of $y=f(x+a)$ is $a$ units translation to the left of the graph of $y=f(x)$.

Vertical Shifting (translation upward or downward):

Example. Let us plot $y=x^2$, $y=x^2+3$, and $y=x^2-3$ all together. As you can see clearly, the graph of $y=x^2+3$ is 3 units translation upward of the graph of $y=x^2$, while the graph of $y=x^2-3$ is 3 units translations downward of the graph of $y=x^2$.

Let $a>0$. Then:

The graph of $y=f(x)+a$ is $a$ units translation to upward of the graph of $y=f(x)$;

The graph of $y=f(x)-a$ is $a$ units translation to downward of the graph of $y=f(x)$.

Stretching and Shrinking:

Example. Let us compare the graphs of $y=x^2$, $y=2x^2$ and $y=\frac{1}{2}x^2$. The graph of $y=2x^2$ looks thinner than the graph of $y=x^2$, while the graph of $y=\frac{1}{2}x^2$ looks wider than the graph of $y=x^2$. The graph of $y=2x^2$ can be considered as a (vetical) stretching of the graph of $y=x^2$. Similarly, the graph of $=\frac{1}{2}x^2$ can be considered as a (vetical) shrinking of the graph of $y=x^2$.

If $a>0$, the graph of $y=af(x)$ is a (vertical) stretching of the graph of $y=f(x)$;

If $0<a<1$, the graph of $y=af(x)$ is a (vertical) shrinking of the graph of $y=f(x)$.

Graphing functions using transformations: Sometimes we can sketch graph of a function by analyzing transformations involved such as reflection, stretching/shrinking, horizontal/vertical shifting.

Example. Sketch the graph of $f(x)=\frac{1}{3}x^3+2$ using transformations.

Solution. The most basic form of the function is $y=x^3$. So we obtain the graph of $f(x)$ from $y=x^3$

  1. first by shrinking $y=\frac{1}{3}x^3$
  2. and then translate the resultign function 2 units upward $y=\frac{1}{3}x^3+2$.

Example. Sketch the graph of $g(x)=-(x-3)^2+5$ using transformations.

Solution. The most basic form of the function is $y=x^2$. We obtain the graph of $g(x)$ from $y=x^2$

  1. first by reflection $y=-x^2$
  2. next translate the resulting function 3 units to the right
  3. and finally translate the resulting function 5 units upward.

Symmetry and Transformations I

Transformations of the graph of a function $y=f(x)$:

The transformations we consider include reflection, horizontal shifting, vertical shifting, stretching and shrinking. Here we discuss reflection and related symmetries. In the following notes, we will discuss the rest of transformations.

Reflection about the $x$-axis:

Example. Consider $y=\sqrt{x}$. If you plug in $-y$ for $y$, we obtain $-y=\sqrt{x}$ or $y=-\sqrt{x}$. Let us plot them all togather.


If you fold the two plots along the $x$-axis, the graphs of $y=\sqrt{x}$ and $y=-\sqrt{x}$ would overlap. So we can say that $y=-\sqrt{x}$ is the reflection of $y=\sqrt{x}$ with respect to $x$-axis, and vice versa.

In general, the graph of $y=-f(x)$ is the reflection of the graph of $y=f(x)$ with respect to the $x$-axis.

Reflection about the $y$-axis:

Example: Now this time we consider the function $y=2x+1$. If you plug in $-x$ for $x$, we obtain $y=-2x+1$. Let us plot them both again.

You can clearly see that if you fold the two plots along teh $y$-axis, they would overlap. So we can say that the graph of $y=-2x+1$ is the reflection of the graph of $y=2x+1$.

In general, the graph of $y=f(-x)$ is the reflection of the graph of $y=f(x)$ with respect to the $y$-axis.

Symmetry about the $y$-axis:

Example. Consider the function $f(x)=x^2-1$. If you plug in $-x$ for $x$, $f(-x)=(-x)^2-1=x^2-1=f(x)$. So the function is unchanged by the reflection with respect to the $y$-axis.

In general, if the function $y=f(x)$ satisfies the property $$f(-x)=f(x),$$ we say that the graph of $f(x)$ is symmetric about the $y$-axis.

Symmetry about the $x$-axis:

Example: Consider $x=y^2$. This is a function of the form $x=f(y)$. If you plug in $-y$ for $y$, $(-y)^2=y^2=x$. So the function still does not change.

In general, if the function $x=f(y)$ satisfies the property $$f(-y)=f(y),$$ we say that the graph of $x=f(y)$ is symmetric about the $x$-axis.

Symmetry about the origin:

Example: Consider the function $y=x^3$. If you plug in $-x$ for $x$ and $-y$ for $y$, the equation does not change.

The effect of $x\mapsto -x$ and $y\mapsto -y$ in the equation $y=f(x)$ amounts to rotating the graph of $y=f(x)$ about the origin by $180^\circ$. If the graph of $y=f(x)$ does not change after the rotation of the graph about the origin by $180^\circ$ (or equivalently $-y=f(-x)$ is the same as the equation $y=f(x)$), then we say that the graph is symmetric about the origin.

Even Functions and Odd Functions:

Definition. A function $y=f(x)$ is a called an even function if it satisfies $f(-x)=f(x)$. The reason such function is called even is that one of the simplest examples of even functions is of the form $x^{\mbox{even integer}}$, for instance, $x^2$, $x^4$, $x^6$, etc.

Definition. A function $y=f(x)$ is a called an odd function if it satisfies $f(-x)=-f(x)$. The reason such function is called odd is that one of the simplest examples of odd functions is of the form $x^{\mbox{odd integer}}$, for instance, $x$, $x^3$, $x^5$, etc.

From the equations we can easily see that the graph of an even functions is symmetric about the $y$-axis, while the graph of an odd function is symmetric about the origin.

Example. $f(x)=5x^7-6x^3-2x$ is an odd function because \begin{align*}f(-x)&=5(-x)^7-6(-x)^3-2(-x)\\&=-5x^7+6x^3+2x\\&=-f(x).\end{align*}

Remark. Note that a constant multiple of an odd function is an odd function and the sum of an odd functions is an odd function. Since each term $x^7$, $x^3$, $x$ are odd functions, we can also see that $f(x)$ is an odd function.

Example. $g(x)=5x^6-3x^2-7$ is an even function because \begin{align*}
g(-x)&=5(-x)^6-3(-x)^2-7\\&=5x^6-3x^2-7\\&=g(x).
\end{align*}

Remark. Note that a constant function (number) is an even function, a constant multiple of an even function is an even function and the sum of an even functions is an even function. Since each term $x^6$, $x^2$, $-7$ are even functions, we can also see that $g(x)$ is an even function.

Modeling a Vibrating Drumhead I

A vibrating drumhead can be modeled by wave equation in polar coordinates and appropriate boundary and initial conditions. The modeling problem can be set up as follows. We assume that our drumhead is a round disk with unit radius ($r=1$).

PDE: $u_{tt}=c^2\left(u_{rr}+\frac{1}{r}u_r+\frac{1}{r^2}u_{\theta\theta}\right),\ 0<r<1$

BC: $u=0$ when $r=1$, $0<t<\infty$

ICs: \begin{align*}u(r,\theta,0)&=f(r,\theta),\\u_t(r,\theta,0)&=g(r,\theta)
\end{align*}
Note that the expression inside () is the Laplacian $\nabla^2 u$ in polar coordinates, i.e. $$\nabla^2u=u_{rr}+\frac{1}{r}u_r+\frac{1}{r^2}u_{\theta\theta}.$$
Let $u(r,\theta,t)=U(r,\theta)T(t)$. $U(r,\theta)$ is the shape of the drumhead while $T(t)$ is the oscillatory factor. Then the PDE can be broken into two differential equtions, one PDE and one ODE:
\begin{align*}
\nabla^2U+\lambda^2U&=0\ (\mbox{Helmholtz equation})\\\ddot{T}+\lambda^2c^2T&=0\ (\mbox{Simple harmonic motion})
\end{align*}
With the boundary condition, we have the Helmholtz eigenvalue problem:
\begin{align*}
\nabla^2U+\lambda^2U&=0\\
U(1,\theta)&=0.
\end{align*}
To solve this Helmholtz eigenvalue problem, we assume that $U(r,\theta)=R(r)\Theta(\theta)$. Then the Helmholtz equation is broken into two ODEs with BCs:
\begin{align*}
r^2R^{\prime\prime}+rR’+(\lambda^2r^2-n^2)R&=0\ (\mbox{Bessel’s equation}),\\
R(1)&=0
\end{align*}
and
\begin{align*}
\Theta^{\prime\prime}+n^2\Theta&=0,\\
\Theta(0)&=\Theta(2\pi).
\end{align*}
The boundary condition for $\Theta(\theta)$ is imposed because we want $\Theta$ to be periodic with period $2\pi$. We also impose an additional condition for $R(r)$:
$$R(0)<\infty\ (\mbox{physical condition}).$$

Let us discuss the solutions of the Bessel’s equation. The Bessel’s equation has two independent solutions
$J_n(\lambda r)$ and $Y_n(\lambda r)$, where $$J_n(x)=\sum_{k=0}^\infty\frac{(-1)^kx^{2k+n}}{2^{2k+n}k!(n+k)!}$$ and $$Y_n(x)=\frac{2}{\pi}J_n(x)\left[\ln\left(\frac{x}{2}\right)+\gamma\right]+\frac{2^n}{\pi x^n}\sum_{k=0}^\infty\frac{\beta_{mk}}{2^{2k}k!}x^{2k}.$$
Here, $\gamma$ is called the Euler-Macheroni constant and is given by
$$\gamma=\lim_{n\to\infty}\left[\left(\sum_{k=1}^n\frac{1}{k}\right)-\ln n\right]$$
and $\beta_{mk}$ is defined by
$$\beta_{mk}=\left\{\begin{array}{ccc}
-(n-1-k)! & \rm{if} & k\leq n-1,\\(-1)^{k-n-1}\frac{h_{k-n}+h_k}{(k-n)!} & \rm{if} & k>m-1,
\end{array}\right.$$ where $h_p=\sum_{i=1}^p\frac{1}{i}$.
$J_n(x)$ is called Bessel function of the first kind and $Y_n(x)$ is Bessel function of the second kind. $Y_n(x)$ is also called Neumann function. The general solution $R(r)$ of the Bessel’s equation is then written as
$$R(r)=AJ_n(\lambda r)+BY_n(\lambda r).$$ Since $Y_n(\lambda r)$ is not defined at $r=0$, due to the boundary condition $R(0)<\infty$, we require that $B=0$. So we consider only Bessel function of the first kind $J_n(x)$ here. Let us plot Bessel function of the first kind using Maxima. In Maxima, Bessel function of the first kind of order $n$ and argument $x$, $J_n(x)$ is denoted by bessel_j(n,x). To plot $J_1(x)$, $0\leq x\leq 10$, type the command

plot2d(bessel_j(1,x),[x,0,10]);

and press enter as you see in the following screenshot.

Then you will see the plot.

If you want to plot $J_2(x)$, type the command

plot2d(bessel_j(2,x),[x,0,10]);

and press enter.

If you want to plot multiple Bessel functions, for example,  $J_1(x)$, $J_2(x)$, $J_3(x)$, $J_4(x)$,  type the command

plot2d([bessel_j(1,x),bessel_j(2,x),bessel_j(3,x),bessel_j(4,x)],[x,0,10]);

and press enter.

The Product and Quotient Rules

Product Rule: Let $u=f(x)$ and $v=g(x)$ be differentiable functions. Then $$(fg)'(x)=f(x)g'(x)+f'(x)g(x)$$ or $$\frac{d(uv)}{dx}=u\frac{dv}{dx}+\frac{du}{dx}v.$$

Proof. \begin{eqnarray*}(fg)'(x)&=&\lim_{\Delta x\to 0}\frac{fg(x+\Delta x)-fg(x)}{\Delta x}\\&=&\lim_{\Delta x\to 0}\frac{f(x+\Delta x)g(x+\Delta x)-f(x)g(x)}{\Delta x}\\&=&\lim_{\Delta x\to 0}\frac{f(x+\Delta x)g(x+\Delta x)-f(x)g(x+\Delta x)+f(x)g(x+\Delta x)-f(x)g(x)}{\Delta x}\\&=&\lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}g(x+\Delta x)+f(x)\lim_{\Delta x\to 0}\frac{g(x+\Delta x)-g(x)}{\Delta x}\\&=&f'(x)g(x)+f(x)g'(x).\end{eqnarray*} Note that $\displaystyle\lim_{\Delta x\to 0}g(x+\Delta x)=g(x)$ because $g(x)$ is continuous.

Example. Using the product rule, differentiate $(x^2+2x-1)(x^3-4x^2)$.

Solution. \begin{eqnarray*}\frac{d}{dx}[(x^2+2x-1)(x^3-4x^2)]&=&\frac{d(x^2+2x-1)}{dx}(x^3-4x^2)+(x^2+2x-1)\\&&\frac{d(x^3-4x^2)}{dx}\\&=&(2x+2)(x^3-4x^2)+(x^2+2x-1)(3x^2-8x)\\&=&(2x^4-6x^3-8x^2)+(3x^4-2x^3-19x^2+8x)\\&=&5x^4-8x^3-27x^2+8x.\end{eqnarray*} Multiplyng first, \begin{eqnarray*}(x^2+2x-1)(x^3-4x^2)&=&x^5-4x^4+2x^4-8x^3-x^3+4x^2\\&=&x^5-2x^4-9x^3+4x^2.\end{eqnarray*} The derivative of this is $5x^4-8x^3-27x^2+8x$ by the power rule and differentiation formulas we discussed here.

Reciprocal Rule (Baby Quotient Rule): Let $v=g(x)$ be a differentiable function with $g(x)\ne 0$. Then $$\left(\frac{1}{g}\right)'(x)=\frac{-g'(x)}{[g(x)]^2}$$ or $$\frac{d}{dx}\left(\frac{1}{v}\right)=-\frac{1}{v^2}\frac{dv}{dx}.$$

Proof. \begin{eqnarray*}\left(\frac{1}{g}\right)'(x)&=&\lim_{\Delta x\to 0}\frac{\frac{1}{g(x+\Delta x)}-\frac{1}{g(x)}}{\Delta x}\\&=&\lim_{\Delta x\to 0}\frac{\frac{g(x)-g(x+\Delta x)}{g(x+\Delta x)g(x)}}{\Delta x}\\&=&-\lim_{\Delta x\to 0}\frac{\frac{g(x+\Delta x)-g(x)}{\Delta x}}{g(x+\Delta x)g(x)}\\&=&-\frac{g'(x)}{[g(x)]^2}.\end{eqnarray*}

Example. Differentiate $\frac{1}{\sqrt{x}+2}$.

Solution. \begin{eqnarray*}\frac{d}{dx}\frac{1}{\sqrt{x}+2}&=&-\frac{d(\sqrt{x}+2)/dx}{(\sqrt{x}+2)^2}\\&=&-\frac{1}{2\sqrt{x}(\sqrt{x}+2)^2}.\end{eqnarray*}

Using the product rule and the reciprocal rule, we can prove

Quotient Rule: Let $u=f(x)$ and $v=g(x)$ be differentiable functions and assume that $g(x)\ne 0$. Then $$\left(\frac{f}{g}\right)'(x)=\frac{f'(x)g(x)-f(x)g'(x)}{[g(x)]^2}$$ or $$\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{\frac{du}{dx}v-u\frac{dv}{dx}}{v^2}.$$

Proof. \begin{eqnarray*}\left(\frac{f}{g}\right)'(x)&=&\left(f\frac{1}{g}\right)'(x)\\&=&f'(x)\frac{1}{g(x)}+f(x)\left(\frac{1}{g}\right)'(x)\ (\mbox{the product rule is applied})\\&=&\frac{f'(x)}{g(x)}-f(x)\frac{g'(x)}{[g(x)]^2}\ (\mbox{the reciprocal rule is applied})\\&=&\frac{f'(x)g(x)-f(x)g'(x)}{[g(x)]^2}.\end{eqnarray*}

Example. Find the derivative of $h(x)=\frac{2x+1}{x^2-2}$.

Solution. \begin{eqnarray*}h'(x)&=&\frac{(2x+1)'(x^2-2)-(2x+1)(x^2-2)’}{(x^2-2)^2}\\&=&\frac{2(x^2-2)-(2x+1)2x}{(x^2-2)^2}\\&=&\frac{2x^2-4-4x^2-2x}{(x^2-2)^2}\\&=&-\frac{2x^2+2x+4}{(x^2-2)^2}.\end{eqnarray*}

Example. Differentiate $\frac{x^2+2}{x^8}$.

Solution. Since the function is a rational function, you may hastily try to use the quotient rule to differentiate it. There is nothing wrong with that except there may be a simpler way to differentiate the function. In fact the function can be written as $$\frac{x^2+2}{x^8}=\frac{x^2}{x^8}+\frac{2}{x^8}=\frac{1}{x^6}+2x^{-8}=x^{-6}+2x^{-8}.$$ Thus the derivative is $$-6x^{-7}-16x^{-9}=-\frac{6}{x^7}-\frac{16}{x^9}.$$