Differential equation for axial loading of a bar

In a previous section, we studied a linear elastic bar element where the normal force $N$, cross-sectional area $A$ and Young’s modulus were constant (no variation with $x$) according to the figure below.

from before, we have the relation:
E \, A \, \frac{\delta}{L}=E \, A \, \frac{u(L)-u(0)}{L} = N

We will now generalize the concept of a bar and derive the differential equation for a general bar.

Derivation of the bar equation

Let the bar have a varying Young’s modulus $E(x)$, cross-section $A(x)$ and a volume load $K_x(x)$ (unit [N/m$^3$]) according to the figure below.

Bar with varying cross-section $A(x)$, Young’s modulus and volume load $K_x(x)$.

Here, $K_x$ represents a load acting along the bar such as dead weight (gravitational load), centrifugal load or friction.

Now, we will derive the equations which determine how the internal normal force $N$ and displacement $u$ varies along the bar. To obtain these equations, we will combine equilibrium, constitutive relations and kinematics.


The dead weight is often neglected, since it is usually small compared to the loads. If dead weight should be considered in the exercises, this is most often indicated.


Study an infinitesimal volume element, of length $\Delta x$, loaded by a volume load $K_x=q_x$

Considering equilibrium of this volume element gives
\eqright N(x + \Dx) -N(x) + \int_{x}^{x+\Delta x} {K}_x \, {A} \, {\rm d} x = 0

When $\Dx$ is small, $K_x$ and $A$ can be assumed constant over the length $\Dx$ which gives
\eqright N(x + \Dx) -N(x) + K_x \, A \Delta x = 0

Divide by the length $\Dx$ and let $\Dx \rightarrow 0$
\lim_{\Dx \rightarrow 0} \frac{ N(x + \Dx) – N(x) }{\Dx} + {K}_x \, {A}
= \od{N(x)}{x} + K_x(x) A(x) = 0

We summarize the equilibrium equation as
N’ + K_x \, A = 0

One always assumes the normal force is directed away from the section (i.e. positive in the normal direction).

Material relation

Assume a linear-elastic material behavior, so Hooke’s law is valid, $\sigma(x) = E(x) \eps(x)$. Then the normal force can be expressed as
N(x) = \sig(x) \, A(x) = E(x) \, A(x) \, \eps(x)

Equation of compatability

Recall the definition of normal-strain
\eps(x) = \od{ u(x) }{x} = u’

Combine equilibrium, the material relation and the compatibility equation accordingly
\od{N}{x} + K_x A = \od{}{x} \big( EA \eps \big) + K_x A
= \od{}{x} \left( EA \od{u}{x}\right) + K_x A = 0
We summarize as

The bar equation

$$\od{}{x}\left( E \, A \, \od{u}{x}\right) + K_x \, A = 0$$

  • $u(x)$ – Axial displacement [m]
  • $E$ – Young’s modulus [Pa]
  • $A$ – Cross-sectional area [m^2]
  • $K_x$ – Volume load [N/m^3]

This is a second order differential equation, and two boundary conditions are necessary to solve it. The two most common types of boundary conditions are:

  • The displacement is given: $u = \bar{u}$
  • The normal force is given: $N = \bar{N}$

Special case of the bar equation

If $E$ and $A$ are constant along the bar (most common case), the differential equation simplifies to
-u^{\prime \prime} = \frac{K_x}{E}

and we can integrate to get the displacement:
u(x)=-\int \int \frac{K_x}{E} \, {\rm d} x+c_1 \, x +c_2

where $c_1$ and $c_2$ are integration constants shich are determined from boundary conditions
The simplest case is when $K_x=0$ (also common) which then gives

$$u(x) = c_1 x + c_2$$

Here the strain, $\eps = u’ = c_1$, becomes constant and can be determined as
\eps = \frac{u(L) – u(0)}{L}=\frac{\delta}{L}
with the deformation $\delta$. This is an important result which we highlight:

Normal strain

For a bar with constant $EA$ och $K_x=0$ the strain can be determined as

$$\eps = \frac{u(L) – u(0)}{L}=\frac{\delta}{L}$$




Determine the displacement field $u(x)$ for a clamped bar with constant $EA$ loaded by a point load $P$ in the free end.


Using the bar equation with $EA$ constant and $K_x=0$ the displacement field is obtained as $u(x)=c_1 \, x+c_2$, according to Equation @eq:stång-u-konstant-ea.

Boundary conditions determine the integration constants:

The displacement at the support is zero and an equation of equilibrium at around the free edge gives that the normal force is equal to $P$, we get:
u(0)=0 \; \Rightarrow \quad c_2=0 \\
N(L)=P \; \Rightarrow \quad E \, A \, u'(L)=P \quad \\
\Rightarrow \quad E \, A \,c_1=P
such that the displacement field becomes:
u(x)=\frac{P}{E\, A} \, x



Study a clamped bar, with constant Young’s modulus $E$, constant cross-sectional area $A$, length $L$ and density$\rho$. The bar is only loaded by its self-weight.


The bar equation for constant $EA$:
-(EAu’)’ = K_x A \qquad \Rightarrow \qquad
u” = -\frac{K_x}{E}

In this case, we have a volume load $K_x$ which is determined as:
K_x = \frac{\overbrace{m g}^{\text{total force}} }{V} = \frac{\rho V g}{V} = \rho g
where $m$ is the mass of the bar and $V$ is the volume. Thus, at every section we have the volume load $\rho g$.

We can now integrate the bar equation twice:
&\gives u^{\prime \prime} = -\frac{\rho g}{E} \\
&\gives u’ = -\frac{\rho g}{E} x + c_1 \\
&\gives u = -\frac{\rho g}{E} \frac{x^2}{2} + c_1 x + c_2

The integration constants are determined by boundary conditions:

  • $u(0)=0 \; \Rightarrow \quad c_2=0$
  • $N(L)=0\; \Rightarrow \quad E\, A \, u'(L)=0 \; \Rightarrow \quad E\, A \, \left(-\frac{\rho g}{E} L + c_1 \right)=0$

thereby, the displacement field becomes
u(x) = -\frac{\rho g}{E} \frac{x^2}{2} + \frac{\rho g L}{E} x
= \frac{\rho g}{E}\left( Lx – \frac{x^2}{2} \right)

In particular, the free-end displacement becomes: $u(L) = \frac{\rho g}{E}(L^2 – L^2/2) = \frac{\rho g L^2}{2E} $ and the normal stress is determined as $\sig = E \eps = E u’ = \rho g (L-x)$.


  • The strain varies linearly along the bar
  • The largest stress is obtained at the support while the stress is zero at the free end. This is because the section at the support carries the whole weight of the bar while the section at the free end does not carry any load.
  • Below are graphs showing the displacement field and stress distribution along the bar:


Leave a Reply