1.6.3.3 Solution ppe-c
Question:

Plot the separation of variables solution of the previous question for an example. Assume that the given boundary condition is a 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}

Comment on whether a solution $u$ exists at $y=0$ and for $y>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.)

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=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=0.5$. Try different values $n_{\rm {max}}=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=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.