3.2. Variational formulation
The variational form associated with Eqns. (17) to (19) over a typical linear element \((\eta_{e},\ \eta_{e+1})\) is given by
\(\int_{\eta_{e}}^{\eta_{e+1}}{w_{1}\left(\frac{\text{df}}{\text{dη}}-h\right)d\eta=0}\)(22)
\(\int_{\eta_{e}}^{\eta_{e+1}}{w_{2}\left(h^{{}^{\prime\prime}}+\frac{A_{2}}{A_{1}}\text{f\ }h^{{}^{\prime}}-\frac{A_{2}}{A_{1}}h^{2}-\alpha\ A_{1}\left[f^{2}h^{{}^{\prime\prime}}-2f\ h\ h^{{}^{\prime}}\right]-A_{1}Mh+A_{1}\left[\theta-NrS\right]\right)d\eta=0}\ \)(23)
\(\int_{\eta_{e}}^{\eta_{e+1}}{w_{3}\left(\left(1+A_{4}R\right)\theta^{{}^{\prime\prime}}-Pr\ \frac{A_{3}}{A_{4}}\text{\ f\ }\theta^{{}^{\prime}}-Pr\ \beta\ A_{3}\left[f^{2}\theta^{{}^{\prime\prime}}+f\ h\ \theta^{{}^{\prime}}\right]\right)d\eta=0}\)(24)
\(\int_{\eta_{e}}^{\eta_{e+1}}{w_{4}(S^{{}^{\prime\prime}}-Sc\ f\ S^{{}^{\prime}}-\ Sc\ C_{r}\text{\ S})d\eta=0}\)(25)
Where \(w_{1},w_{2},\ w_{3}\), and \(w_{4}\) are arbitrary test functions and may be viewed as the variations in\(f,\ h,\ \theta,\ \ \)and S respectively.