- #1
finite_diffidence
- 2
- 0
- Homework Statement
- Deriving the Adjoint / Tangent Linear Model for a non-linear PDE
- Relevant Equations
- please see below as latex is not rendering
I am trying to derive the adjoint / tangent linear model matrix for this partial differential equation, but cannot follow the book's steps as I do not know the math. This technique will be used to solve another homework question. Rather than posting the homework question, I would like to understand the technique generally so I can forever use it. Here is the equation:
$$\frac{\partial u}{\partial t} = \frac{\partial u}{\partial y} \frac{\partial u}{\partial x}$$
Now in the book the derivation continues as follows:
1. First substitute in $$ u \rightarrow u + \delta u $$.
Then get rid of all the terms which have $$ \delta u \delta u $$
We are left with:
$$ \frac{\partial \delta u}{\partial t} = \frac{\partial \delta u}{\partial y} \frac{\partial u}{\partial x} + \frac{\partial u}{\partial y} \frac{\partial \delta u}{\partial x}$$
2. Now we can integrate by parts to move the derivatives over from the perturbation to the Lagrange multiplier. We ignore the surface term picked up as it will vanish at the boundaries:
$$ \int \lambda \left(\frac{\partial \delta u}{\partial t} - \frac{\partial \delta u}{\partial y} \frac{\partial u}{\partial x} + \frac{\partial u}{\partial y} \frac{\partial \delta u}{\partial x} \right)d\Omega dt
$$
to:
$$ \int \delta u \left( -\frac{\partial \lambda}{\partial t} + \frac{\partial}{\partial y} (\lambda \frac{\partial u}{\partial x}) + \frac{\partial u}{\partial x} (\lambda \frac{\partial u}{\partial y}) \right)d\Omega dt
$$
> How did we do this trick? I was told it is integration by parts, but could someone do it explicitly step by step?3. This gives us the continuous adjoint equation:
$$
\frac{\partial \lambda}{\partial t} = \frac{\partial}{\partial y} (\lambda \frac{\partial u}{\partial x}) + \frac{\partial u}{\partial x} (\lambda \frac{\partial u}{\partial y})
$$
4. From that equation we can discretize in time and write out the longhand summation of all the lagrange multiplies. We pick up a load of terms:
$$
\lambda_0 - \lambda_1 \left(u_1 - u_0 - \Delta t \frac{\partial u_0}{\partial y} \frac{\partial u_0}{\partial x}\right) + \lambda_1 \left(u_2 - u_1 - \Delta t \frac{\partial u_1}{\partial y} \frac{\partial u_1}{\partial x}\right)
$$
Or playing the same trick :
$$ \lambda_0 - \lambda_1 + \Delta t\left(\frac{\partial}{\partial y}\lambda_1\frac{\partial u_1}{\partial x} + \frac{\partial}{\partial x}\lambda_1\frac{\partial u_1}{\partial y} \right)
$$
> How do we get these two lines? I have no idea. If someone could do it very explicitly that would be helpful in me understanding what I am missing.
If someone with infinitely better math skills than mine could illuminate the way, that would be much appreciated.
$$\frac{\partial u}{\partial t} = \frac{\partial u}{\partial y} \frac{\partial u}{\partial x}$$
Now in the book the derivation continues as follows:
1. First substitute in $$ u \rightarrow u + \delta u $$.
Then get rid of all the terms which have $$ \delta u \delta u $$
We are left with:
$$ \frac{\partial \delta u}{\partial t} = \frac{\partial \delta u}{\partial y} \frac{\partial u}{\partial x} + \frac{\partial u}{\partial y} \frac{\partial \delta u}{\partial x}$$
2. Now we can integrate by parts to move the derivatives over from the perturbation to the Lagrange multiplier. We ignore the surface term picked up as it will vanish at the boundaries:
$$ \int \lambda \left(\frac{\partial \delta u}{\partial t} - \frac{\partial \delta u}{\partial y} \frac{\partial u}{\partial x} + \frac{\partial u}{\partial y} \frac{\partial \delta u}{\partial x} \right)d\Omega dt
$$
to:
$$ \int \delta u \left( -\frac{\partial \lambda}{\partial t} + \frac{\partial}{\partial y} (\lambda \frac{\partial u}{\partial x}) + \frac{\partial u}{\partial x} (\lambda \frac{\partial u}{\partial y}) \right)d\Omega dt
$$
> How did we do this trick? I was told it is integration by parts, but could someone do it explicitly step by step?3. This gives us the continuous adjoint equation:
$$
\frac{\partial \lambda}{\partial t} = \frac{\partial}{\partial y} (\lambda \frac{\partial u}{\partial x}) + \frac{\partial u}{\partial x} (\lambda \frac{\partial u}{\partial y})
$$
4. From that equation we can discretize in time and write out the longhand summation of all the lagrange multiplies. We pick up a load of terms:
$$
\lambda_0 - \lambda_1 \left(u_1 - u_0 - \Delta t \frac{\partial u_0}{\partial y} \frac{\partial u_0}{\partial x}\right) + \lambda_1 \left(u_2 - u_1 - \Delta t \frac{\partial u_1}{\partial y} \frac{\partial u_1}{\partial x}\right)
$$
Or playing the same trick :
$$ \lambda_0 - \lambda_1 + \Delta t\left(\frac{\partial}{\partial y}\lambda_1\frac{\partial u_1}{\partial x} + \frac{\partial}{\partial x}\lambda_1\frac{\partial u_1}{\partial y} \right)
$$
> How do we get these two lines? I have no idea. If someone could do it very explicitly that would be helpful in me understanding what I am missing.
If someone with infinitely better math skills than mine could illuminate the way, that would be much appreciated.