---
title: "Ritz method for bar with distributed load"
subject: "Finite Element Method"
chapter: 4
key: "semester_8/finite_element_method:ritz-bar-quadratic-trial"
source: https://www.bctengineer.com/q/semester_8/finite_element_method/ritz-bar-quadratic-trial
site: BCT Engineering
---

# Ritz method for bar with distributed load

Finite Element Method · Chapter 4: Continuum Problems

- Asked in: year not given, 6 marks
- Video: [Rayleigh-Ritz Method](https://www.youtube.com/watch?v=JWh4Ufj5Gbg) — Josh Pilipovsky
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/finite_element_method/ritz-bar-quadratic-trial
- Whole chapter: https://www.bctengineer.com/md/semester_8/finite_element_method/chapter-4

## Question

A uniform bar of length 2 m, area 300 mm$^2$ and $E = 70$ GPa is fixed at $x = 0$. It carries a uniformly distributed axial load of 6 kN/m along its length and a point axial load of 12 kN at the free end. Using the Rayleigh-Ritz method with $u = a_1x + a_2x^2$, find the coefficients and the end displacement. Is the result exact?

## Short answer

Minimize total potential energy with u=a1x+a2x^2. Set derivatives to zero: a1=1.143e-3, a2=-1.429e-7 per mm; end displacement u(L)=1.714 mm. Exact, since the trial space contains the true quadratic solution.

## Answer

#### Data (units: N, mm)

$AE = 300 \times 70\times10^3 = 2.1\times10^7$ N, $L = 2000$ mm, $q = 6$ N/mm, $P = 12\,000$ N.

The trial function satisfies $u(0) = 0$.

#### Potential energy

$$
\Pi = \frac{AE}{2}\int_0^L\left(\frac{du}{dx}\right)^2dx - q\int_0^L u\,dx - P\,u(L)
$$

With $u' = a_1 + 2a_2x$:
$$
\begin{aligned}
\int_0^L u'^2dx &= a_1^2L + 2a_1a_2L^2 + \tfrac{4}{3}a_2^2L^3 \\
\int_0^L u\,dx &= \tfrac{1}{2}a_1L^2 + \tfrac{1}{3}a_2L^3 \\
u(L) &= a_1L + a_2L^2
\end{aligned}
$$

#### Stationary conditions

$$
\begin{aligned}
\frac{\partial\Pi}{\partial a_1} &= AE\,(a_1L + a_2L^2) - \tfrac{1}{2}qL^2 - PL = 0 \\
\frac{\partial\Pi}{\partial a_2} &= AE\,(a_1L^2 + \tfrac{4}{3}a_2L^3) - \tfrac{1}{3}qL^3 - PL^2 = 0
\end{aligned}
$$

Divide the first by $L$ and the second by $L^2$:
$$
\begin{aligned}
AE\,(a_1 + a_2L) &= \tfrac{1}{2}qL + P = 6000 + 12\,000 = 18\,000 \\
AE\,(a_1 + \tfrac{4}{3}a_2L) &= \tfrac{1}{3}qL + P = 4000 + 12\,000 = 16\,000
\end{aligned}
$$

Subtract: $AE\,\tfrac{1}{3}a_2L = -2000$, so $a_2 = \dfrac{-6000}{AE\,L} = \dfrac{-6000}{4.2\times10^{10}} = -1.4286\times10^{-7}\ \text{mm}^{-1}$.

Then $a_1 = \dfrac{18\,000}{AE} - a_2L = 8.5714\times10^{-4} + 2.8571\times10^{-4} = 1.1429\times10^{-3}$.

#### End displacement

$$
u(L) = a_1L + a_2L^2 = 2.2857 - 0.5714 = 1.714\ \text{mm}
$$

#### Exactness

The exact solution of $AE\,u'' + q = 0$ with $u(0) = 0$ and $AE\,u'(L) = P$ is
$$
u = \frac{(P + qL)}{AE}x - \frac{q}{2AE}x^2
$$
which is a quadratic. Our coefficients match it ($\frac{24\,000}{2.1\times10^7} = 1.1429\times10^{-3}$ and $\frac{6}{4.2\times10^7} = 1.4286\times10^{-7}$). So the result is exact because the trial function contains the exact solution.

**Answer:** $a_1 = 1.143\times10^{-3}$, $a_2 = -1.429\times10^{-7}\ \text{mm}^{-1}$; end displacement $= 1.714$ mm; yes, exact.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why is u = a1 x + a2 x^2 acceptable?
   A. It satisfies the essential BC u(0) = 0
   B. It satisfies the natural BC
   C. It is linear
   D. It is constant
   Answer: A. u(0) = 0 for any a1, a2, matching the fixed end; natural conditions need not be satisfied. (Key point: Trial function)

2. What is the functional for this bar?
   A. Pi = AE integral u dx
   B. Pi = AE/2 integral (u')^2 dx - q integral u dx - P u(L)
   C. Pi = integral q u'' dx
   D. Pi = P u(0)
   Answer: B. Pi is the strain energy minus the work of the distributed load and the end load. (Key point: Potential energy)

3. What is the right-hand side of the first stationary equation AE(a1 + a2 L)?
   A. qL + P = 24 000 N
   B. P = 12 000 N
   C. qL/2 + P = 18 000 N
   D. qL/3 + P = 16 000 N
   Answer: C. Dividing dPi/da1 = 0 by L gives (1/2)qL + P = 6000 + 12000 = 18 000 N. (Key point: Equations)

4. What is the end displacement?
   A. 0.571 mm
   B. 2.286 mm
   C. 17.14 mm
   D. 1.714 mm
   Answer: D. u(L) = a1 L + a2 L^2 = 2.2857 - 0.5714 = 1.714 mm. (Key point: Result)

## Related in Finite Element Method

- [Ritz solution of beam under uniform load](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Aritz-simply-supported-beam) — Finite Element Method, chapter 4
- [Stepped bar under axial loads by FEM](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Astepped-bar-displacement-stress) — Finite Element Method, chapter 3
- [Tapered bar analysis using two elements](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Atapered-bar-two-elements) — Finite Element Method, chapter 5
- [Two-bar plane truss displacement and member forces](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Atwo-bar-truss-member-forces) — Finite Element Method, chapter 3
- [Rayleigh-Ritz method and its steps](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Aritz-method-steps) — Finite Element Method, chapter 4
- [Strong and weak form for an axial bar](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Astrong-weak-form-bar) — Finite Element Method, chapter 4

## Related in other subjects

- [Round bar fixed-free (effective length 2 m): buckling load](https://www.bctengineer.com/question.md?key=semester_3%2Fstrength_of_materials%3Around-bar-clamped-free-buckling-2m) — Strength of Materials, chapter 8, asked 2×
- [Round bar fixed-free: buckling load from lateral deflection](https://www.bctengineer.com/question.md?key=semester_3%2Fstrength_of_materials%3Around-bar-fixed-free-buckling-3m) — Strength of Materials, chapter 8, asked 2×
- [Friction pile length, 300 mm, 250 kN](https://www.bctengineer.com/question.md?key=semester_5%2Ffoundation_engineering%3Afriction-pile-300mm-250kn) — Foundation Engineering, chapter 8
- [Conjugate beam: free end of overhang, UDL and point load](https://www.bctengineer.com/question.md?key=semester_4%2Ftheory_of_structures_i%3Aconjugate-udl-10kn-4m-3m-2071b) — Theory of Structures I, chapter 4
