3.2  Quizz 2

  3.2.1  Problem 1
  3.2.2  Problem 2
  3.2.3  Problem 3
  3.2.4  Problem 4
  3.2.5  key solution
PDF (letter size)
PDF (legal size)

3.2.1  Problem 1

Problem Solve the wave equation \(u_{tt}=u_{xx}\) for infinite domain \(-\infty <x<\infty \) with initial position \(u\left ( x,0\right ) =f\left ( x\right ) =\frac{1}{1+x^{2}}\) and zero initial velocity \(g\left ( x\right ) =0\). Plot the solution for \(t=0,1,2\) seconds.

solution

The solution for wave PDE \(u_{tt}=a^{2}u_{xx}\) on infinite domain can be written as a series solution or as general solution using D’Alembert form. Using D’Alembert, the solution is\[ u\left ( x,t\right ) =\frac{1}{2}\left ( f\left ( x-at\right ) +f\left ( x+at\right ) \right ) +\frac{1}{2a}\int _{x-at}^{x+at}g\left ( s\right ) ds \] Where in this problem \(a=1\) and \(g\left ( x\right ) =0\). Therefore the above simplifies to\[ u\left ( x,t\right ) =\frac{1}{2}\left ( f\left ( x-t\right ) +f\left ( x+t\right ) \right ) \] \(f\left ( x-t\right ) \) is the initial position shifted to the right by \(t\) and \(f\left ( x+t\right ) \) is the initial position shifted to the left by \(t\). Since \(f\left ( x\right ) =\frac{1}{1+x^{2}}\), the above solution becomes\[ u\left ( x,t\right ) =\frac{1}{2}\left ( \frac{1}{1+\left ( x-t\right ) ^{2}}+\frac{1}{1+\left ( x+t\right ) ^{2}}\right ) \] This is a plot of the solution at time \(t=0\) (which is just \(\frac{1}{1+x^{2}}\))


pict

This is a plot of the solution at time \(t=1\)


pict

This is a plot of the solution at time \(t=2\)


pict

The above shows that, eventually, the initial position splits into two halves, where one half moves to the right and one half moves to the left, but the sum (energy) of the parts remain equal to that at \(t=0\) since there is no damping. An Animation was also made of this solution for better illustration.

3.2.2  Problem 2

Problem Apply the method of separation of variables to the damped wave equation \(u_{tt}+2u_{t}=u_{xx}\) on finite domain with fixed ends \(u\left ( 0,t\right ) =0\) and \(u\left ( \pi ,t\right ) =0\). Let initial position be \(u\left ( x,0\right ) =f\left ( x\right ) \) and initial velocity \(u_{t}\left ( x,0\right ) =0\). Determine the first term in the series solution.

solution

Let the solution be \(u\left ( x,t\right ) =X\left ( x\right ) T\left ( t\right ) \). Substituting this back into the PDE gives\[ T^{\prime \prime }X+2T^{\prime }X=X^{\prime \prime }T \] Dividing throughout by \(XT\neq 0\,\) and simplifying gives\[ \frac{T^{\prime \prime }}{T}+2\frac{T^{\prime }}{T}=\frac{X^{\prime \prime }}{X}=-\lambda \] Hence the eigenvalue ODE is\begin{align} X^{\prime \prime }+\lambda X & =0\tag{1}\\ X\left ( 0\right ) & =0\nonumber \\ X\left ( \pi \right ) & =0\nonumber \end{align}

And the corresponding time ODE\begin{equation} T^{\prime \prime }+2T^{\prime }+\lambda T=0 \tag{2} \end{equation} The eigenvalue ODE for the homogeneous boundary condition was solved before. The eigenvalues are \[ \lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2}\qquad n=1,2,3,\cdots \] Since \(L=\pi \), the above becomes\begin{equation} \lambda _{n}=n^{2}\qquad n=1,2,3,\cdots \tag{3} \end{equation} The corresponding eigenfunctions are\[ X_{n}\left ( x\right ) =c_{n}\sin \left ( nx\right ) \] Now that the eigenvalues are found, the time ODE (2) is solved. \[ T_{n}^{\prime \prime }+2T_{n}^{\prime }+n^{2}T_{n}=0 \] This is constant coefficient ODE. The characteristic equation is\[ r^{2}+2r+n^{2}=0 \] The roots are \begin{align*} r & =\frac{-b\pm \sqrt{b^{2}-4ac}}{2a}\\ & =\frac{-2\pm \sqrt{4-4n^{2}}}{2}\\ & =-1\pm \sqrt{1-n^{2}} \end{align*}

For \(n=1\) the root becomes \(r=-1\) (double root), hence the solution is\begin{equation} T_{1}\left ( t\right ) =A_{1}e^{-t}+B_{1}te^{-t} \tag{4} \end{equation} And for the remaining value \(n=2,3,\cdots \), the term \(\sqrt{1-n^{2}}\) becomes complex. Therefore the roots can now be written as \(r=-1\pm i\sqrt{n^{2}-1}\). This implies that the solution can be expressed using trigonometric functions as\begin{equation} T_{n}\left ( t\right ) =e^{-t}\left ( A_{n}\cos \left ( t\sqrt{n^{2}-1}\right ) +B_{n}\sin \left ( t\sqrt{n^{2}-1}\right ) \right ) \qquad n=2,3,\cdots \tag{5} \end{equation} Since initial velocity is zero at \(t=0\), then (4) leads to \(T_{1}^{\prime }=-A_{1}e^{-t}+B_{1}e^{-t}-tB_{1}e^{-t}\). At \(t=0\) this gives \(0=-A_{1}+B_{1}\). Therefore solution (4) becomes\begin{equation} T_{1}\left ( t\right ) =A_{1}\left ( e^{-t}+te^{-t}\right ) \tag{4A} \end{equation} Taking time derivative for (5) gives

At \(t=0\) the above becomes\[ 0=-A_{n}+B_{n}\sqrt{n^{2}-1}\] Hence \(A_{n}=B_{n}\sqrt{n^{2}-1}\) and (5) reduces to\begin{equation} T_{n}\left ( t\right ) =B_{n}e^{-t}\left ( \sqrt{n^{2}-1}\cos \left ( t\sqrt{n^{2}-1}\right ) +\sin \left ( t\sqrt{n^{2}-1}\right ) \right ) \qquad n=2,3,\cdots \tag{5A} \end{equation} Therefore the fundamental solution is\begin{align} u_{n}\left ( x,t\right ) & =T_{n}\left ( t\right ) X_{n}\left ( x\right ) \nonumber \\ u\left ( x,t\right ) & =\sum _{n=1}^{\infty }T_{n}\left ( t\right ) X_{n}\left ( x\right ) \nonumber \\ & =T_{1}\left ( t\right ) X_{1}\left ( x\right ) +\sum _{n=2}^{\infty }T_{n}\left ( t\right ) X_{n}\left ( x\right ) \nonumber \\ & =c_{1}\left ( \left ( e^{-t}+te^{-t}\right ) \sin x\right ) +\sum _{n=2}^{\infty }c_{n}e^{-t}\left ( \sqrt{n^{2}-1}\cos \left ( t\sqrt{n^{2}-1}\right ) +\sin \left ( t\sqrt{n^{2}-1}\right ) \right ) \sin \left ( nx\right ) \tag{6} \end{align}

Where the constant \(A_{1}\) was combined into \(c_{1}\) and \(B_{n}\) combined into \(c_{n}\). The constants \(c_{1}\) and \(c_{n}\) are now found from initial position. At \(t=0\) (6) becomes\[ f\left ( x\right ) =c_{1}\sin x+\sum _{n=2}^{\infty }c_{n}\sqrt{n^{2}-1}\sin \left ( nx\right ) \] Multiplying both sides by \(\sin \left ( mx\right ) \) and Integrating gives\begin{equation} \int _{0}^{\pi }f\left ( x\right ) \sin \left ( mx\right ) dx=\int _{0}^{\pi }c_{1}\sin x\sin \left ( mx\right ) dx+\sum _{n=2}^{\infty }c_{n}\sqrt{n^{2}-1}\left ( \int _{0}^{\pi }\sin \left ( nx\right ) \sin \left ( mx\right ) dx\right ) \tag{7} \end{equation} For \(m=1\) the above reduces to\begin{align*} \int _{0}^{\pi }f\left ( x\right ) \sin xdx & =\int _{0}^{\pi }c_{1}\sin ^{2}xdx\\ \int _{0}^{\pi }f\left ( x\right ) \sin xdx & =\frac{\pi }{2}c_{1}\\ c_{1} & =\frac{2}{\pi }\int _{0}^{\pi }f\left ( x\right ) \sin xdx \end{align*}

And for \(m=2,3,\cdots \) (7) becomes\begin{align*} \int _{0}^{\pi }f\left ( x\right ) \sin \left ( mx\right ) dx & =\overset{0}{\overbrace{\int _{0}^{\pi }c_{1}\sin x\sin \left ( mx\right ) dx}}+c_{m}\sqrt{m^{2}-1}\left ( \int _{0}^{\pi }\sin ^{2}\left ( mx\right ) dx\right ) \\ & =c_{m}\sqrt{m^{2}-1}\left ( \int _{0}^{\pi }\sin ^{2}\left ( mx\right ) dx\right ) \end{align*}

Hence for \(n=2,3,\cdots \) the above gives\[ \int _{0}^{\pi }f\left ( x\right ) \sin \left ( nx\right ) dx=c_{n}\sqrt{n^{2}-1}\left ( \frac{\pi }{2}\right ) \] Therefore\[ c_{n}=\frac{2}{\pi \sqrt{n^{2}-1}}\int _{0}^{\pi }f\left ( x\right ) \sin nxdx\qquad n=2,3,\cdots \] This completes the solution. The final solution from (6) becomes\begin{align*} u\left ( x,t\right ) & =\left ( \frac{2}{\pi }\int _{0}^{\pi }f\left ( x\right ) \sin xdx\right ) \left ( e^{-t}+te^{-t}\right ) \sin \left ( x\right ) \\ & +\frac{2}{\pi }\sum _{n=2}^{\infty }\frac{\int _{0}^{\pi }f\left ( x\right ) \sin \left ( nx\right ) dx}{\sqrt{n^{2}-1}}e^{-t}\left ( \sqrt{n^{2}-1}\cos \left ( t\sqrt{n^{2}-1}\right ) +\sin \left ( t\sqrt{n^{2}-1}\right ) \right ) \sin \left ( nx\right ) \end{align*}

To test the solution, it is compared to numerical differential equation solution. Using \(f\left ( x\right ) =x\left ( \pi -x\right ) \) as an example. The result showed an exact match. An animation was also made. Therefore the first term is\[ \left ( \frac{2}{\pi }\int _{0}^{\pi }f\left ( x\right ) \sin xdx\right ) \left ( e^{-t}+te^{-t}\right ) \sin \left ( x\right ) \] And for \(n=2,3,\cdots \) the \(n^{th}\) term is\[ \left ( \frac{2}{\pi }\int _{0}^{\pi }f\left ( x\right ) \sin \left ( nx\right ) dx\right ) \frac{e^{-t}\left ( \sqrt{n^{2}-1}\cos \left ( t\sqrt{n^{2}-1}\right ) +\sin \left ( t\sqrt{n^{2}-1}\right ) \right ) \sin \left ( nx\right ) }{\sqrt{n^{2}-1}}\]

3.2.3  Problem 3

Problem Solve \(u_{xx}+u_{yy}=0\) on the square \(0\leq x,y\leq 1\). If \(u\left ( 0,y\right ) =u\left ( x,0\right ) =u\left ( x,1\right ) =0\) and \(u\left ( 1,y\right ) =y-y^{2}\). Find an approximate value for \(u\left ( \frac{1}{2},\frac{1}{2}\right ) \)

solution To make the solution steps more useful and general, \(a\) is used for the length of the \(x\) dimension and \(b\) for the length of the \(y\) dimension, then these are replaced by \(1\) at the very end. This is a plot of boundary conditions


pict

Let \(u\left ( x,y\right ) =X\left ( x\right ) Y\left ( x\right ) \). Substituting this into the PDE gives\[ X^{\prime \prime }Y+Y^{\prime \prime }X=0 \] Dividing throughout by \(XY\neq 0\,\) and simplifying gives\[ \frac{X^{\prime \prime }}{X}=-\frac{Y^{\prime \prime }}{Y}=\lambda \] This gives the eigenvalue ODE\begin{align} Y^{\prime \prime }+\lambda Y & =0\tag{1}\\ Y\left ( 0\right ) & =0\nonumber \\ Y\left ( b\right ) & =0\nonumber \end{align}

The solution to (1) gives the eigenvalues \(\lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2}\) for \(n=1,2,3\cdots \) and since \(L=b\), this becomes \[ \lambda _{n}=\left ( \frac{n\pi }{b}\right ) ^{2}\qquad n=1,2,\cdots \] And the corresponding eigenfunction\begin{align*} Y_{n}\left ( y\right ) & =c_{n}\sin \left ( \sqrt{\lambda _{n}}y\right ) \\ & =c_{n}\sin \left ( \frac{n\pi }{b}y\right ) \end{align*}

Therefore the corresponding nonhomogeneous \(X\left ( x\right ) \) ODE\begin{align} X_{n}^{\prime \prime }-\lambda _{n}X_{n} & =0\tag{2}\\ X_{n}\left ( 0\right ) & =0\nonumber \\ X_{n}\left ( a\right ) & =y-y^{2}\nonumber \end{align}

The solution to (2), since \(\lambda _{n}\) is positive is \begin{align*} X_{n}\left ( x\right ) & =A_{n}\cosh \left ( \sqrt{\lambda _{n}}x\right ) +B_{n}\sinh \left ( \sqrt{\lambda _{n}}x\right ) \\ & =A_{n}\cosh \left ( \frac{n\pi }{b}x\right ) +B_{n}\sinh \left ( \frac{n\pi }{b}x\right ) \end{align*}

Boundary conditions \(X\left ( 0\right ) =0\) gives\[ 0=A_{n}\] The solution (3) now simplifies to\[ X_{n}\left ( x\right ) =B_{n}\sinh \left ( \frac{n\pi }{b}x\right ) \] Hence the fundamental solution is\begin{align*} u_{n}\left ( x,y\right ) & =X_{n}Y_{n}\\ & =c_{n}\sinh \left ( \frac{n\pi }{b}x\right ) \sin \left ( \frac{n\pi }{b}y\right ) \end{align*}

Where the constants \(B_{n}\) is merged with \(c_{n}\). The solution is\begin{equation} u\left ( x,y\right ) =\sum _{n=1}^{\infty }c_{n}\sinh \left ( \frac{n\pi }{b}x\right ) \sin \left ( \frac{n\pi }{b}y\right ) \tag{3} \end{equation} \(c_{n}\) is now found by applying the boundary condition at \(x=a\). The above becomes\[ y-y^{2}=\sum _{n=1}^{\infty }c_{n}\sinh \left ( \frac{n\pi }{b}a\right ) \sin \left ( \frac{n\pi }{b}y\right ) \] Multiplying both sides by \(\sin \left ( \frac{m\pi }{b}y\right ) \) and integrating gives\[ \int _{0}^{b}\left ( y-y^{2}\right ) \sin \left ( \frac{m\pi }{b}y\right ) dy=\sum _{n=1}^{\infty }c_{n}\sinh \left ( \frac{n\pi }{b}a\right ) \left ( \int _{0}^{b}\sin \left ( \frac{m\pi }{b}y\right ) \sin \left ( \frac{n\pi }{b}y\right ) dy\right ) \] By orthogonality the above reduces to \begin{align*} \int _{0}^{b}\left ( y-y^{2}\right ) \sin \left ( \frac{m\pi }{b}y\right ) dy & =c_{n}\sinh \left ( \frac{m\pi }{b}a\right ) \int _{0}^{b}\sin ^{2}\left ( \frac{m\pi }{b}y\right ) dy\\ & =\frac{b}{2}c_{m}\sinh \left ( \frac{m\pi }{b}a\right ) \end{align*}

Therefore\[ c_{n}=\frac{2}{b}\frac{1}{\sinh \left ( \frac{m\pi }{b}a\right ) }\int _{0}^{b}\left ( y-y^{2}\right ) \sin \left ( \frac{n\pi }{b}y\right ) dy \] Now replacing \(a=1,b=1\), the above becomes\begin{align*} c_{n} & =\frac{2}{\sinh \left ( n\pi \right ) }\int _{0}^{1}\left ( y-y^{2}\right ) \sin \left ( n\pi y\right ) dy\\ & =\frac{2}{\sinh \left ( n\pi \right ) }\left ( \frac{-2\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}\pi ^{3}}\right ) \\ & =\frac{-4}{\sinh \left ( n\pi \right ) }\frac{\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}\pi ^{3}} \end{align*}

Hence the solution (3) becomes\[ u\left ( x,y\right ) =\frac{-4}{\pi ^{3}}\sum _{n=1}^{\infty }\frac{\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}}\frac{\sinh \left ( n\pi x\right ) }{\sinh \left ( n\pi \right ) }\sin \left ( n\pi y\right ) \] At \(x=\frac{1}{2},y=\frac{1}{2}\) the above becomes\[ u\left ( \frac{1}{2},\frac{1}{2}\right ) =\frac{-4}{\pi ^{3}}\sum _{n=1}^{\infty }\frac{\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}}\frac{\sinh \left ( \frac{n\pi }{2}\right ) }{\sinh \left ( n\pi \right ) }\sin \left ( \frac{n\pi }{2}\right ) \] For \(n=1\), the above gives \(0.0514136952911346\) and for \(n=2\) the value do not change beyond \(16\) decimal points. So only need to use one term to get very good approximation value as\[ u\left ( \frac{1}{2},\frac{1}{2}\right ) =0.0514136952911346 \] This value is between zero and \(0.25\), where \(0.25\) is the maximum value at the boundary and zero is the minimum value at the boundary. This agrees with the min-max principle. This is a 3D plot of the solution over the whole square.


pict

This is a contour plot


pict

3.2.4  Problem 4

Problem Solve \(u_{xx}+u_{yy}=0\) on disk \(x^{2}+y^{2}<1\) with boundary condition \(xy^{2}\) when \(x^{2}+y^{2}=a\). Where \(a=1\) in this problem. Express solution in \(x,y\)

solution The first step is to convert the boundary condition to polar coordinates. Since \(x=r\cos \theta ,y=r\sin \theta \), then at the boundary \(u\left ( r,\theta \right ) =r\cos \theta \left ( r\sin \theta \right ) ^{2}\). But \(r=1\) (the radius). Hence at the boundary, \(u\left ( 1,\theta \right ) =f\left ( \theta \right ) \) where \begin{align*} f\left ( \theta \right ) & =\cos \theta \sin ^{2}\theta \\ & =\cos \theta \left ( 1-\cos ^{2}\theta \right ) \\ & =\cos \theta -\cos ^{3}\theta \end{align*}

But \(\cos ^{3}\theta =\frac{3}{4}\cos \theta +\frac{1}{4}\cos 3\theta \). Therefore the above becomes\begin{align} f\left ( \theta \right ) & =\cos \theta -\left ( \frac{3}{4}\cos \theta +\frac{1}{4}\cos 3\theta \right ) \nonumber \\ & =\frac{1}{4}\cos \theta -\frac{1}{4}\cos 3\theta \tag{1} \end{align}

The above is also seen as the Fourier series of \(f\left ( \theta \right ) \). The PDE in polar coordinates is\[ u_{rr}+\frac{1}{r}u_{r}+\frac{1}{r^{2}}u_{\theta \theta }=0 \] The solution is known to be\begin{equation} u\left ( r,\theta \right ) =\frac{c_{0}}{2}+\sum _{n=1}^{\infty }r^{n}\left ( c_{n}\cos \left ( n\theta \right ) +k_{n}\sin \left ( n\theta \right ) \right ) \tag{2} \end{equation} Since the above solution is the same as \(f\left ( \theta \right ) \) when \(r=1\), then equating (2) when \(r=1\) to (1) gives\[ \frac{1}{4}\cos \theta -\frac{1}{4}\cos 3\theta =\frac{c_{0}}{2}+\sum _{n=1}^{\infty }\left ( c_{n}\cos \left ( n\theta \right ) +k_{n}\sin \left ( n\theta \right ) \right ) \] By comparing terms on both sides, this shows by inspection that\begin{align*} c_{0} & =0\\ c_{1} & =\frac{1}{4}\\ c_{3} & =\frac{-1}{4} \end{align*}

And all other \(c_{n},k_{n}\) are zero. Using the above result back in (2) gives the solution as\begin{equation} \fbox{$u\left ( r,\theta \right ) =\frac{r}{4}\cos \theta -\frac{r^3}{4}\cos 3\theta $} \tag{3} \end{equation} This solution is now converted to \(xy\) using the formula\begin{align*} r^{n}\cos n\theta & =\sum _{\substack{k=0\\even}}^{n}\begin{pmatrix} n\\ k \end{pmatrix} x^{n-k}\left ( -1\right ) ^{\frac{k}{2}}y^{k}\\ & =\sum _{\substack{k=0\\even}}^{n}\frac{n!}{k!\left ( n-k\right ) !}x^{n-k}\left ( -1\right ) ^{\frac{k}{2}}y^{k} \end{align*}

For \(n=1\) the above gives\begin{align} r\cos \theta & =\frac{1!}{0!\left ( 1-0\right ) !}x^{1-0}\left ( -1\right ) ^{0}y^{0}\nonumber \\ & =x \tag{4} \end{align}

And for \(n=3\)\begin{align} r^{3}\cos 3\theta & =\frac{3!}{0!\left ( 3-0\right ) !}x^{3-0}\left ( -1\right ) ^{0}y^{0}+\frac{3!}{2!\left ( 3-2\right ) !}x^{3-2}\left ( -1\right ) ^{1}y^{2}\nonumber \\ & =x^{3}-3xy^{2} \tag{5} \end{align}

Using (4,5) in (3) gives the solution in \(x,y\)\begin{equation} \fbox{$u\left ( x,y\right ) =\frac{1}{4}x-\frac{1}{4}\left ( x^3-3xy^2\right ) $} \tag{6} \end{equation} This is now verified that is satisfies the PDE \(u_{xx}+u_{yy}=0\).\begin{align*} \frac{\partial u}{\partial x} & =\frac{1}{4}-\frac{1}{4}\left ( 3x^{2}-3y^{2}\right ) \\ \frac{\partial ^{2}u}{\partial x^{2}} & =-\frac{6}{4}x \end{align*}

And\begin{align*} \frac{\partial u}{\partial y} & =\frac{6}{4}xy\\ \frac{\partial ^{2}u}{\partial y^{2}} & =\frac{6}{4}x \end{align*}

Therefore \(\frac{\partial ^{2}u}{\partial x^{2}}+\frac{\partial ^{2}u}{\partial y^{2}}=0\).

Now the boundary conditions \(u\left ( x,y\right ) =xy^{2}\) are also verified. This condition applies when \(x^{2}+y^{2}=1\) or \(y^{2}=1-x^{2}\). Substituting this into (6) gives\[ u\left ( x,y\right ) _{@D}=\frac{1}{4}x-\frac{1}{4}\left ( x^{3}-3x\overset{y2}{\overbrace{\left ( 1-x^{2}\right ) }}\right ) \] Simplifying gives\begin{align*} u\left ( x,y\right ) _{@D} & =\frac{1}{4}x-\frac{1}{4}\left ( x^{3}-\left ( 3x-3x^{3}\right ) \right ) \\ & =\frac{1}{4}x-\frac{1}{4}x^{3}+\frac{1}{4}\left ( 3x-3x^{3}\right ) \\ & =\frac{1}{4}x-\frac{1}{4}x^{3}+\frac{3}{4}x-\frac{3}{4}x^{3}\\ & =x-x^{3}\\ & =x\left ( 1-x^{2}\right ) \\ & =xy^{2} \end{align*}

Verified. This is 3D plot of the solution


pict

This is a contour plot


pict

3.2.5  key solution

PDF