# Interpretation of the variational principle for the Ritz approximation, solid Mechanics

Below $U$ and $V$ are recpectively the internal and external energy components of a given structural element:

$$U+V=W$$

Expressing $U$ in terms of the strains $\varepsilon$ and the material consitutive matrix $F$: $$\frac12\int_V{\varepsilon^TF\varepsilon}dV + V=W$$ Representing the strains by $\varepsilon=Bu$, where $B$ is a matrix containing the kinematics derivatives and $u$ is the displacement vector: $$\frac12\int_V{u^TB^TFBu}dV + V=W$$ Approximating $u$ using a set of Ritz trial functions, so that $u=g\{c\}$, with $c$ defined as Ritz constants: $$\frac12\{c\}^T\int_V{g^TB^TFBg}dV\{c\} + K_2 \{c\}=W$$ $$\frac12\{c\}^TK_1\{c\} + K_2 \{c\}=W$$ $$\frac12\{c\}^TK_1\{c\} + K_2 \{c\}=W$$ $$\frac12\left(\{c\}^TK_1 + K_2 \right)\{c\}=W$$

The principle of total virtual work states that when a virtual change in the displacement field takes place there will be a corresponding change in the strain state (internal energy) so that the virtual change in the total work is zero:

(1) $$\frac12\delta\left(\left(\{c\}^TK_1 + K_2 \right)\{c\}\right)=\delta W=0$$

Here it comes the question, how to apply the variational derivative. In my understanding it is:

$$\frac12\left(\{\delta c\}^TK_1 + K_2 \right)\{c\} + \frac12\left(\{c\}^TK_1 + K_2 \right)\{\delta c\}=0$$

But I don't know how to achieve the known answer from this equation. The known answer is, for any set of Ritz constants $\{c\}$:

(2)$$K_1\{c\}+K_2=0$$

Which we solve to find $\{c\}$.

I would really appreciate if one could explain the passage between (1) and (2).

You have a small mistake $$\frac12\{c\}^TK_1\{c\} + K_2 \{c\}=W$$ $$\bigg(\frac12\{c\}^TK_1\ + K_2\bigg) \{c\}=W$$
and $$\delta\Bigg( \bigg(\frac12\{c\}^TK_1\ + K_2\bigg) \{c\}\Bigg)=\delta W=0$$ $$\delta \bigg(\frac12\{c\}^TK_1\ + K_2\bigg) \{c\}+ \bigg(\frac12\{c\}^TK_1\ + K_2\bigg)\delta \{c\}=\delta W=0$$ $$\bigg(\frac12\{\delta c\}^TK_1\ \bigg) \{c\}+\bigg(\frac12\{ c\}^TK_1\ + K_2\bigg) \{\delta c\}=\delta W=0$$ $$\frac12\{\delta c\}^TK_1\ \{c\}+\frac12\{ c\}^TK_1\{\delta c\}\ + K_2 \{\delta c\}=\delta W=0$$ by assuming that $K_1$ is symmetric $$\frac12\{c\}^TK_1\ \{\delta c\}+\frac12\{ c\}^TK_1\{\delta c\}\ + K_2 \{\delta c\}=\delta W=0$$ $$\{c\}^TK_1\ \{\delta c\} + K_2 \{\delta c\}=\delta W=0$$ $$\bigg(\{c\}^TK_1\ + K_2\bigg) \{\delta c\}=\delta W=0$$ $$\Rightarrow \{c\}^TK_1\ + K_2=0$$ since we assumed that $K_1$ is symmetric it can also be written as $$\Rightarrow K_1\{c\} + K_2=0$$