# Design General Cam Profiles Based on Finite Element Method
## 6 Finite Element Solution
### Numerical Quadrature  
For finite element computations, the integral for the weak form and the tangent matrices must be evaluated. These integrations can be performed on the element level. Since the integration is carried out in the finite element analysis of the reference configuration, the parameter domain coordinate \(\xi^{,\alpha}\)\(\in\)\([-1,+1]\) must be transformed to this configuration (see Figure 3).  
The Jacobian can be calculated as follows [30]:  
\[\begin{split}\mathbf{J}_{\mathrm{e}}&=\frac{\partial \mathbf{X}}{\partial\xi}\approx\sum_{\mathrm{A}}^{\mathrm{n}}\mathbf{X}_{ \mathrm{A}}\otimes\frac{\partial\mathbf{N}_{\mathrm{A}}}{\partial\xi_{ \mathrm{c}}}\;,\\ \mathbf{j}_{\mathrm{e}}&=\frac{\partial\mathbf{x}}{ \partial\xi_{\mathrm{e}}}\approx\sum_{\mathrm{A}}^{\mathrm{n}}\mathbf{X}_{ \mathrm{A}}\otimes\frac{\partial\mathbf{N}_{\mathrm{A}}}{\partial\xi_{ \mathrm{c}}}\;,\\ \mathbf{F}_{\mathrm{e}}&=\mathbf{j}_{\mathrm{e}} \,\mathbf{J}_{\mathrm{e}}^{-1}\;.\end{split} \tag{61}\]  
The integration form is then carried out with the standard Gaussian quadrature on the parameter domain. Thus, from Equations (46) and (50), the governing equation of each element can be written as  
\[\int_{\Omega_{\mathrm{e}}}\mathbf{g}\,\mathrm{d}A_{\mathrm{e}}=\int_{\Omega_{ \mathrm{e}}}\mathbf{g}_{\mathrm{p}}\mathrm{d}A_{\mathrm{e}}+\int_{\Omega_{ \mathrm{e}}}\mathbf{g}_{\mathrm{stab}}\mathrm{d}A_{\mathrm{e}} \tag{62}\]  
The integration in Equation (62) is computed by  
\[\begin{split}\int_{\Omega_{\mathrm{e}}}\mathbf{g}\,\mathrm{d}A_{ \mathrm{e}}&:=\int_{\Omega}\mathbf{g}_{\mathrm{p}}(\xi)\mathrm{ det}\mathbf{j}_{\mathrm{e}}\mathrm{d}+\int_{\Omega}\mathbf{g}_{\mathrm{stab}}(\xi) \mathrm{det}\mathbf{j}_{\mathrm{e}}\mathrm{d}\\ &=\int_{-1}^{+1}\int_{-1}^{+1}\mathbf{g}_{\mathrm{p}}(\xi^{\alpha })\mathrm{det}\mathbf{j}_{\mathrm{e}}\,\mathrm{d}\xi^{1}\mathrm{d}\xi^{2}+ \int_{-1}^{+1}\int_{-1}^{+1}\mathbf{g}_{\mathrm{stab}}(\xi^{\alpha})\mathrm{ det}\mathbf{j}_{\mathrm{e}}\,\mathrm{d}\xi^{1}\mathrm{d}\xi^{2}.\end{split} \tag{63}\]  
The integration will be done numerically. \(\mathrm{n}_{\mathrm{gp}}\) is representative for the number of Gauss points. Hence, the integral in Equation (63) will be approximated by  
\[\int_{\Omega_{\mathrm{e}}}\mathbf{g}\,\mathrm{d}A_{\mathrm{e}}\approx\sum_{ \mathrm{gp}=1}^{\mathrm{n}_{\mathrm{gp}}}\mathbf{g}_{\mathrm{p}}(\xi_{\mathrm{ gp}})\mathrm{det}\mathbf{j}_{\mathrm{e}}W_{\mathrm{p}}+\sum_{\mathrm{gp}=1}^{ \mathrm{n}_{\mathrm{gp}}}\mathbf{g}_{\mathrm{stab}}(\xi^{\alpha})\mathrm{ det}\mathbf{j}_{\mathrm{e}}W_{\mathrm{p}}. \tag{64}\]  
Here, \(W_{\mathrm{p}}\) is weighting factors and \(\xi_{\mathrm{gp}}\) denotes the coordinates of the evaluation points. The integration for the whole system can be computed as follows:  
\[\sum_{\mathrm{e}=1}^{\mathrm{n}_{\mathrm{e}}}\int_{\Omega_{\mathrm{e}}}\mathbf{ g}\,\mathrm{d}A_{\mathrm{e}}\approx\sum_{\mathrm{e}=1}^{\mathrm{n}_{\mathrm{e}}} \sum_{\mathrm{gp}=1}^{\mathrm{n}_{\mathrm{gp}}}\mathbf{g}_{\mathrm{p}}(\xi_{ \mathrm{gp}})\mathrm{det}\mathbf{j}_{\mathrm{e}}W_{\mathrm{p}}+\sum_{\mathrm{e }=1}^{\mathrm{n}_{\mathrm{e}}}\sum_{\mathrm{gp}=1}^{\mathrm{n}_{\mathrm{gp}}} \mathbf{g}_{\mathrm{stab}}(\xi^{\alpha})\mathrm{det}\mathbf{j}_{\mathrm{e}}W_{ \mathrm{p}}\;. \tag{65}\]