Laplace equation with non-homogeneous boundary conditions

4.8k Views Asked by At

I'm having trouble understanding how to find $u(x,y)$ when the laplace boundary conditions are non zero. The problem below I've attached as a reference....I understand what is going on but when the boundary changes I get lost What I mean is

What steps would I need to take if the boundary conditions were to be $u(x, 0) = 1$ and $u(x, \pi) = \frac{x}{2} (\pi − x)$?

To give some background I've included the following

Given $\Delta u = 0$ and $0 < x$ , $y < \pi$

$u_x(0, y) = u_x(\pi, y) = 0$

$u(x, 0) = 0$ and $u(x, \pi) = \frac{x}{2}(\pi − x)$

We find u(x,y) by applying Fourier separation of variables. $$X''(x)Y (y) + X(x)Y''(y)=0 \implies \frac{X''(x)}{X(x)}= -\frac{Y''(y)} {Y (y)} = \lambda$$ then we have

$$Y'' + \lambda Y =0$$ $$X'' − \lambda X =0$$

By the initial conditions and Sturm Liouville $λ_n=n^2$ and $X(x)=\cos(nx)$

Also, $u(x,0)=0 \implies A_n=-B_n$

Then the equation will be

$$u(x,y)=\sum^{\infty}_{n=1} A_n(e^{ny}+e^{-ny})\cos(nx)$$

Also the initial condition $u(x,\pi)=\frac{x}2(\pi-x)$ Then

$$A_n=\dfrac{2}{\pi(e^{n\pi}-e^{-n\pi})}\int_0^{\pi}\frac{x}2(\pi-x)\cos (nx)dx $$

QUESTION: What steps would I need to take if the boundary conditions were to be $u(x, 0) = 1$ and $u(x, \pi) = \frac{x}{2} (\pi − x)$ Also in this case would the sum start at $0$? since we should have the same eigen-functions and values. Given that $X(x)=\cos (nx)$ where $n=0,1,2,\dots$

I'm trying to understand this so I can solve when $u(x, 0) = 3$ and $u(x, \pi) = 1+\cos x$

Thanks

2

There are 2 best solutions below

6
On

In order to solve \begin{align} &\Delta u =0,\\ &u_x(0,y)=0, \;\;u_x(\pi,y)=0 \\ &u(x,0)=1, \;\;u(x,\pi)=\frac{x}{2}(\pi-x) \end{align} you can solve two separate problems, and add the solutions: \begin{align} &\Delta u = 0,\\ &u_x(0,y)=0,\;\; u_x(\pi,y)=0 \\ &u(x,0)=1,\;\; u(x,\pi)=0 \\ \\ &\Delta u = 0,\\ &u_x(0,y)=0,\;\; u_x(\pi,y)=0 \\ &u(x,0)=0,\;\; u(x,\pi)=\frac{x}{2}(\pi-x). \end{align} The first of the two problems is solved by $$ u(x,y) = 1-\frac{y}{\pi} $$ The second of the two problems is solved by $$ u(x,y) = A_0y+\sum_{n=1}^{\infty}A_n\cos(nx)\sinh(ny) $$ where the $A_n$ are chosen to satisfy $$ u(x,\pi)=\frac{x}{2}(\pi -x)=A_0\pi+\sum_{n=1}^{\infty}A_n\cos(nx)\sinh(n\pi) $$

0
On

I'll give an answer that follows more closely with your train of thought.

Ignoring the special case $n=0$ for now, the general solution is

$$ u(x,y) = \sum_{n=1}^\infty (A_ne^{ny} + B_ne^{-ny})\cos(nx) $$

Suppose the you have two non-homogeneous boundary conditions on $y$

$$ u(x,0) = f(x), \ u(x,\pi) = g(x) $$

where $f(x)$ and $g(x)$ are any two functions of $x$. Then

\begin{align} u(x,0) &= \sum_{n=1}^\infty (A_n + B_n)\cos(nx) = f(x) \\ u(x,\pi) &= \sum_{n=1}^\infty (A_ne^{n\pi} + B_ne^{-n\pi})\cos(nx) = g(x) \end{align}

These are separate Fourier series that you can solve

\begin{align} A_n + B_n &= \frac{2}{\pi}\int_0^\pi f(x)\cos(nx)\ dx \\ A_ne^{n\pi} + B_ne^{-n\pi} &= \frac{2}{\pi}\int_0^\pi g(x)\cos(nx)\ dx \end{align}

After solving the integrals, RHS are just expressions in terms of $n$. You now have a system of two equations and two unknowns, so there's enough information to solve for $A_n$ and $B_n$.

The original problem was a special case where $f(x)=0$, which gives away immediately that $B_n = -A_n$. Nothing really changes, other than giving you an easier system to solve.


Let's go back to $n=0$ (or $\lambda = 0$). After separation, you get

\begin{align} X'' &= 0 \\ Y'' &= 0 \end{align}

then $X'(0) = X'(\pi) = 0$ forces the $x$ part to be constant, i.e $X(x) = 1$, and the $y$ part remains linear $$ Y(y) = A_0 + B_0 y $$

Putting it all together, the full solution should be

$$ u(x,y) = A_0 + B_0y + \sum_{n=1}^\infty (A_ne^{ny} + B_ne^{-ny})\cos(nx) $$

Then the corresponding boundary equations are

\begin{align} u(x,0) &= A_0 + \sum_{n=1}^\infty (A_n + B_n)\cos(nx) = f(x) \\ u(x,\pi) &= A_0 + B_0\pi + \sum_{n=1}^\infty (A_ne^{n\pi} + B_ne^{-n\pi})\cos(nx) = g(x) \end{align}

Once again applying the Fourier expansion, the remaining constants are given by

\begin{align} A_0 &= \frac{1}{\pi}\int_0^\pi f(x) \ dx \\ A_0 + \pi B_0 &= \frac{1}{\pi}\int_0^\pi g(x)\ dx \end{align}

which you can solve as a system of equations, as before.


The part below this is just a tip to make the math easier. It's mostly irrelevant to your actual question, so feel free to ignore if you find it confusing.

Since a second-order equation always has two linearly independent solutions, it's convenient to "separate" them, so that one solution is zero on the first boundary, and the other is zero on the second boundary. i.e.

$$ Y_1'' - n^2 Y_1 = 0, \quad Y_1(0) = 0 $$ $$ Y_2'' - n^2 Y_2 = 0, \quad Y_2(\pi) = 0 $$

Solving these individually, you obtain

\begin{align} Y_1(y) &= c_1(e^{ny} - e^{-ny}) = A\sinh(ny) \\ Y_2(y) &= c_2(e^{-n\pi}e^{ny} - e^{n\pi}e^{-ny}) = B\sinh\big(n(\pi - y)\big) \end{align}

Then the full solution can be rewritten as

$$ u(x,y) = A_0y + B_0(\pi-y) + \sum_{n=1}^\infty \Big[A_n\sinh (ny) + B_n \sinh\big(n(\pi - y)\big)\Big]\cos(nx) $$

Then the boundary equations becomes

\begin{align} u(x,0) &= B_0 + \sum_{n=1}^\infty B_n\sinh(n\pi)\cos(nx) = f(x) \\ u(x,\pi) &= A_0 + \sum_{n=1}^\infty A_n\sinh(n\pi)\cos(nx) = g(x) \end{align}

and solving Fourier integrals directly lead you to the constants \begin{matrix} \displaystyle A_0 = \frac{1}{\pi}\int_0^\pi g(x)\ dx , && \displaystyle A_n = \frac{2}{\pi\sinh(n\pi)}\int_0^\pi g(x)\cos(nx)\ dx \\ \displaystyle B_0 = \frac{1}{\pi}\int_0^\pi f(x)\ dx , && \displaystyle B_n = \frac{2}{\pi\sinh(n\pi)}\int_0^\pi f(x)\cos(nx)\ dx \end{matrix}