Describe the process of stress analysis in mechanical components and structures. Discuss the methods used to determine stress concentrations, factor of safety, and failure criteria under different loading conditions.