MHB Boundary value problem-find the coefficients

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

I have to solve the following boundary value problem:

$$u_{xx}+=u_{yy}=0, 0<x<a, 0<y<b$$
$$u_x(0,y)=u_x(a,y)=0, 0<y<b$$
$$u(x,0)=x, u_y(x,b)=0, 0<x<a$$

By using the method of separation of variables, the solution is of the form $u(x,y)=X(x)Y(y)$.
By substituting this it the problem we get the following problems:

$$\left.\begin{matrix}
X''+\lambda X=0, 0<x<a\\
X'(0)=X'(a)=0
\end{matrix}\right\}(1)$$

and

$$\left.\begin{matrix}
Y''-\lambda Y=0, 0<y<b\\
Y'(b)=0
\end{matrix}\right\}(2)$$

$$u(x,0)=X(x)Y(0)=x$$

Solving the problem $(1)$, the eigenvalues are:
  • $\lambda =0$, with the corresponding eigenfunction $X_0(x)=1$
  • $\lambda =(\frac{n \pi }{a})^2$, with the corresponding eigenfunctions $X_n(x)=\cos{(\frac{n \pi x}{a})}$

So
$$X_n(x)=\left\{\begin{matrix}
1 & ,n=0\\
\cos{(\frac{n \pi x}{a})} & , n=1,2,3, \dots
\end{matrix}\right.$$

By solving the problem $(2)$ we get:
$$Y_n(x)=\left\{\begin{matrix}
A_0 y +B_0 & ,n=0\\
A_n \sinh{(\frac{n \pi y}{a})}+B_n \cosh{(\frac{n \pi y}{a})} & , n=1,2,3, \dots
\end{matrix}\right.$$

Then $$Y_n '(x)=\left\{\begin{matrix}
A_0 & ,n=0\\
\frac{n \pi}{a}A_n \cosh{(\frac{n \pi y}{a})}+\frac{n \pi }{a} B_n \sinh{(\frac{n \pi y}{a})} & , n=1,2,3, \dots
\end{matrix}\right.$$

$Y'(b)=0 \Rightarrow$
$$A_0 \text{ and } \frac{n \pi}{a}A_n \cosh{(\frac{n \pi b}{a})}+\frac{n \pi }{a} B_n \sinh{(\frac{n \pi b}{a})}=0 \Rightarrow A_n=B_n \tanh{(\frac{n \pi b}{a})}$$

So $$Y_n(x)=\left\{\begin{matrix}
B_0 & ,n=0\\
B_n \tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y}{a})}+B_n \cosh{(\frac{n \pi y}{a})} & , n=1,2,3, \dots
\end{matrix}\right.$$

So the solution solution of the initial problem is of the form:
$$u(x,y)=B_0+ \sum_{n=1}^{\infty}{B_n[ \tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y}{a})}+ \cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

$$u(x,0)=x \Rightarrow B_0+ \sum_{n=1}^{\infty}{B_n \cos{(\frac{n \pi x}{a})}}=x$$

To find the coefficients $B_0$ and $B_n$, can I use the expansion of $x$ to the eigenfunctions of the problem, although $x$ does not satisfy the boundary conditions of the problem? (Wondering)
 
Physics news on Phys.org
Hey! :o

mathmari said:
To find the coefficients $B_0$ and $B_n$, can I use the expansion of $x$ to the eigenfunctions of the problem, although $x$ does not satisfy the boundary conditions of the problem? (Wondering)

Yes.
Actually, $x$ does satisfy the boundary conditions, namely for $y=0$, which is what this condition is about.
 
I like Serena said:
Actually, $x$ does satisfy the boundary conditions, namely for $y=0$, which is what this condition is about.

I meant that $x$ does not satisfy the boundary conditions of the problem $(1)$ and at the expansion of $x$ to the eigenfunctions of the problem, the eigenfunctions are from the problem $(1)$.

So, do I have to do the following? (Wondering)

$$B_0=\frac{2}{a} \int_0^a{x}dx= 2a$$
$$B_n=\frac{2}{a} \int_0^a{x \cos{(\frac{n \pi x}{a})}}dx= \dots =\frac{2a}{n^2 \pi^2} [ (-1)^n-1]$$
 
mathmari said:
I meant that $x$ does not satisfy the boundary conditions of the problem $(1)$ and at the expansion of $x$ to the eigenfunctions of the problem, the eigenfunctions are from the problem $(1)$.

But we're not looking at the solution for X from (1) anymore. :confused:
We're looking at the combined solution for the original problem, and then zooming in at $y=0$ to ensure the corresponding boundary condition is satisfied.
So, do I have to do the following? (Wondering)

$$B_0=\frac{2}{a} \int_0^a{x}dx= 2a$$
$$B_n=\frac{2}{a} \int_0^a{x \cos{(\frac{n \pi x}{a})}}dx= \dots =\frac{2a}{n^2 \pi^2} [ (-1)^n-1]$$

How about verifying if this gives you a solution of the original problem? (Mmm)
 
I like Serena said:
But we're not looking at the solution for X from (1) anymore. :confused:
We're looking at the combined solution for the original problem, and then zooming in at $y=0$ to ensure the corresponding boundary condition is satisfied.

How about verifying if this gives you a solution of the original problem? (Mmm)

I found that
$$u(x,y)=2a +\sum_{n=1}^{\infty}{\frac{2a}{n^2 \pi^2}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

So the partial derivatives are:

$$u_x(x,y)=-\sum_{n=1}^{\infty}{\frac{2}{n \pi}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \sin{(\frac{n \pi x}{a})}}$$

$$u_{xx}(x,y)=-\sum_{n=1}^{\infty}{\frac{2}{a}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

$$u_y(x,y)=\sum_{n=1}^{\infty}{\frac{2}{n \pi}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \cosh{(\frac{n \pi y }{a})}+\sinh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

$$u_{yy}(x,y)=\sum_{n=1}^{\infty}{\frac{2}{n \pi}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$$$u_{xx}+u_{yy}=0 \checkmark$$
$$u_x(0,y)=u_x(a,y)=0 \checkmark$$

But are the conditions $u(x,0)=x$ and $u_y(x,b)=0$ satisfied? (Wondering)

$u(x,0)=2a+\sum_{n=1}^{\infty}{\frac{2a}{n^2 \pi^2}[(-1)^n-1] \cos{(\frac{n \pi x}{a})}} \overset{?}{=} x$ (Wondering)
 
mathmari said:
I found that
$$u(x,y)=2a +\sum_{n=1}^{\infty}{\frac{2a}{n^2 \pi^2}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

So the partial derivatives are:

$$u_x(x,y)=-\sum_{n=1}^{\infty}{\frac{2}{n \pi}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \sin{(\frac{n \pi x}{a})}}$$

$$u_{xx}(x,y)=-\sum_{n=1}^{\infty}{\frac{2}{a}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

$$u_y(x,y)=\sum_{n=1}^{\infty}{\frac{2}{n \pi}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \cosh{(\frac{n \pi y }{a})}+\sinh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

$$u_{yy}(x,y)=\sum_{n=1}^{\infty}{\frac{2}{n \pi}[(-1)^n-1] [\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$$$u_{xx}+u_{yy}=0 \checkmark$$
$$u_x(0,y)=u_x(a,y)=0 \checkmark$$

Nice! $\checkmark$ (Sun)
But are the conditions $u(x,0)=x$ and $u_y(x,b)=0$ satisfied? (Wondering)

$u(x,0)=2a+\sum_{n=1}^{\infty}{\frac{2a}{n^2 \pi^2}[(-1)^n-1] \cos{(\frac{n \pi x}{a})}} \overset{?}{=} x$ (Wondering)

Hmm...
Let's see...
Suppose we pick $a=3$ and we expand 3 terms...
Then W|A gives us this graph.

Hmm... I think it is not quite right yet... (Doh)
But I do think it is possible!
 
I like Serena said:
Nice! $\checkmark$ (Sun)

(Yes)
I like Serena said:
Hmm...
Let's see...
Suppose we pick $a=3$ and we expand 3 terms...
Then W|A gives us this graph.

Hmm... I think it is not quite right yet... (Doh)
But I do think it is possible!
So is the solution that I have found wrong? (Wondering)
 
mathmari said:
So is the solution that I have found wrong? (Wondering)

I think so.
Your general solution is correct, but your values for $B_n$ appear to be wrong.
How did you come up with the formulas that you have? (Wondering)
 
I like Serena said:
I think so.
Your general solution is correct, but your values for $B_n$ appear to be wrong.
How did you come up with the formulas that you have? (Wondering)

Is the following form of the solution right?
$$u(x,y)=B_0+ \sum_{n=1}^{\infty}{B_n[ \tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y}{a})}+ \cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

Then by the boundary condition we have that:
$$u(x,0)=x \Rightarrow B_0+ \sum_{n=1}^{\infty}{B_n \cos{(\frac{n \pi x}{a})}}=x$$

So $$B_0=\frac{2}{a} \int_0^a{x}dx=2a$$
$$B_n=\frac{2}{a} \int_0^a{x \cos{(\frac{n \pi x}{a})}}dx= \dots = \frac{2a}{n^2 \pi^2}[(-1)^n-1]$$

Have I done something wrong at the calculation of the coefficients? (Wondering)

Or do we not calculate the coefficients in this way??
 
Last edited by a moderator:
  • #10
mathmari said:
Is the following form of the solution right?
$$u(x,y)=B_0+ \sum_{n=1}^{\infty}{B_n[ \tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y}{a})}+ \cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

Then by the boundary condition we have that:
$$u(x,0)=x \Rightarrow B_0+ \sum_{n=1}^{\infty}{B_n \cos{(\frac{n \pi x}{a})}}=x$$

All good! (Nod)
So $$B_0=\frac{2}{a} \int_0^a{x}dx=2a$$
$$B_n=\frac{2}{a} \int_0^a{x \cos{(\frac{n \pi x}{a})}}dx= \dots = \frac{2a}{n^2 \pi^2}[(-1)^n-1]$$

Have I done something wrong at the calculation of the coefficients? (Wondering)

Or do we not calculate the coefficients in this way??

The formulas for these coefficients are indeed wrong.

I know 2 ways to calculate them.
The Fourier cosine series or the dot products with the base functions.It seems you have attempted to do the latter, so let's recap that method. (Nerd)

If you have an orthogonal basis $\{ \vec u_i \}$ and you want to represent a vector $\vec a$ in it, the representation is given by:
$$\vec a = \sum \frac {(\vec a, \vec u_i)}{(\vec u_i, \vec u_i)} \vec u_i$$
Note that it is easier if the basis vectors have norm 1, since in that case the denominators disappear. However, your eigenfunctions do not have norm 1.Now let's apply that to your problem:
$$B_0 = \frac{(x, 1)}{(1, 1)}
= \frac{\int_0^a x\cdot 1 \ dx}{\int_0^a 1\cdot 1 \ dx}
= \frac {\frac{a^2}{2}} {a}
= \frac a 2$$
Hey! That is different from what you have! (Crying)
 
  • #11
I like Serena said:
All good! (Nod)

Great! (Smile)
I like Serena said:
The formulas for these coefficients are indeed wrong.

I know 2 ways to calculate them.
The Fourier cosine series or the dot products with the base functions.It seems you have attempted to do the latter, so let's recap that method. (Nerd)

If you have an orthogonal basis $\{ \vec u_i \}$ and you want to represent a vector $\vec a$ in it, the representation is given by:
$$\vec a = \sum \frac {(\vec a, \vec u_i)}{(\vec u_i, \vec u_i)} \vec u_i$$
Note that it is easier if the basis vectors have norm 1, since in that case the denominators disappear. However, your eigenfunctions do not have norm 1.Now let's apply that to your problem:
$$B_0 = \frac{(x, 1)}{(1, 1)}
= \frac{\int_0^a x\cdot 1 \ dx}{\int_0^a 1\cdot 1 \ dx}
= \frac {\frac{a^2}{2}} {a}
= \frac a 2$$
Hey! That is different from what you have! (Crying)

You're right! (Blush)

I had also an error at the integral of $B_0$. (Tmi)

Actually, I calculated them using the Fourier cosine series.

We expand $f(x)=x$ in an even way at $[-a,a]$.
So we can write $f(x)$ as a Fourier series $$f(x)=\frac{a_0}{2}+ \sum_{n=1}^{\infty}{a_n \cos{(\frac{2 n \pi x}{2a})}}, a_n=\frac{2}{2a} \int_{-a}^a{f(x) \cos{(\frac{2 n \pi x}{2a})}}dx= \frac{2}{a} \int_0^a{f(x) \cos{(\frac{n \pi x}{a})}}dx$$

$$a_0=\frac{2}{a} \int_0^a{x}dx=a \Rightarrow B_0=\frac{a_0}{2}=\frac{a}{2}$$

And what's about $B_n$?? (Wondering)
 
  • #12
mathmari said:
Great! (Smile)

You're right! (Blush)

I had also an error at the integral of $B_0$. (Tmi)

Actually, I calculated them using the Fourier cosine series.

We expand $f(x)=x$ in an even way at $[-a,a]$.
So we can write $f(x)$ as a Fourier series $$f(x)=\frac{a_0}{2}+ \sum_{n=1}^{\infty}{a_n \cos{(\frac{2 n \pi x}{2a})}}, a_n=\frac{2}{2a} \int_{-a}^a{f(x) \cos{(\frac{2 n \pi x}{2a})}}dx= \frac{2}{a} \int_0^a{f(x) \cos{(\frac{n \pi x}{a})}}dx$$

$$a_0=\frac{2}{a} \int_0^a{x}dx=a \Rightarrow B_0=\frac{a_0}{2}=\frac{a}{2}$$

And what's about $B_n$?? (Wondering)

$u(x,0)=x$ is satisfied since by this relation we have found the coefficients $B_0$ and $B_n$, right?

$$u_y(x,b)=0 \Rightarrow \sum_{n=1}^{\infty}{\frac{2}{n \pi} \cdot [(-1)^n-1] \cdot 2 \sinh{(\frac{ n \pi b}{a})} \cdot \cos{(\frac{n \pi x}{a})}}=0$$
But does this relation stand?? (Wondering)
 
  • #13
mathmari said:
You're right! (Blush)

I had also an error at the integral of $B_0$. (Tmi)

Actually, I calculated them using the Fourier cosine series.

We expand $f(x)=x$ in an even way at $[-a,a]$.
So we can write $f(x)$ as a Fourier series $$f(x)=\frac{a_0}{2}+ \sum_{n=1}^{\infty}{a_n \cos{(\frac{2 n \pi x}{2a})}}, a_n=\frac{2}{2a} \int_{-a}^a{f(x) \cos{(\frac{2 n \pi x}{2a})}}dx= \frac{2}{a} \int_0^a{f(x) \cos{(\frac{n \pi x}{a})}}dx$$

$$a_0=\frac{2}{a} \int_0^a{x}dx=a \Rightarrow B_0=\frac{a_0}{2}=\frac{a}{2}$$

And what's about $B_n$?? (Wondering)

The $B_n$ are correct. (Smile)
We can see the verification in this W|A graph.
mathmari said:
$u(x,0)=x$ is satisfied since by this relation we have found the coefficients $B_0$ and $B_n$, right?

$$u_y(x,b)=0 \Rightarrow \sum_{n=1}^{\infty}{\frac{2}{n \pi} \cdot [(-1)^n-1] \cdot 2 \sinh{(\frac{ n \pi b}{a})} \cdot \cos{(\frac{n \pi x}{a})}}=0$$
But does this relation stand?? (Wondering)

Well... uhm... I don't know yet...
At first sight, it seems it does not stand... (Doh)
 
  • #14
I like Serena said:
Well... uhm... I don't know yet...
At first sight, it seems it does not stand... (Doh)

I found the mistake...

The solution is:
$$u(x,y)=\frac{a}{2} +\sum_{n=1}^{\infty}{\frac{2a}{n^2 \pi^2}[(-1)^n-1] [-\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

I forgot the sign $'-'$.. (Lipssealed)

Now the condition $u_y(x,b)=0$ is satisfied.. (Sun)

So since the conditions are satisfied the solution is correct, isn't it ?? (Wondering)
 
  • #15
mathmari said:
I found the mistake...

The solution is:
$$u(x,y)=\frac{a}{2} +\sum_{n=1}^{\infty}{\frac{2a}{n^2 \pi^2}[(-1)^n-1] [-\tanh{(\frac{n \pi b}{a})} \sinh{(\frac{n \pi y }{a})}+\cosh{(\frac{n \pi y}{a})}] \cos{(\frac{n \pi x}{a})}}$$

I forgot the sign $'-'$.. (Lipssealed)

Now the condition $u_y(x,b)=0$ is satisfied.. (Sun)

So since the conditions are satisfied the solution is correct, isn't it ?? (Wondering)

It looks that way! (Party)
 
  • #16
I like Serena said:
It looks that way! (Party)

Ok! Thanks a lot! (Handshake)
 

Similar threads

Replies
5
Views
3K
Replies
3
Views
2K
Replies
1
Views
1K
Replies
7
Views
3K
Replies
4
Views
2K
Replies
1
Views
3K
Back
Top