# Doubts on the boundary conditions of PDE

jollage
Hi all,

Say I am solving a PDE as $\frac{\partial y^2}{\partial^2 x}+\frac{\partial y}{\partial x}=f$, with the boundary condition $y(\pm L)=A$. I can understand for the second order differential term, there two boundary conditions are well suited. But what about the first order differential term? Imposing at the same time these two boundary condition will be redundant for that term, isn't it?
I came across this when I use spectral method to solve the PDE with Dirichlet BC ($y(\pm 1)=0$) at the two ends. When constructing the matrix for the D^2 term, I get rid of the first and last row and columns. It's easy and it makes sense. But when I tried to construct the D term, what should I do then?

Thanks a lot.

Jo

JJacquelin
Say I am solving a PDE as $\frac{\partial y^2}{\partial^2 x}+\frac{\partial y}{\partial x}=f$, with the boundary condition $y(\pm L)=A$.
Hi Jollage !
I suppose that A is a constant and f is a known function.
Note : it should be $\frac{\partial ^2 y}{\partial x^2}$
I am surprised that you introduces partial derivative symbols because there is only one variable in the equation. If your wording is correct, it is not a PDE, but an ODE.
This linear ODE can be analytically solved (attachment)

#### Attachments

• ODE.JPG
16.1 KB · Views: 494
jollage
Hi Jollage !
I suppose that A is a constant and f is a known function.
Note : it should be $\frac{\partial ^2 y}{\partial x^2}$
I am surprised that you introduces partial derivative symbols because there is only one variable in the equation. If your wording is correct, it is not a PDE, but an ODE.
This linear ODE can be analytically solved (attachment)

Sorry, I should write that correctly. I am thinking Navier-Stokes equation when I wrote these equation.. The example I showed is not what I want to solve, I want to discuss the boundary condition for the D term. Do you have a clue? Thanks.

Jo

JJacquelin
The example I showed is not what I want to solve, I want to discuss the boundary condition for the D term.
Then, show what you want to solve.
And what "D term" means?
One cannot discuss about boundary conditions without knowing to what they are related.

jollage
Then, show what you want to solve.
And what "D term" means?
One cannot discuss about boundary conditions without knowing to what they are related.

Hi JJacquelin,

I'm from numerics, so please forgive me if I sound not professional... By D term I mean the first order differential term.

Let me rephrase the question. Let's say we have an ODE $\frac{dy}{dx}=f$, here we impose only one boundary condition. More than one b.c. would be redundant. But if we have now an ODE like $\epsilon\frac{d^2y}{dx^2}+\frac{dy}{dx}=f$, with $\epsilon$ very small. But anyway, mathematically, I should impose two boundary conditions, like Dirichlet b.c., at the two ends.

My question is in the case of very small epsilon, what happens w.r.t. the boundary condition? Asymptotically, if epsilon is very small, we can neglect the first term, then what about the b.c.? How should b.c. change?

Thank you.

Homework Helper
Hi JJacquelin,

I'm from numerics, so please forgive me if I sound not professional... By D term I mean the first order differential term.

Let me rephrase the question. Let's say we have an ODE $\frac{dy}{dx}=f$, here we impose only one boundary condition. More than one b.c. would be redundant. But if we have now an ODE like $\epsilon\frac{d^2y}{dx^2}+\frac{dy}{dx}=f$, with $\epsilon$ very small. But anyway, mathematically, I should impose two boundary conditions, like Dirichlet b.c., at the two ends.

My question is in the case of very small epsilon, what happens w.r.t. the boundary condition? Asymptotically, if epsilon is very small, we can neglect the first term, then what about the b.c.? How should b.c. change?

Thank you.

Your problem is singular: if $\epsilon = 0$ you can only satisfy one boundary condition, and unless you are lucky you will not be able to satisfy both. For $0 < |\epsilon| \ll 1$ what you get is a boundary layer, where the solution rapidly adjusts to satisfy the boundary condition (ie, $y''$ is large so that $\epsilon y''$ is of the same order of magnitude as the other terms in the equation).

An example of this type of problem is given in this Wikipedia page.

JJacquelin
Hi JJacquelin,

I'm from numerics, so please forgive me if I sound not professional... By D term I mean the first order differential term.

Let me rephrase the question. Let's say we have an ODE $\frac{dy}{dx}=f$, here we impose only one boundary condition. More than one b.c. would be redundant. But if we have now an ODE like $\epsilon\frac{d^2y}{dx^2}+\frac{dy}{dx}=f$, with $\epsilon$ very small. But anyway, mathematically, I should impose two boundary conditions, like Dirichlet b.c., at the two ends.

My question is in the case of very small epsilon, what happens w.r.t. the boundary condition? Asymptotically, if epsilon is very small, we can neglect the first term, then what about the b.c.? How should b.c. change?

Thank you.

Hi !
The concrete example below intends to explain what happens. The example is chosen so that the ODE can be analytically solved and so that the solution be as simple as possible. This is shown on the attached page.
When epsilon tends to 0, the solution of the second order ODE tends to the solution of the first order ODE on the range where one boundary is located. The second boundary condition (which is not compatible to the solution of the first order ODE) introduces a discontinuity, i.e., at the limit for epsilon=0 the solution of the second order ODE is no longer a simple function but a piecewise function.
Nevertheless, you are allowed to give more than one boundary condition in case of a first order ODE, but this will leads to piecewise functions which are compatible with the ODE only on each intervals related to one of the boundary conditions.
Since you are from numerics, you are used to solve the ODEs thanks to numerical methods. Try several examples similar to the example given here. This will help you a lot to intuitively understand this kind of behaviour.

#### Attachments

• Example.JPG
26.3 KB · Views: 480