# Developing Euler Lagrange equations under the Ritz method

Using the Ritz Method we can express vibration in a beam as follows: $$w(x,t) = \displaystyle\sum_{j=1}^{n}\psi_{j}(x)u_{j}(t),$$

where $$\psi_{j}(x)$$ is an $$\textit{admissible}$$ function, i.e. a continuous function that satisfies the boundary conditions of the system.

Using the following form of Euler-Lagrange,

$$\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_{i}}\right)-\frac{\partial T}{\partial q_{i}}+\frac{\partial V}{\partial q_{i}}=0 \text{ } \forall \text{ }i\in \mathbb{N}.$$

Deriving expressions for kinetic energy ($$T$$) and potential energy ($$V$$) and substituting,

$$0=\frac{d}{dt}\left(\frac{\partial}{\partial \dot{x}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}\frac{1}{2}\rho A_{c} \int_{0}^{a} \psi_{j}\psi_{k}\text{ } dx\right)\right)-\frac{\partial}{\partial x}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}\frac{1}{2}\rho A_{c} \int_{0}^{a} \psi_{j}\psi_{k}\text{ } dx\right) \\ +\frac{\partial}{\partial x}\left(\displaystyle\sum_{j=1}^{n}\displaystyle\sum_{k=1}^{n}u_{j}u_{k}\frac{EI}{2}\int_{0}^{a}\frac{\partial^{2}\psi_{j}}{\partial x^{2}}\frac{\partial^{2}\psi_{k}}{\partial x^{2}}\text{ }dx\right).$$

Frankly, I don't really know where to go from here. I'm stuck primarily because of the $$\dot{x}$$ term. I think the next step is to find some new way to express $$\dot{x}$$, but I'm not sure.

• Hint: Don't change notation midstream:) Think about the relation (or not) between the $q$, $x$ and $u$ variables. Commented May 18, 2020 at 18:02
• @Qmechanic Should I edit the original question to make it more clear for future readers? Commented May 18, 2020 at 23:38

$$\frac{\partial}{\partial \dot{x}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}\frac{1}{2}A_{c}\int_{0}^{a}\psi_{j}\psi_{k}dx\right)=0$$

I was taking Euler-Lagrange with respect to the wrong variables. I should have set $$q_{i}=u_{i}$$ $$\forall$$ $$i\in\mathbb{N}$$. Below I will correct the mistake and go through with the derivation for completeness and to attempt to eliminate all potential confusion.

For a beam of length $$a$$,

$$T=\frac{1}{2}\rho A_{c} \int_{0}^{a}\dot{w}^{2}\text{ }dx$$

Substituting our definition for $$w$$,

$$T=\frac{1}{2}\rho A_{c} \int_{0}^{a}\left(\displaystyle\sum_{j=1}^{N}\psi_{j}\dot{u}_{j}\right)^{2}\text{ }dx \\ T=\frac{1}{2}\rho A_{c} \int_{0}^{a}\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\psi_{j}\psi_{k}\dot{u}_{j}\dot{u}_{k}\text{ }dx.$$

I believe that this should play nicely with Fubini's Theorem, but I can't exactly show why this is true since I don't know the details well enough, but I believe it should have something to do with the fact that the integral is finite over $$[0,a]$$. Blindly applying Fubini, and recognizing that $$u_{j}$$ is not a function of $$x$$,

$$T=\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}\frac{1}{2}\rho A_{c} \int_{0}^{a} \psi_{j}\psi_{k}\text{ } dx.$$

Defining,

$$(m_{jk})_{b} \equiv \rho A_{c} \int_{0}^{a} \psi_{j}\psi_{k}\text{ } dx.$$

Substituting,

$$T=\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\frac{1}{2}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}.$$

For a beam we can express the potential energy as $$V=\int_{0}^{a}\frac{EI}{2}\left(\frac{\partial^{2}w}{\partial x^{2}}\right)^{2} dx.$$

Substituting in our definition for $$w$$, $$V=\frac{EI}{2}\int_{0}^{a}\left(\frac{\partial^{2}}{\partial x^{2}}\displaystyle\sum_{j=1}^{n}\psi_{j}u_{j}\right)^{2}dx \\ V=\frac{EI}{2}\int_{0}^{a}\left(\displaystyle\sum_{j=1}^{n}\frac{\partial^{2}\psi_{j}}{\partial x^{2}}u_{j}\right)^{2}dx.$$

Taking similar steps to before (to shorten the answer length), $$V=\displaystyle\sum_{j=1}^{n}\displaystyle\sum_{k=1}^{n}\frac{EI}{2}\int_{0}^{a}\frac{\partial^{2}\psi_{j}}{\partial x^{2}}\frac{\partial^{2}\psi_{k}}{\partial x^{2}}u_{j}u_{k}\text{ }dx.$$

Defining, $$(k_{jk})_{b} \equiv EI\int_{0}^{a}\frac{\partial^{2}\psi_{j}}{\partial x^{2}}\frac{\partial^{2}\psi_{k}}{\partial x^{2}}\text{ }dx.$$

Substituting, $$V=\displaystyle\sum_{j=1}^{n}\displaystyle\sum_{k=1}^{n}\frac{1}{2}u_{j}u_{k}(k_{jk})_{b}.$$

The general formulation for Euler-Lagrange can be expressed as $$\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_{i}}\right)-\frac{\partial T}{\partial q_{i}}+\frac{\partial V}{\partial q_{i}}=0 \text{ } \forall \text{ }i\in \mathbb{N}.$$

Choosing $$q_{i}=u_{i}$$ $$\forall$$ $$i\in \mathbb{N}$$, $$0=\frac{d}{dt}\left(\frac{\partial}{\partial \dot{u}_{i}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right)\right)-\frac{\partial}{\partial u_{i}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right)+\frac{\partial}{\partial u_{i}}\left(\displaystyle\sum_{j=1}^{n}\displaystyle\sum_{k=1}^{n}u_{j}u_{k}(k_{ij})_{b}\right)\\ 0=\frac{d}{dt}\left(\frac{\partial}{\partial \dot{u}_{i}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right)\right)+\frac{\partial}{\partial u_{i}}\left(\displaystyle\sum_{j=1}^{n}\displaystyle\sum_{k=1}^{n}u_{j}u_{k}(k_{ij})_{b}\right).$$

Examining the case where i=1 for the first term, $$\frac{\partial}{\partial \dot{u}_{1}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\frac{1}{2}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right) = \begin{matrix} \displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{1}\dot{u}_{1}(m_{11})_{b}\right)\text{ }+ & \displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{1}\dot{u}_{2}(m_{12})_{b}\right)\text{ }+ & \cdots & +\displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{1}\dot{u}_{N}(m_{1N})_{b}\right)+ \\ \displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{2}\dot{u}_{1}(m_{21})_{b}\right)\text{ }+ & \displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{2}\dot{u}_{2}(m_{22})_{b}\right)\text{ }+ & \cdots & +\displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{2}\dot{u}_{N}(m_{2N})_{b}\right)+ \\ \vdots & \vdots & \ddots & \vdots \\ \displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{N}\dot{u}_{1}(m_{N1})_{b}\right)\text{ }+ & \displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{N}\dot{u}_{2}(m_{N2})_{b}\right)\text{ }+ & \cdots & +\displaystyle\frac{\partial}{\partial \dot{u}_{1}}\left(\frac{1}{2}\dot{u}_{N}\dot{u}_{N}(m_{NN})_{b}\right) \end{matrix} \\ \\ \\ \\ =\begin{matrix} \dot{u}_{1}(m_{11})_{b}\text{ }+ & \frac{1}{2}\dot{u}_{2}(m_{12})_{b}\text{ }+ & \cdots & +\frac{1}{2}\dot{u}_{N}(m_{1N})_{b}+ \\ \frac{1}{2}\dot{u}_{2}(m_{21})_{b}\text{ }+ & 0\text{ }+ & \cdots & +0+ \\ \vdots & \vdots & \ddots & \vdots \\ \frac{1}{2}\dot{u}_{N}(m_{N1})_{b}\text{ }+ & 0\text{ }+ & \cdots & +0 \end{matrix}. \nonumber$$

Recognizing that $$(m_{jk})_{b}=(m_{kj})_{b}$$, $$\frac{\partial}{\partial \dot{u}_{1}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right) = \begin{matrix} \dot{u}_{1}(m_{11})_{b}\text{ }+ & \frac{1}{2}\dot{u}_{2}(m_{12})_{b}\text{ }+ & \cdots & +\frac{1}{2}\dot{u}_{N}(m_{1N})_{b}+ \\ \frac{1}{2}\dot{u}_{2}(m_{12})_{b}\text{ }+ & 0\text{ }+ & \cdots & +0+ \\ \vdots & \vdots & \ddots & \vdots \\ \frac{1}{2}\dot{u}_{N}(m_{1N})_{b}\text{ }+ & 0\text{ }+ & \cdots & +0 \end{matrix} \nonumber \\ \frac{\partial}{\partial \dot{u}_{1}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right) = \displaystyle\sum_{j=1}^{N} \dot{u}_{j}(m_{1j})_{b}.$$

Generalizing for all $$i$$, $$\frac{\partial}{\partial \dot{u}_{i}}\left(\displaystyle\sum_{j=1}^{N}\displaystyle\sum_{k=1}^{N}\dot{u}_{j}\dot{u}_{k}(m_{jk})_{b}\right) = \displaystyle\sum_{j=1}^{N} \dot{u}_{j}(m_{ij})_{b}.$$

Similarly for the second term, $$\frac{\partial}{\partial u_{i}}\left(\displaystyle\sum_{j=1}^{N} \displaystyle\sum_{k=1}^{N}u_{j}u_{k}(k_{jk})_{b}\right)=\displaystyle\sum_{j=1}^{N}u_{j}(k_{ij})_{b}.$$

Substituting, $$\frac{d}{dt}\left(\displaystyle\sum_{j=1}^{N} \dot{u}_{j}(m_{ij})_{b}\right)+\displaystyle\sum_{j=1}^{N}u_{j}(k_{ij})_{b}=0 \\ \displaystyle\sum_{j=1}^{N} \ddot{u}_{j}(m_{ij})_{b}+\displaystyle\sum_{j=1}^{N}u_{j}(k_{ij})_{b}=0.$$

Rewriting as a matrix equation, $$[m]\ddot{u}+[k]u=\boldsymbol{0}.$$

From this point we can solve this system as an N degree of freedom system in $$u$$ using classical modal analysis. To get back to physical coordinates there will have to be 2 coordinate transformations.

Please let me know if there is anything I can do to improve this answer.