Discuss the theoretical basis of fracture mechanics in materials science, emphasizing how it predicts the propagation of cracks under varying loading conditions and its application in ensuring structural integrity and safety in engineering designs.