NivaarExam PrepOfficial exam papers ↗

22-Mec-B10 Finite Element Analysis · May 2017

Question 2 of 7: Least-squares cubic solution of a loaded bar

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. National Examinations, May 2017 — 16-Mec-B10, Finite Element Analysis. Three hours, open book, any non-communicating calculator permitted. FIVE (5) questions constitute a complete paper and the first five appearing in the answer book are the ones marked; each question carries 20 marks and every question is to be solved within the context of the finite element method. Some questions require an essay-format answer, where clarity and organization are themselves marked. All seven questions are worked below so the set functions as a complete study resource.

Reference texts (22-Mec-B10 Finite Element Analysis).

Question 2: Least-squares cubic solution of a loaded bar (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. The bar equation $EA\,u'' + cx = 0$ on $0 \lt x \lt L$, with the essential condition $u(0)=0$ and the natural condition $EA\,u'(L) = P$; the trial space is cubic polynomials and the least-squares evaluation points are $x = L/4$ and $x = 3L/4$.

Find. The three coefficients of the cubic trial function and hence the approximate displacement field $u(x)$, expressed in the symbols $P$, $c$, $E$, $A$ and $L$.

q(x) = cxPx, uLx = L/4x = 3L/4fixedevaluation points in teal; the end load P sets the natural boundary condition
Question 2 — cantilevered bar carrying the linearly growing distributed load q(x) = cx and the end load P; the two least-squares evaluation points are marked.

Approach. Choose a cubic trial function that already satisfies the essential boundary condition, form the residual of the governing equation, minimise the discrete sum of squared residuals at the two stated points, and close the system with the natural boundary condition at the free end.

  1. Select a trial function that satisfies the essential condition exactly. A weighted-residual method must respect the essential (displacement) boundary condition a priori; the natural (force) condition is enforced through the formulation instead. Dropping the constant term from a general cubic does exactly that: $$\tilde u(x) = a_1x + a_2x^{2} + a_3x^{3},\qquad \tilde u(0) = 0\ \text{ automatically}$$
  2. Form the residual. Substituting the trial function into the governing equation leaves $$R(x) = EA\,\frac{d^{2}\tilde u}{dx^{2}} + cx = EA\,(2a_2 + 6a_3x) + cx$$ Note that $a_1$ has already vanished: it is a rigid-stretch coefficient that the second derivative cannot see. The residual therefore contains only two free coefficients, and this observation controls the whole solution.
  3. Minimise the discrete least-squares functional. With evaluation points $x_1 = L/4$ and $x_2 = 3L/4$, $$S(a_2,a_3) = \big[R(x_1)\big]^{2} + \big[R(x_2)\big]^{2},\qquad \frac{\partial S}{\partial a_2} = \frac{\partial S}{\partial a_3} = 0$$ Because there are exactly two evaluation points and exactly two coefficients appearing in $R$, the resulting normal equations drive $S$ to its absolute minimum of zero, which is only possible if the residual vanishes at both points: $$R(L/4) = 0,\qquad R(3L/4) = 0$$ In other words, on this problem least squares degenerates to collocation at the same two stations — a coincidence worth stating explicitly rather than hiding, since it is what makes the algebra so short.
  4. Solve the two residual equations. Writing them out, $$2a_2 + \tfrac{3}{2}a_3L = -\frac{cL}{4EA},\qquad 2a_2 + \tfrac{9}{2}a_3L = -\frac{3cL}{4EA}$$ Subtracting the first from the second gives $3a_3L = -\dfrac{cL}{2EA}$, so $$a_3 = -\frac{c}{6EA}$$ and back-substituting returns $2a_2 = -\dfrac{cL}{4EA} + \dfrac{cL}{4EA} = 0$, hence $a_2 = 0$.
  5. Apply the natural boundary condition for the third equation. The free end carries the axial load $P$, so $$EA\,\tilde u'(L) = EA\big(a_1 + 2a_2L + 3a_3L^{2}\big) = P \;\Longrightarrow\; EA\,a_1 - \frac{cL^{2}}{2} = P$$ which gives $$a_1 = \frac{P}{EA} + \frac{cL^{2}}{2EA}$$
  6. Assemble the approximate solution. Collecting the three coefficients, $$\boxed{\,\tilde u(x) = \frac{Px}{EA} + \frac{c}{6EA}\Big(3L^{2}x - x^{3}\Big)\,}$$ The first term is the familiar uniform-stretch response to the end load; the second is the contribution of the triangular distributed load.

The quality of this approximation deserves comment, because it is unusually good. Substituting the coefficients back into the residual gives $R(x) \equiv 0$ for all $x$, not merely at the two evaluation points, and $S$ attains the value zero. That is not luck: the exact solution of $EA\,u'' = -cx$ subject to the same two boundary conditions is itself a cubic, so the cubic trial space contains the exact answer and any consistent weighted-residual method must find it. Integrating the governing equation directly confirms it, and repeating the calculation with the continuous least-squares functional $\min\int_0^L R^2\,dx$ returns the same three coefficients. The choice of evaluation points is therefore immaterial here — any two distinct stations would do — which is a useful sanity check but also a warning that this problem cannot reveal how sensitive the method normally is to that choice.

Two derived quantities close the answer. The tip displacement is

$$\tilde u(L) = \frac{PL}{EA} + \frac{cL^{3}}{3EA}$$

and the internal axial force follows from $N(x) = EA\,\tilde u'(x) = P + \tfrac{1}{2}c\big(L^{2}-x^{2}\big)$, which equals $P$ at the free end as required and rises to $N(0) = P + cL^{2}/2$ at the wall. That value is exactly the applied end load plus the resultant $\int_0^L cx\,dx = cL^{2}/2$ of the distributed load, so global equilibrium closes and the solution is confirmed from a direction entirely independent of the residual algebra.

Question 2 — final results
QuantityResult
Trial function$\tilde u = a_1x + a_2x^{2} + a_3x^{3}$ (satisfies $u(0)=0$)
Residual$R(x) = EA(2a_2+6a_3x) + cx$
Coefficient $a_1$$\dfrac{P}{EA} + \dfrac{cL^{2}}{2EA}$
Coefficient $a_2$$0$
Coefficient $a_3$$-\dfrac{c}{6EA}$
Approximate solution$\tilde u(x) = \dfrac{Px}{EA} + \dfrac{c}{6EA}\left(3L^{2}x-x^{3}\right)$
Tip displacement$\tilde u(L) = \dfrac{PL}{EA} + \dfrac{cL^{3}}{3EA}$
Accuracy$R(x)\equiv 0$ — the cubic is the exact solution