We study a dynamic fourth-order Euler-Bernoulli partial differential equation having a constant elastic modulus and area moment of inertia, a variable lineal mass density g(x), and the applied load denoted by f(u), a function of transverse displacement u(t,x). The complete Lie group classification is obtained for different forms of the variable lineal mass density g(x) and applied load f(u). The equivalence transformations are constructed to simplify the determining equations for the symmetries. The principal algebra is one-dimensional and it extends to two- and three-dimensional algebras for an arbitrary applied load, general power-law, exponential, and log type of applied loads for different forms of g(x). For the linear applied load case, we obtain an infinite-dimensional Lie algebra. We recover the Lie symmetry classification results discussed in the literature when g(x) is constant with variable applied load f(u). For the general power-law and exponential case the group invariant solutions are derived. The similarity transformations reduce the fourth-order partial differential equation to a fourth-order ordinary differential equation. For the power-law applied load case a compatible initial-boundary value problem for the clamped and free end beam cases is formulated. We deduce the fourth-order ordinary differential equation with appropriate initial and boundary conditions.