Analytical solution of temperature distribution in resistance spot welding