Partial differential equation & Lax-Milgram Theory? Consider the elliptic problem $Lu = \exp(x)$ on $[0,1]$ with $Lu = -\frac{d^2u}{dx^2} + \frac{du}{dx}$ and boundary conditions $u(0) = 5$, $\frac{du}{dx}(1) + u(1) = 2$. Answer the following questions.


*

*Is $L$ a self-adjoint operator?

*Show that $(u, u_x) = \frac{1}{2}(u(1)^2 - u(0)^2)$

*Put the system in the form $a(w,u)=F(w)$ and give both $a(w, u)$ and $F(w)$ such that we successfully can show coercivity of the bilinear form.

*Show that the bilinear form is coercive.

*Let a linear function space in $C^2[0, 1]$ be spanned by $\{Q_1(x), Q_2(x), ..., Q_N(x)\}$ with $Q_i(0) = 0; i = 1, ...,N$. Give the linear system that arises from the Galerkin projection of the above problem on this space.

 A: My solution to 3 and 4.
I found convenient to solve 3 and 4 together, at one time. The solution is quite long, but something can be left out (I wrote it for sake of completeness).
A. Reduction to a standard BVP with Robin BCs.
There is a standard trick to reduce your inhomogeneous BCs to homogeneous ones, in order to obtain a BVP with classical Robin BCs.
First of all, you have to find a function $u_0\in W^{1,2}(0,1)$ which satisfies you BCs. It seems reasonable to look for such $u_0$ in the simple form $\alpha x+\beta$, with $\alpha ,\beta$ parameters to be determined imposing the BCs; it is easily seen that $u_0(x):= -3/2 x+5$ satisfies $u_0(0)=5$ and $u_0(1)+u_0^\prime (1)=2$.
Now, set $w=u-u_0$, in such a way that $w\in W^{1,2}(0,1)$ satisfies the Robin BCs:
$$w(0)=0 \qquad \text{and}\qquad w(1)+w^\prime (1)=0 \; ;$$
hence $u$ solves the problem:
$$\begin{cases} -u^{\prime \prime} +u^\prime =e^x &\text{, in } ]0,1[ \\ u(0)=5 \\ u(1)+u^\prime (1)=2\end{cases}$$
if and only if $w$ solves:
$$\tag{R} \begin{cases} -w^{\prime \prime} +w^\prime =e^x +\frac{3}{2} &\text{, in } ]0,1[ \\ w(0)=0 \\ w(1)+w^\prime (1)=0\end{cases}$$
which is the aforementioned problem with standard Robin BCs.
B. Weak formulation of problem (R).
Problem (R) can be rewritten in weak form as follows. Let:
$$K:=\left\{ v\in W^{1,2}(0,1):\ v(0)=0\right\}\; .$$
$K$ is the closed convex subset of $W^{1,2}(0,1)$ in which you expect to find the solution of (R), hence you can use any $v\in K$ as test function to recast (R) in weak form.
Notice that the ODE in (R) is in fact equivalent to:
$$-\frac{\text{d}}{\text{d} x}\Big[ e^{-x}\ w^\prime (x)\Big] =1+\frac{3}{2}\ e^{-x}$$
($e^{-x}$ is an integrating factor), thus, after having multiplied both sides of (1) by $v\in K$, you can integrate to get:
$$-\int_0^1 \frac{\text{d}}{\text{d} x}\Big[ e^{-x}\ w^\prime (x)\Big]\ v(x)\ \text{d} x = \int_0^1 \left( 1+\frac{3}{2}\ e^{-x}\right) \ v(x)\ \text{d} x$$
and a further integration by parts in the LHside yields:
$$\tag{1} \frac{1}{e}\ w(1)\ v (1) +\int_0^1 e^{-x}\ w^\prime (x)\ v^\prime (x)\ \text{d} x=\int_0^1 \left( 1+\frac{3}{2}\ e^{-x}\right)\ v(x)\ \text{d} x\; ;$$
if you set:
$$B[w,v]:=\frac{1}{e}\ w(1)\ v (1) +\int_0^1 e^{-x}\ w^\prime (x)\ v^\prime (x)\ \text{d} x$$
and $\phi (x):=1+3/2\ e^{-x}\in C^\infty ([0,1])\subseteq W^{1,2}(0,1)$, you rewrite (1) as:
$$\tag{W} B[w,v]=\langle \phi ,w\rangle$$
which is the weak form of (R).
C. Existence and uniqueness of weak solution to (R); variational formulation of (R).
The bilinear form $B[w,v]$ is continuous, symmetric and coercive on $W^{1,2}$: in fact, continuity and simmetry are both obvious; on the other hand, in order to prove coercivity you have to use $e^{-x}\geq 1/e$ and the Poincaré inequality:
$$\lVert w\rVert_{W^{1,2}}\leq \gamma\ \lVert w^\prime \rVert_{L^2} \qquad \text{(} \gamma >0\text{)}$$
(which does hold because $w(0)=0$; see [Brezis, Functional Analysis, Sobolev Spaces and PDEs, Prop. 8.13]), for these inequalities yield:
$$B[w,w]\geq \frac{1}{e}\ \lVert w^\prime \rVert_{L^2}^2\geq \frac{1}{e\ \gamma}\ \lVert w\rVert_{W^{1,2}}^2\; .$$
Since $\phi \in W^{1,2}$, the functional $W^{1,2}\ni w\mapsto \langle \phi ,w\rangle \in \mathbb{R}$ is linear and continuous and Stampacchia theorem [Brezis, Thm. 5.6] applies to (W) providing a unique weak solution $w\in K$ to that problem. Such a solution also solves the variational problem:
$$\tag{V} \min \Big\{ B[v,v]-\langle \phi ,v\rangle,\ v\in K\Big\}$$
(problem (V) actually is the variational form of (R)).
D. Regularity of the weak solution.
Here a sort of bootstrap argument is used... Maybe the proof can be shortened somehow.
Using Sobolev embedding [Brezis, Thm. 8.8], from $w\in W^{1,2}(0,1)$ you gain $w\in C([0,1])$. Now, multiply both sides of the ODE in (R) by $w$ and integrate over $[0,x]$. You find:
$$\int_0^x \phi (t)\ w(t)\ \text{d} t =\int_0^x \frac{\text{d}}{\text{d} t}\Big[ e^{-t} w^\prime (t)\Big]\ w(t)\ \text{d} t\; ;$$
after an integration by parts in the RHside you get (if I'm not mistaken):
$$\tag{2} -e^{-x}\ w^\prime (x)\ w(x) +\int_0^x e^{-t}\ (w^\prime (t))^2\ \text{d} t=\int_0^x \phi (t)\ w(t)\ \text{d} t$$
and after another integration by parts you have:
$$\tag{3} \frac{1}{2}\ e^{-x} w^2 (x) +\underbrace{\frac{1}{2} \int_0^x e^{-t} w^2(t)\ \text{d} t}_{A(x)}+\underbrace{\int_0^x \int_0^t e^{-\tau}\ (w^\prime (\tau))^2\ \text{d} \tau\ \text{d} t}_{B(x)}=\underbrace{\int_0^x \int_0^t \phi (\tau)\ w(\tau)\ \text{d} \tau\ \text{d} t}_{C(x)}\; .$$
Functions $A$ and $C$ are obviously of class $C^1([0,1])$ (actually $C$ is of class $C^2$); because $w^\prime\in L^2$ and $\phi \in L^\infty$, you have $\phi\ (w^\prime)^2\in L^1$ hence $\int_0^t e^{-\tau}\ (w^\prime (\tau))^2\ \text{d} \tau$ is absolutely continuous and $B$ is of class $C^1([0,1])$; then from (3) $e^{-x}\ w^2(x) =2[C(x)-A(x)-B(x)]$ is of class $C^1([0,1])$ and $w\in C^1([0,1])$.
But then from (2) you gain $w^\prime \in C^1([0,1])$, therefore $w\in C^2([0,1])$ and the weak solution $w$ is actually a classical solution of (R).

Coming to 5, I didn't catch what the problem is actually asking...
Let $X:=\text{span} \Big\{ Q_1,\ldots Q_N\Big\}$. Does the problem ask to find $\tilde{w}=\sum_{n=1}^N \alpha_n\ Q_n\in X$ s.t. $B[\tilde{w},\tilde{w}]=\langle \phi ,\tilde{w}\rangle$ via solving a linear system in $\alpha_1,\ldots ,\alpha_N$?
In such a case, I think there are some problems: in fact the bilinear form $B[\cdot, \cdot]$ contains the term $\tilde{w}^2(1)$, which seems to me a quadratic polynomial in $\alpha_1,\ldots ,\alpha_N$...
