This document shows a simple approach of some concepts of finite element method using the computer algebra system Maxima. Part of theory presented here is based on the book “Finite Element Procedures” of K. J. Bathe. Maxima is an interesting open source alternative to Wolfram Mathematica or Maple.

### Problem description

The follow procedure is valid for a trapezoid (μ≠1) or rectangular (μ=1) quadrilateral finite elements. This generical quadrilateral has 4 nodes and 2 degrees of freedom for each node.

$\{f_{xy}\}=\begin{pmatrix}u\left( x,y\right) \\ v\left( x,y\right) \end{pmatrix}$

### Results

Shape functions matrix:

$N=\begin{pmatrix}-\frac{\left( y-h\right) \,\left( l\mathit{\ensuremath{\mu}}-x\right) }{hl\mathit{\ensuremath{\mu}}} & 0 & -\frac{x\,\left( y-h\right) }{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{xy}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{y\,\left( l\mathit{\ensuremath{\mu}}-x\right) }{hl\mathit{\ensuremath{\mu}}} & 0\\ 0 & -\frac{\left( y-h\right) \,\left( l\mathit{\ensuremath{\mu}}-x\right) }{hl\mathit{\ensuremath{\mu}}} & 0 & -\frac{x\,\left( y-h\right) }{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{xy}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{y\,\left( l\mathit{\ensuremath{\mu}}-x\right) }{hl\mathit{\ensuremath{\mu}}}\end{pmatrix}$

B matrix:

$B=\begin{pmatrix}-\frac{h-y}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{h-y}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{y}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{y}{hl\mathit{\ensuremath{\mu}}} & 0\\ 0 & -\frac{l\mathit{\ensuremath{\mu}}-x}{hl\mathit{\ensuremath{\mu}}} & 0 & -\frac{l\mathit{\ensuremath{\mu}}-x}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{x}{hl\mathit{\ensuremath{\mu}}} & 0 & \frac{x}{hl\mathit{\ensuremath{\mu}}}\\ -\frac{l\mathit{\ensuremath{\mu}}-x}{hl\mathit{\ensuremath{\mu}}} & -\frac{h-y}{hl\mathit{\ensuremath{\mu}}} & -\frac{x}{hl\mathit{\ensuremath{\mu}}} & \frac{h-y}{hl\mathit{\ensuremath{\mu}}} & \frac{x}{hl\mathit{\ensuremath{\mu}}} & \frac{y}{hl\mathit{\ensuremath{\mu}}} & \frac{l\mathit{\ensuremath{\mu}}-x}{hl\mathit{\ensuremath{\mu}}} & -\frac{y}{hl\mathit{\ensuremath{\mu}}}\end{pmatrix}$

An interesting approach of the command for algebraic factorization in Maxima “rat” (rational expression) is presented in order to find shape functions.