# Applying boundary conditions

1. Apr 14, 2014

### ymhiq

1. The problem statement, all variables and given/known data

Hello, I have to demonstrate that multiplying a differential equation:
-d/dx[a(x)*d/dx{u(x)}]=f(x), 0<x<1 subject to u(0)=0 and u(1)=0.
by some function v(x) and integrating over an interval [0,1], I get a new equation that can be used in an optimisation problem, that equation is written as:
∫[a(x)*du/dx*dv/dy]dx=∫[f(x)*v(x)]dx, limits of integration of the integrals are the real numbers 0 and 1.

2. Relevant equations
The differential equation:

-d/dx[a(x)*d/dx{u(x)}]=f(x), 0<x<1 subject to u(0)=0 and u(1)=0.

∫[a(x)*du/dx*dv/dy]dx=∫[f(x)*v(x)]dx, limits of integration of the integrals are the real numbers 0 and 1.

3. The attempt at a solution
Firstly I did a little math:
-d[a(x)]/dx*d[u(x)]/dx-a(x)*d/dx[d{u(x)}/dx]=f(x)
Then I multiplied by v(x)
-v(x)*d[a(x)]/dx*d[u(x)]/dx-v(x)*a(x)*d/dx[d{u(x)}/dx]=v(x)*f(x)
Finally I integrated that over the limits of integration 0 and 1:
-∫v(x)*d[a(x)]/dx*d[u(x)]/dx-∫v(x)*a(x)*d/dx[d{u(x)}/dx]=∫v(x)*f(x)
RHS o this equation is equal to the RHS of the equation I have to demonstrate, however LHS is quite different. So I wrote to my teacher and he wrote me "you are almost there, the only thing you need is to apply the boundary conditions in order to nullify one of the terms of the LHS"; I don't know how. Besides nullifying the second term, the firs one is not exactly the same as in the equation I have to demonstrate.

Any help would be appreciated.
Thanks

Last edited: Apr 14, 2014
2. Apr 14, 2014

### HallsofIvy

Staff Emeritus
You should consider using "integration by parts". That says, remember, that
$$\int_a^b udv= \left[uv\right]_a^b- \int_a^b vdu$$

In this problem, the fact that the function is equal to 0 at both endpoints means that $\left[uv\right]_a^b$ is 0.

3. Apr 14, 2014

### ymhiq

Thanks a lot HallsofIvy, I was here before your suggestions:
$-\int^{1}_{0}v(x)a(x)\frac{d[u^{2}(x)]}{dx^{2}}dx-\int^{1}_{0}v(x)\frac{d[a(x)]}{dx}\frac{d[u(x)]}{dx}dx=\int^{1}_{0}v(x)f(x)dx$

I applied them on the integrals of the LHS of this equation and did the math, I came up with this expression:

$-v(x)a(x)\frac{d[u(x)]}{dx}|^{1}_{0}+\int^{1}_{0}a(x)\frac{d[v(x)]}{dx}\frac{d[u(x)]}{dx}dx+\int^{1}_{0}v(x)\frac{d[a(x)]}{dx}\frac{d[u(x)]}{dx}dx-v(x)\frac{d[a(x)]}{dx}u(x)|^{1}_{0}+\int^{1}_{0}u(x)\frac{d[v(x)]}{dx}\frac{d[a(x)]}{dx}dx+\int^{1}_{0}u(x)v(x)\frac{d^{2}[u(x)]}{dx^{2}}dx=\int^{1}_{0}v(x)f(x)dx$

Applying integration by parts on the last integral of the LHS I got these expression:

$-v(x)a(x)\frac{d[u(x)]}{dx}|^{1}_{0}-v(x)\frac{d[a(x)]}{dx}u(x)|^{1}_{0}+u(x)v(x)\frac{d[a(x)]}{dx}|^{1}_{0}+\int^{1}_{0}a(x)\frac{d[v(x)]}{dx}\frac{d[u(x)]}{dx}dx=\int^{1}_{0}v(x)f(x)dx$

I am sure that the second and the third terms of the LHS nullify according to the boundary conditions so I get this:

$-v(x)a(x)\frac{d[u(x)]}{dx}|^{1}_{0}+\int^{1}_{0}a(x)\frac{d[v(x)]}{dx}\frac{d[u(x)]}{dx}dx=\int^{1}_{0}v(x)f(x)dx$

What could I do with the first term of the LHS, I'm not sure it nullifies.

Thanks a lot for your time.

Again, any help would be appreciated.

Last edited: Apr 14, 2014