P = force at x
A = Cross sectional area
E = Young's Modulus.
is the mass of the element
= Mass per unit volume.
From equation (3) If AE is const
(4)