# When does the linear solution apply together with the trigonometric solution for the Laplace equation?

I have the given PDE:

$$$$u_{xx}+u_{yy}=0\\ u(0,y)=u(1,y)=0\\ u(x,0)=\sin \pi x, u(x,2)=0$$$$

Since the first conditions give homogeneous Dirichlet on x we get the Ansatz $$u(x,y)=u(y)\sin n\pi x$$.

Now, because the initial conditions on y are non-homogenous Dicihlet conditions, we could as well include $$u(y)=A_n\sin n\pi y$$ in the Ansatz, but here we have a harmonic function as $$u(x,0)=\sin \pi x$$, so we should consider the two eigenvalue cases for y by inserting the first Ansatz in the original PDE:

$$u_{xx}=-(n\pi)^2u(y)\sin n\pi x$$ $$u_{yy}=u_{yy}\sin n\pi x$$

so we solve the PDE with inserted ansatz:

$$-(n\pi)^2u(y)\sin n\pi x+u_{yy}\sin n\pi x=0\longrightarrow u(y)=A\cosh n\pi y+B\sinh n\pi y$$

With the initial conditions, we get:

$$\sin\pi x=A$$ $$0=\sin\pi x\cosh2n\pi+B\sinh2n\pi\longrightarrow B=-\sin\pi x\frac{\cosh2n\pi}{\sinh2n\pi}$$

This gives:

$$u(y)=\sin\pi x\cosh n\pi y-\sin\pi x\frac{\cosh2n\pi}{\sinh2n\pi}\sin n\pi y$$

however, L on y is 2, so it should rather be:

$$u(y)=\sin\pi x\cosh\frac{n\pi}{2}y-\sin\pi x\frac{\cosh2n\pi}{\sinh2n\pi}\sin \frac{n\pi}{2}y$$

This is the trigonometric y-part of the solution , and it comes from the case of $$\lambda>/<0$$, since it is quadratic and always positive.

But what about $$\lambda=0$$, this should go equally in the consideration? That would give the linear solution:

$$\lambda=0:$$ $$u(y)=Cx+D$$ We insert IC for y and get:

$$u(y)=-\frac{sin\pi x}{2}+\sin \pi x$$

So the full y-part of the solution would be then:

$$u(y)_n=-\frac{sin\pi x}{2}+\sin \pi x+\sin\pi x\cosh\frac{n\pi}{2}y-\sin\pi x\frac{\cosh2n\pi}{\sinh2n\pi}\sin \frac{n\pi}{2}y$$

Re-writing gives:

$$u(y)_n=\big(\frac{1}{2}+\cosh\frac{n\pi}{2}y-\frac{\cosh2n\pi}{\sinh2n\pi}\sin \frac{n\pi}{2}y\big)\sin\pi x$$

Then,

$$u(x,y)=\sum_{n=1}^\infty \big(\frac{1}{2}+\cosh\frac{n\pi}{2}y-\frac{\cosh2n\pi}{\sinh2n\pi}\sin \frac{n\pi}{2}y\big)\sin n\pi x$$

However, the correct solution is instead

$$u(x,y)=\bigg(\cosh \pi y-\frac{\cosh2\pi}{\sinh2\pi}\sinh \pi y\bigg)\sin \pi x$$

Now notice that in the correct solution the "n" has "magically vanished", and the interval of y is not really respected. Then most importantly, the linear part that I derived further up, for $$\lambda=0$$ is not even included.

Why is not the linear part there, why has $$n$$ disappeared and therefore also the sum?

Thanks

• You can't just shove the 2 into the y dependence based on the height of the domain being 2. The eigenvalue was already determined from the boundary conditions on x.
– Ian
Commented Nov 7, 2022 at 9:40
• Ok, good to know. Thanks for that. What about the rest? Do you have an idea of why the other parts occur as such? Commented Nov 7, 2022 at 9:43
• It's not really omitted "automatically", you just don't need it for these exact BCs.
– Ian
Commented Nov 7, 2022 at 9:49
• So the assumption is that you can write the solution as $\sum_n f_n(x) g_n(y)$ where each $f_n$ satisfies the $x$ BCs (instead of some sort of cancellation to achieve the $x$ BCs). Under that assumption the affine eigenfunction drops because the only affine function of $x$ satisfying those BCs is just zero.
– Ian
Commented Nov 7, 2022 at 10:04
• As for why the other sinusoids drop, it is because $u(x,0)$ and $u(x,2)$ are both multiples of the same sinusoid, so the other Fourier coefficients need to get from 0 to 0, which they can do by just staying 0 the whole time.
– Ian
Commented Nov 7, 2022 at 10:06

First off: we start out looking for a solution as a superposition of separable solutions. It is not trivial to prove that this will actually work, but we try it anyway without proving it will work first.

With that said, when you're looking for a separable solution to the Laplace equation, this will be $$u(x,y)=f(x) g(y)$$ with $$f''/f=-g''/g$$, which then must be constant.

Now the $$x$$ BCs determine that in this situation $$f(x)$$ is a multiple of $$\sin(n\pi x)$$. It cannot be a linear function and still satisfy homogeneous Dirichlet boundary conditions unless it is just zero.

From here, the eigenvalue for $$g$$ is determined to be $$n^2 \pi^2$$ already; it is not correct to bring in an extra factor of $$2$$ to compensate for the height of the domain, because doing so doesn't make a solution to the Laplace equation anymore!

Thus you look for a solution as a combination of functions of the form $$\sin(n\pi x) e^{\pm n \pi y}$$.

Now the question is, why can you work with just $$n=1$$? A glib but correct answer is "supposing you can, you get a solution, and the solution is unique, so you're done".

A more insightful answer is to start out by writing $$u=\sum_{n=1}^\infty a_n(y) \sin(n\pi x)$$. Now the $$a_n$$ satisfy the ODE $$a_n''=n^2 \pi^2 a_n$$ but they also have boundary conditions, which are determined by the Fourier coefficients of $$u(x,0)$$ and $$u(x,2)$$. Specifically you have $$a_n(0)=\begin{cases} 1 & n=1 \\ 0 & n>1 \end{cases}$$ and $$a_n(2)=0$$. From here you can deduce that $$a_n(y) \equiv 0$$ for $$n>1$$ and also determine what $$a_1$$ is.

A quick exercise I'd suggest: do the same problem but with $$u(x,2)=\sin(2\pi x)$$. (Based on the comments, I think this might help avoid a misconception.)

• Thanks! I will study this in detail Commented Nov 9, 2022 at 9:20