This report is a basic review of weighted residual methods and FEM. Some basic diﬀerential equations are used to illustrate the method. Mathematica and Matlab code written to solve numerically a ﬁrst and second order ODE using FEM.
First order ODE (generated by Mathematica)
Mathematica notebook which solves ﬁrst order by FEM. notebook
second order ODE animation (generated by Matlab) animation
Matlab driver ﬁle This ﬁle sets up the call to do FEM and the animation
Matlab function to solve ODE using FEM This ﬁle does FEM solution on general second order ODE