18.3.3.3 Solution ppe-c

Question:

For the Laplace equation

\begin{displaymath}
u_{yy}+u_{xx}=0
\end{displaymath}

with boundary conditions

\begin{displaymath}
u(x,0)=f(x)\quad u_y(x,0)=0 \quad u(0,y)=0 \quad u(\pi ,y)=0
\end{displaymath}

assume that $f(x)$ is the triangular profile:

\begin{displaymath}
f(x)=x \quad\mbox{if}\quad x\le{\textstyle\frac{1}{2}} \pi\q...
...(x)=\pi -x \quad\mbox{if}\quad x\ge{\textstyle\frac{1}{2}} \pi
\end{displaymath}

The separation of variables solution for this problem is

\begin{displaymath}
u(x,y) = \sum_{n=1}^\infty f_n \sin(nx) \cosh(ny)
\end{displaymath}

where the Fourier coefficients $f_n$ must chosen so that they satisfy

\begin{displaymath}
f(x) = \sum_{n=1}^\infty f_n \sin(nx)
\end{displaymath}

where $f(x)$ is the triangular profile described above.

Plot this separation of variables solution for $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0 and for a few values greater than zero like $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 1, $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0.5, $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0.25. Then comment on whether a solution $u$ exists at $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0 and for $y$ $\raisebox{.3pt}{$>$}$ 0.

This example should illustrate that typical improperly posed problems might have solutions if the data are perfectly smooth and their Taylor series have finite radii of convergence. But if there is a singularity, like the kink in the triangular profile, all bets are off.

You might know that if you talk about instability of ordinary differential equations, you wonder about what happens to the solution for infinite time. But in this problem you do not let the time” coordinate $y$ go to infinity. The problem is not large $y$, but large “wave number $n$. The large wave number problem is really unique to partial differential equations. (If you had a system of infinitely many ordinary differential equations, you might also run into it.)

Include your code, if any.

Answer:

Skim through the Fourier series tables of a table book for an appropriate trangular wave $f(x)$. You will find that the Fourier coefficients $f_n$ are:

\begin{displaymath}
f_n = \frac{4}{\pi n^2} \sin\left(n{\textstyle\frac{1}{2}}\pi\right)
\end{displaymath}

Given that, you can plot the solution

\begin{displaymath}
u(x,y) = \sum_{n=1}^\infty\frac{4}{\pi n^2} \sin\left(n{\textstyle\frac{1}{2}}\pi\right) \sin(nx) \cosh(ny)
\end{displaymath}

Use a programming language with plotting capability like mathcad, matlab, or octave to plot this solution.

Of course, on a computer you must stop summing at some finite value $n_{\rm {max}}$ of $n$. Try plotting increasing values of $n_{\rm {max}}$ to figure out what the infinite sum will look like.

First plot $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0. You should find that the triangular profile is produced just fine by the infinite sum.

Now plot a nonzero value of $y$, like $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0.5. Try different values $n_{\rm {max}}$ $\vphantom0\raisebox{1.5pt}{$=$}$ 3, then 5, 10, 20, 40, and 100. Keep your eyes on the numbers on the axes. Use the results to argue that the exact solution $u$ at $y$ $\vphantom0\raisebox{1.5pt}{$=$}$ 0.5 does not exist.

When using matlab or octave, you could use a program like badlap_run.m. You should first look at what is in there. Then you need to save it in your matlab working directory as a file called badlap_run.m. You will also need the function that performs the sum, badlap_sum.m. You need to save this in your matlab working directory as a file called badlap_sum.m.

Then inside matlab or octave issue the command badlap_run to plot. Change the values of n_max and y as needed and run the program again. Use help print for information on how to make hardcopies of some of the plots you need to make your case.