# Homework Help: Weak Form with Weighted Residuals

1. Sep 27, 2014

### TheFerruccio

1. The problem statement, all variables and given/known data
Given a strong form boundary value problem, derive the weak form using weighted residuals.

2. Relevant equations
$(2-x)u''(x)-u'(x)+u(x)=f(x)$ for $x\in(0,1)$ with $$u(0)=u(1)=0$$

3. The attempt at a solution
I must multiply both sides of this equation by an arbitrary test function $v(x)$ where $$v(0)=v(1)=0$$ to eliminate boundary terms under integration.
$$\int_0^1\left[(2-x)u''v-u'v+uv\right]dx=\int_0^1fvdx$$
Regroup to one side so I have the differential equation's residual in the integrand.
$$\int_0^1\left[(2-x)u''v-u'v+uv-fv\right]dx$$
Expand the product on the left, separate out the $v(x)$.
$$\int_0^1\left[2u''-xu''-u'+u-f\right]vdx$$
I separated this out into separate integrals and integrated by parts individually. I wanted to reduce the order of the differential equation and end up with everything being multiplied by $v'(x)$ so I could pull that out and end up with my weak form.

For organization, label each product, from left to right, 1 to 5.

1:$$2\int_0^1u''vdx=-2\int_0^1u'v'dx$$

2:$$-\int_0^1xu''vdx=\int_0^1\left(xu'-u\right)v'dx$$

3:$$-\int_0^1u'vdx=\int_0^1uv'dx$$

4:$$\int_0^1uvdx=$$ ???

5:$$-\int_0^1fvdx=$$ ???

I am blanking out on how to integrate by parts on the last two functions. I have to integrate one side while differentiating the other, but I end up with a bunch of (indefinite?) integrals that I do not know what to do with. How else should I approach this problem?

2. Sep 27, 2014

### TheFerruccio

Here is a "solution" I ended up with. I am not sure if I am right or not. It is hard for me to figure out what form something should be in to constitute the weak form. I do know that I have effectively reduced the order of the system, though. So, there are fewer boundary conditions that need to be satisfied (?). Guidance on whether I am going in the right direction would be much appreciated.

$$\int_0^1\left[(x-2)u'v'+uv'+uv-fv\right]dx=0$$

Is this the weak form?

3. Sep 28, 2014

### TheFerruccio

It is clear I must be in the wrong section. I will post this question in the engineering section.

4. Sep 29, 2014

### TheFerruccio

Well, maybe not? No replies in the engineering section either. I hope I am not being too ambiguous with my wording. Does anyone have experience with weighted residuals for deriving the weak form of a differential equation?

Let me be more specific with the question:

What is the "weak form" of a differential equation? Is it one of these?

1: The integral equation

2: The integral equation with boundary conditions for the trial function

3: The integral equation with boundary conditions for the trial function and test function

4: The integral equation with boundary conditions for the trial function and test function, and finite integrability requirements (which I do not quite understand)

5. Nov 7, 2014

### TheFerruccio

I suppose I will dig this neglected, ancient thread out from the grave to provide a solution, since this must be the first time this has been discussed on PF! For the purpose of making this available on Google search, here is what I did:

The purpose of the weak form of a differential equation is to relax the smoothness constraints by, instead of explicitly defining the behavior of the system at an infinite number of points, the behavior only needs to be satisfied on the average (a weighted infinite sum that converges to an integral at the limit).

If I start out with an equation with an operator $L$ on, say, $u(x)$, on the left side, and a function, $f(x)$, the goal is to turn:

$Lu = f$ into $a(u,v)=b(v)$ where $a(u,v)\equiv\int_\Omega\left((Lu)v\right)$ and a is symmetric and $b(v)=\int_\Omega\left(fv\right)$ and $a(u,v)=a(v,u)$ so a is a symmetric bilinear form.

In the context of this particular problem, all the formalities above mean, in short: every group of multiplied numbers that have a pair or u and v have to be symmetric with respect to u and v. This means the letters can be swapped and the same thing will happen.

Again, starting out with the strong form:

$(2-x)u''(x)-u'(x)+u(x)\forall x\in(0,1)$ and $u(0)=u(1)=0$

I use integration by parts as many steps as I can until I end up with:

$\int_0^1\left[-2u'v'+xu'v'+uv-fx\right]dx$ (1)

You end up with this result by simply integrating each multiplied group of terms by parts and eliminating the appropriate boundary terms that show up under integration. How? Simple rule: If there is an essential boundary condition on $$u$$ defined at one of the boundaries, the associated weight function (or test function) $$v$$ must be 0 at that boundary. In this case, the function under the strong form has essential boundary conditions at both boundaries. Thus, every boundary term that shows up goes to 0.

Now, I group all the symmetric terms in (1) on the left hand side (LHS), and group all the non-symmetric terms (which must only contain the test function v!) on the right hand side (RHS).

$\int_0^1\left[-2u'v'+xu'v'+uv\right]dx=\int_0^1\left[-fx\right]dx$ (2)

u & v both are 0 on x=0 and x=1. (3)

and $\int_0^1\left(u'\right)^2 dx <\infty$ (4)
and $\int_0^1\left(v'\right)^2 dx <\infty$ (5)

Q: What is the weak form?

A: The weak form is (2) & (3) & (4) & (5)

The shorthand for (3) & (4) & (5) is sometimes the following:

$u \wedge v \in H_0^1$

This means "u and v are members of the Hilbert space of functions which vanish at the boundaries (the "0" subscript), and whose first derivatives (the "1" superscript, if it was 2nd derivatives it would be "2") are square-integrable.

Notice how the essential boundary conditions continue to be satisfied in the weak form. However, the natural boundary conditions are not explicitly stated. This is because, under integration, the natural boundary conditions were handled in the cancellation of the boundary terms that showed up. It turns out that, when this problem is solved for using finite element code, the solution at the "nodes" will be identical to the exact solution, but the areas between the nodes will be expressed as some kind of approximation. Other properties, such as the derivatives, will also be different (and sometimes discontinuous, depending on the differential equation in question. This is the manifestation of the smoothness conditions that were relaxed by constructing the weak form)

Hopefully this helps future people who are seeking out assistance with their introduction to finite elements.