Q:

weak solution / variational calculus

We have a one dimensional boundary value problem $$ - (\omega u_x)_x = f \, \text{for} \, -1<x<1 \\ u(-1)=u(1) = 0 $$ with $$ \omega(x): = \sqrt{(1-x^2)} \, \text{and} \, f(x) := x \, \text{for} \, -1<x<1$$
Task: Find $l : H_{0}^{1} (-1,1,\omega) \rightarrow \mathbb{R}$ such that the variational equation $a(u,v) = l(v)$ for all $v \in  H_{0}^{1} (-1,1,\omega) $ holds and show with the Lax-Milgram Theorem that only one unique solution exists for the boundary problem in $H_{0}^{1} (-1,1,\omega)$.
The definition of $ H_{0}^{1} (-1,1,\omega) := \{ v \vert \, v(-1)=v(1)=0 ; \vert \vert v \vert \vert_{L^2(-1,1,\omega)}< \infty; \vert \vert v_x \vert \vert_{L^2(-1,1,\omega)}< \infty  \}$
My approach:
$$a(.,.) = H_{0}^{1} (-1,1,\omega) \times H_{0}^{1} (-1,1,\omega) \rightarrow \mathbb{R} $$
Thus $$ a(u,v) = \int_{\Omega} \nabla u \nabla v \, dx $$ and $$ l(v)=\int_{\Omega} fv \, dx =-\int_{\Omega} (\omega(x) u_x)_x v \,dx $$
I don't know if this approach makes sense. I am grateful for any help, as I am preparing for an exam and would like to understand how to solve such a task.

A:

The definition of $a$ needs to correspond to your differential operator, in this case $(wu_x)_x$. First off, multiply both sides by a test function $v$ and integrate:
$$ -\int_{[-1,1]}(wu_x)_xv = \int_{[-1,1]}fv$$
Since $a$ needs to be defined on $H_0^1(-1,1;w)$ you can only take one derivative; therefore you need to integrate by parts:
$$-\int_{[-1,1]}(wu_x)_xv=\int_{[-1,1]}wu_xv_x =:a(u,v). $$
Now all you have to do is prove that $a$ is coercive and bounded.

