## 3 Results and Discussion
### Elemental Composition, Density, Surface Area and Porosity

Table 2: Average elemental composition (and standard deviation) of the different tungsten oxide thin films obtained from EDX and the calculated (O:W)\({}_{\text{EDX}}\) ratios. Figure 4: Full scan **(a)**, range of W 4f **(b)** and range of O 1s **(c)** of an XPS spectrum measured at a WO\({}_{31}\)up600 thin film. From the peak areas of the O 1s spectra and the W 4f spectra, the O:W ratio at the surface (Table 3, (O:W)\({}_{\rm XPS}\)) was determined [52]. The values of (O:W)\({}_{\rm XPS}\) are higher than the (O:W)\({}_{\rm EDX}\) values (Table 2). The reason for this lies in the surface sensitivity of XPS as opposed to EDX [47] leading to a higher contribution of hydroxyl groups at the surface and therefore to higher values for (O:W)\({}_{\rm XPS}\). However, the trend of a decreasing (O:W)\({}_{\rm EDX}\) with PEG as precursor additive was confirmed by (O:W)\({}_{\rm XPS}\) (Table 3). In the films prepared with any of the additives but in particular for WO\({}_{31}\)up400 and WO\({}_{31}\)up600, a higher concentration of W\({}^{5+}\) was seen when compared to WO\({}_{31}\)comp (Table 4). Hence, as reported in [48], PEG can lead to porous films with more defects and, in particular, more oxygen vacancies, represented by the existence of W\({}^{5+}\) states. The C 1s signal seems to be dominated by adventitious carbon and no conclusion can be drawn about any residual polymer fragments since even for the WO\({}_{31}\)comp film prepared without any additives a larger amount of carbon was detected than for the WO\({}_{31}\)mp film (Table 3), for which residual carbon was apparent in the color and in EDX. Therefore, the amount of carbon detected by XPS cannot give any evidence for polymer fragments remaining in the films. During the stepwise etching with Ar\({}^{+}\), the amount of W\({}^{6+}\) states for all the films decreased while the amount of W\({}^{5+}\) states increased and subsequently even W\({}^{4+}\), and tungsten in even lower ionization states (W\({}^{\rm x+}\)) and metallic W\({}^{0}\) states arose indicating the stepwise reduction of WO\({}_{3}\) under Ar\({}^{+}\)-bombardment even up to metallic tungsten as shown in Figure S8. These observations are well in line with the results obtained for Ar\({}^{+}\) bombardment of WO\({}_{3}\) films prepared via thermal evaporation [49]. Film characteristics derived from wet chemical analysis and profilometry compared to those independently obtained from the analysis of ellipsometry are summarized in Table 5. \(\rho\) of the WO\({}_{31}\)comp films was found similar to that reported for bulk WO\({}_{3}\) (\(\rho_{WO_{3}}\) = 7.2 g cm\({}^{-3}\)[53]). By addition of PEG or PIB\({}_{50}\)-b-PEO\({}_{45}\) as structure-directing agents, \(\rho\) of the prepared films decreased, according to the strategy. The porosity \(P_{\rm chem}\) derived from microwave plasma atomic emission spectroscopy of the films dissolved in NH\({}_{3}\) solution increased according to the decreasing \(\rho\) of the films (Table 5). The porosity was independently calculated from the ellipsometry data, yielding \(P_{\rm E}\), which directly confirmed the range of porosity of the samples, but with a trend to slightly lower values than \(P_{\rm chem}\) (Table 5). For the ellipsometric analysis, the films were prepared on smooth silicon wafers as opposed to rough FTO substrates. Such difference and the fundamentally different method of analysis can well explain the small differences between \(d\) and \(d_{\rm E}\) and the small systematic \begin{table}
\begin{tabular}{c c c c} \hline
**Film Type** & **W5+(p)/\%** & **W5+(q)/\%** & **\(x\) at \(-\)1.0 V** \\ \hline WO\({}_{31}\)comp & 0.26 & 32.30 & 0.66 \\ WO\({}_{31}\)up400 & 1.42 & 37.50 & 0.62 \\ WO\({}_{31}\)up600 & 2.76 & 31.71 & 0.62 \\ WO\({}_{31}\)mp & 0.94 & 16.43 & 0.27 \\ WO\({}_{31}\)ump & 0.68 & 19.36 & 0.42 \\ \hline \end{tabular}
\end{table}