In the worst case setting, by using the remainder estimate of the Hermite interpolation, the optimal Hermite interpolation nodes for the approximation problem of the Sobolev spaces in maximal and mean norms, respectively, are determined. The method for calculating the best constants in the Wirtinger's inequality is given for functions whose Hermite data is vanished at Hermite interpolation nodes. First, a remainder estimate of the Hermite interpolation approximation error is given by using the method of constructing auxiliary function. After that, the calculation of the best constants in the Wirtinger's inequality is turned into an explicit integral expression, and two examples are used to illustrate the results. At the same time, in the worst case setting, the approximation error values of the Sobolev spaces by using Hermite interpolation are given, and the optimal Hermite interpolation nodes are found when the number of Hermite interpolation nodes is fixed. For some special cases, the explicit expression for the optimal interpolation nodes is given. For the general case, the calculation of the optimal interpolation nodes is reduced to finding the minimum point of some specific functions. Using Mathematical, the values of some optimal coefficients in the Wirtinger's inequality are obtained.