# Direct integration of a beam

Direct integration is a structural analysis method for measuring internal shear, internal moment, rotation, and deflection of a beam.
For a beam with an applied weight $w(x)$, taking downward to be positive, the internal shear force is given by taking the negative integral of the weight:
    $V(x)=-\int w(x)\,dx$
The internal moment $M(x)$ is the integral of the internal shear:
    $M(x)=\int V(x)\,dx$ = $-\int \left[\int w(x)\,dx\right]dx$
The angle of rotation from the horizontal, $\theta$, is the integral of the internal moment divided by the product of the Young's modulus and the area moment of inertia:
    $\theta (x)={\frac {1}{EI}}\int M(x)\,dx$
Integrating the angle of rotation obtains the vertical displacement $\nu$:
    $\nu (x)=\int \theta (x)\,dx$

## Integrating

Each time an integration is carried out, a constant of integration needs to be obtained. These constants are determined by using either the forces at supports, or at free ends.
    For internal shear and moment, the constants can be found by analyzing the beam's free body diagram.
    For rotation and displacement, the constants are found using conditions dependent on the type of supports. For a cantilever beam, the fixed support has zero rotation and zero displacement. For a beam supported by a pin and roller, both the supports have zero displacement.

## Sample calculations

Take the beam shown at right supported by a fixed pin at the left and a roller at the right. There are no applied moments, the weight is a constant 10 kN, and - due to symmetry - each support applies a 75 kN vertical force to the beam. Taking x as the distance from the pin,
    $w(x)=10~{\textrm {kN}}/{\textrm {m}}$
Integrating,
    $V(x)=-\int w(x)\,dx=-10x+C_{1}({\textrm {kN}})$
where $C_{1}$ represents the applied loads. For these calculations, the only load having an effect on the beam is the 75 kN load applied by the pin, applied at x=0, giving
    $V(x)=-10x+75({\textrm {kN}})$
Integrating the internal shear,
    $M(x)=\int V(x)\,dx=-5x^{2}+75x({\textrm {kN}}\cdot {\textrm {m}})$ where, because there is no applied moment, $C_{2}=0$.
Assuming an EI value of 1 kN$\cdot$m$\cdot$m (for simplicity, real EI values for structural members such as steel are normally greater by powers of ten)
    $\theta (x)=\int {\frac {M(x)}{EI}}\,dx=-{\frac {5}{3}}x^{3}+{\frac {75}{2}}x^{2}+C_{3}({\textrm {m}}/{\textrm {m}})$* and
    $\nu (x)=\int \theta (x)\,dx=-{\frac {5}{12}}x^{4}+{\frac {75}{6}}x^{3}+C_{3}x+C_{4}({\textrm {m}})$
Because of the vertical supports at each end of the beam, the displacement ($\nu$) at x = 0 and x = 15m is zero. Substituting (x = 0, ν(0) = 0) and (x = 15m, ν(15m) = 0), we can solve for constants $C_{3}$=-1406.25 and $C_{4}$=0, yielding
    $\theta (x)=\int {\frac {M(x)}{EI}}\,dx=-{\frac {5}{3}}x^{3}+{\frac {75}{2}}x^{2}-1406.25({\textrm {m}}/{\textrm {m}})$ and
    $\nu (x)=\int \theta (x)\,dx=-{\frac {5}{12}}x^{4}+{\frac {75}{6}}x^{3}-1406.25x({\textrm {m}})$
For the given EI value, the maximum displacement, at x=7.5m, is approximately 440 times the length of the beam. For a more realistic situation, such as a uniform load of 1 kN and an EI value of 5,000 kN·m², the displacement would be approximately 13 cm.
* Note that for the rotation $\theta$ the units are meters divided by meters (or any other units of length which reduce to unity). This is because rotation is given as a slope, the vertical displacement divided by the horizontal change.