Failure analysis of mechanical and electrical components