1 Introduction

The pollutants of emerging concern (PECs) continue to pose a threat to the quality of water as they are continuously detected in surface and groundwater [1, 2]. Hence, there is an urgent need to develop a technology that is efficient and sustainable to remove these PECs from the environment. A multimodal photocatalytic technique is a method that uses solar energy to break down organic contaminants in both air and aqueous mediums, making it a viable cluster of technologies for environmental rehabilitation [3]. The multimodal photocatalytic process has various advantages over conventional techniques of eliminating organic contaminants, including the use of renewable energy and increased efficiency [4]. However, limitations to their practical uses include the high photo-excited charge carrier recombination rate and low solar energy conversion efficiency caused by a broadband gap [5]. Consequently, it is important to prepare a high-performing photocatalyst that will improve the effectiveness of electron–hole pair separation and transportation as well as enhance the characteristics of light absorption [6]. Because WO3 nanoparticles doped with Ti3C2, MXene, and β-cyclodextrin have the potential to adsorb organic pollutants in water as photocatalysts, they will be used in this study. The characterization techniques support that claim.

Due to their unique properties, two-dimensional materials have been explored as photocatalysts for more than a decade[7, 8]. Tungsten oxide (WO3) is an n-type semiconductor with an energy band gap of about 2.8 eV and can be excited by photon energy demonstrating visible light excitement [9]. Properties that include stability, physicochemical behavior, and nontoxicity make tungsten trioxide appropriate for use as a photocatalyst material. However, the significant recombination of photo-generated charge carriers and wide band gap is mostly to blame for the low photocatalytic activities of WO3 [10]. As a result, numerous techniques have been investigated to increase the activity of WO3, including doping, defect engineering, and heterojunction [9, 11, 12]. Additionally, co-catalyst loading is also an effective method to enhance photoelectrochemical (PEC) properties arising from enhancing the Schottky junction’s charge separation effect at the interface [13]. Noble metals like ruthenium (Ru) and platinum (Pt) are effective for photocatalysis, but their high cost and extreme rarity prevent their widespread use [14]. Investigating a highly active co-catalyst and a metal-free alternative is crucial for obtaining highly successful wastewater treatment.

MXenes, a recently emerging family of 2D transition nitrides or carbides, are known for their excellent metallic electrical conductivity and large surface area [15]. Unlike conventional metallic materials, 2D Ti3C2 MXenes’ superior electron conductivity and structural stability have drawn researchers’ attention [16]. Additionally, the introduction of functional groups during preparation might make it easier to tune their work function (φ), which would facilitate more electrons on the surface [11]. These properties of MXene piqued the interest of many researchers, who wanted to investigate MXene as a co-catalyst in photocatalysis to improve the photoelectrochemical properties of the doped semiconductor [6, 17, 18].

Cyclodextrins (CD) are cyclic oligosaccharides consisting of glucose linked together by starch [19]. They can interact with different molecules to create host–guest inclusion complexes because they have a hydrophilic outside surface and a hydrophobic interior cavity [20]. They easily host a guest molecule through the hydrophobic cavity, improving the physical and chemical properties of the guest molecule. Furthermore, the well-known cyclodextrins are α-, β-, and γ-cyclodextrins, with each having 6–8 glucopyranose units [21].

In this study, a novel multifunctional WO3-Ti3C2@β-CD nanocomposite with different loading percentages of Ti3C2 MXene was prepared by forming an inclusion complex between β-CD and WO3-Ti3C2 heterostructure through HMDI bifunctional linker. Furthermore, using a low bang gap WO3 and modifying it with a highly conductive Ti3C2 MXene to enhance the charge separation efficiency was crucial for this study. The formed WO3-Ti3C2 heterostructure exhibits large contact interfaces, allowing the heterostructure to illustrate superior photocatalytic properties. In addition, the hydrophilic nature of the β-CD is essential for high adsorption studies. Hence linking the heterostructure with β-CD will create a novel WO3@Ti3C2 MXene@β-CD nanocomposite that is both adsorptive and photocatalytic toward the degradation of organic pollutants such as oseltamivir in water.

2 Experimental details

2.1 Reagents

All the reagents employed were used with no further purification. These include tungsten boride (WB) powder (≥ 97.0%, Sigma-Aldrich Co.), nitric acid (HNO3) (\(\ge\) 65% purists, Sigma-Aldrich), hydrofluoric acid (HF, content \(\ge\) 48.0%), hydrochloric acid (HCl, content \(\ge\) 32%), dimethyl sulfoxide (DMSO) (≥ 99.9%, Sigma-Aldrich Co.), and Ti3AlC2 powder (purity > 99%, 400 mesh) which were purchased from Sigma Aldrich Co.

2.2 Synthesis

2.2.1 Preparation of WO3 nanoparticles

Tungsten trioxide (WO3) powder was synthesized hydrothermally in a method described by Thwala et al. [3]. Typically, 1 g of tungsten boride (WB) is dispersed in 1 M HNO3 (60 ml) solution and ultrasonicated for 5 min to form a homogeneous suspension. The homogeneous mixture was deposited into a 100-ml Teflon-lined autoclave and heated at 180 °C for 18 h. The resultant precipitate was centrifuged at 3500 rpm, and the dissolvable ionic contaminants were removed by repeated washing with ultrapure water. The yellow precipitate was oven-dried at 80° for 12 h.

2.2.2 Synthesis of Ti3C2 MXene nanosheets

Ti3C2 MXene was synthesized by etching out aluminum layers from Ti3AlC2 using concentrated HF acid in a method described by Sun et al. [22]. About, 1 g of Ti3AlC2 MAX phase was dispersed in a 48 wt% HF (20 ml) solution in a 100-ml plastic beaker. The mixture was stirred for 26 h at room temperature to completely remove the aluminum layers. The pH of the black precipitate was adjusted to almost neutral 7 by centrifuging it numerous times with deionized water [23]. The resulting suspension of Ti3C2 nanosheets was sonicated for 6 h, followed by centrifugation for 20 min at 3500 rpm. Additionally, the black powder was vacuum dried for 12 h at 60 °C. The resulting Ti3C2 powder was delaminated using dimethyl sulfoxide (20 ml) and stirred at RT for 20 h, followed by centrifugation at 3500 rpm for 5 min to remove the un-delaminated flakes. The resulting supernatant was dispersed in DI water and sonicated for 6 h followed by centrifuging to remove unexfoliated particles for 30 min at 3500 rpm. Finally, the suspension was oven-dried at 70 \(\mathrm{^\circ{\rm C} }\) for 24 h to obtain Ti3C2 nanosheets.

2.2.3 Preparation of WO3-Ti3C2 heterostructure

A heterostructure of WO3-Ti3C2 was synthesized hydrothermally. Where 0.5 g of WB was dissolved in HNO3 (55 ml) solution and ultrasonicated for 5 min to form a homogeneous mixture. Varied amounts of functionalized Ti3C2 nanosheets (1%, 3%, and 5% m/m) were dispersed in 5 ml HNO3 and gradually added to the tungsten boride solution, then further sonicated for 5 min. The mixture was deposited into a 100-ml autoclave and heated in an oven at 180 \(^\circ{\rm C}\) for 18 h. The resultant yellow-gray precipitate was collected, centrifuged at 3500 rpm, and washed numerous times with ultrapure water. The WO3-Ti3C2 product was oven-dried for 24 h at 80 °C.

2.2.4 Preparation of WO3-Ti3C2 MXene@β-cyclodextrin nanocomposite

Salipira et al. [24] described the polymerization of β-cyclodextrin with WO3-Ti3C2 composite. Under magnetic stirring, about 2.0 g of β-cyclodextrin was dispersed in 20 ml of N, N-dimethyl formamide (DMF), and WO3-Ti3C2 dispersed in 4 ml of DMF was gradually added. The mixture was placed into a 250-ml round bottom flask and heated at 70 °C in an oil bath, and then the bifunctional linker, hexamethylene diisocyanate, was added drop-by-drop (2 ml). The shape of the resulting nanocomposite may be changed by carefully controlling the addition of the bifunctional linker; hence, the standard addition rate of 2 ml min−1 was set. The reaction was agitated at 70 °C for 24 h in an argon atmosphere.

To monitor the reaction, FTIR analysis was used to observe the reduction in the intensity of the isocyanate peak at about 2273 cm−1. Upon completion of the reaction (24-h period), the nanocomposite was precipitated and washed several times with acetone, followed by vacuum filtration and oven-dried at 60 \(^\circ{\rm C}\) for 24 h.

2.3 Characterization techniques

The structural analysis of the prepared nanomaterials was obtained with the use of X’Pert Phillips X-ray powder diffraction (XRD) with a working voltage of 40 kV and current of 40 mA using Ni-filtered CuKα radiation, respectively, and Raman spectroscopy using Micro 200 Perkin Elmer working at a wavelength of 532 nm and laser power output of 8.0 mW. Identification of functional groups present on the prepared nanomaterials was conducted using Fourier transform infrared spectrometer (FT-IR) on the Bruker Alpha model using KBr as a reference. The microstructural characteristics and morphology of the nanomaterial were investigated using transmission electron microscopy (TEM) and scanning electron microscopy (SEM) using JOEL-JEM and TESCAN Vega TC equipped with energy dispersive X-ray spectroscopy (EDS) with the voltage set to 20 kV. The selected area diffraction (SAED) acquired using TEM facilitated the caption of diffraction patterns at a magnification of 25 k. The chemical and electronic state was obtained from a Thermo X-ray photoelectron spectroscopy (ESCAlab 250 Xi) coupled with a monochromator AlKα of 1486.7 eV. The optical properties of the prepared photocatalysts were studied using ultraviolet–visible diffuse reflectance spectroscopy (UV–vis DRS) on a Shimadzu UV-2550. The photoinduced charge recombination rate of the prepared photocataly was evaluated using photoluminescence spectroscopy (PL) on an LS 45 fluorescence spectroscopy (Perkin Elmer, precisely, South Africa, λexcitation = 320 nm). The pore volume and specific surface area were studied using Brunauer- Emmett-Teller (BET) analysis on Micrometric TriStar II plus surface area and porosity analyzer.

2.4 Photoelectrochemical analysis

Photoelectrochemical (PEC) studies were conducted on an Autolab PGSTAT204 (Netherlands) using a standard three-electrode workstation with a reference electrode (silver/silver chloride, Ag/AgCl); counter electrode used was a platinum (Pt) wire, and the working electrode being a prepared photocatalyst containing electrode. The working electrode was prepared by coating the photocatalyst on a fluorine dope titanium dioxide (FTO) glass. The working electrode was prepared by mixing the photocatalyst with Nafion and N-methyl pyrrolidone (NMP) to form an adhesive paste. The formed paste was then uniformly pasted on the surface of fluorine-doped titanium oxide (FTO) glass and dried at 200 °C for 5 min, followed by room temperature for 12 h. The electrolyte solution was prepared by dissolving Na2SO4 (1.42 g, 10.0 mmol) in 100 mL deionized water to get 0.1 M Na2SO4 concentration. The experiment was conducted in a dark room, while visible light was irradiated onto the working electrode inside an electrolyte. The charge resistance was analyzed using electrochemical impedance spectroscopy (EIS) analyzer (frequency response analyzer (FRA) impedance potentiostat software with the applied voltage of 0.25 V and current set between 100 mA and 100 nA. The frequency range was set between 100 kHz and 0.1 Hz range with alternating current (AC) amplitude at open circuit potential irradiating using a 100-W Xe lamp. Photocurrent response was measured to assess the charge separation efficiency of the prepared photocatalyst, using chrono amperometry (\(\Delta t>1 mV)\) with the voltage set to 1.2 V which was obtained from linear sweep voltammetry potentiostat. Mott Schottky (MS) plots were obtained using the same conditions as EIS at a frequency of 1000 Hz.

2.5 Optimization and photocatalytic parameters

The photocatalytic efficiency of the prepared photocatalysts in photodegrading oseltamivir in water was investigated. Optimization studies were carried out in a photoreactor by monitoring three parameters: pollutant (oseltamivir) concentration, working pH, and the effect of catalyst loading. The setup consists of a 250-W Xe lamp, a temperature-controlled water bath, a lamp jacket, and a UV–vis lamp power controller. For all the degradation experiments, different amounts (5 mg, 10 mg, 15 mg, 20 mg, and 25 mg) of the photocatalyst were added into a 250 mL solution of varied oseltamivir phosphate concentrations. The optimal conditions for the photodegradation of oseltamivir are pH 3 and catalyst loading of 25 mg 5%WO3-Ti3C2@β-CD, and a pollutant concentration of 5 mg/L. The pH of the solution was adjusted using 1 HCl and 1 M NaOH. The solution was stirred in a dark for an hour for adsorption–desorption. After reaching adsorption–desorption equilibrium, the suspension was further irradiated for an hour, and approximately 2 mL was sampled and filtered with a 0.22-m PTFE membrane filter at 10-min intervals for an hour. The concentration of oseltamivir was determined using UV–vis spectrophotometer at a wavelength of 220 nm. The removal efficiency of oseltamivir was computed by use of Eq. 1.

$$\mathrm{\%\;Oseltamivir\;removal }= (1-\frac{[\mathrm{oseltamivir}]}{[\mathrm{oseltamivir}{]}_{0}})\times 100$$
(1)

where, \({[\mathrm{oseltamivir}]}_{0}\)= initial oseltamivir concentration and \([\mathrm{oseltamivir}]\)= final oseltamivir phosphate concentration.Using the abovementioned ideal experimental conditions in water, the photocatalytic effectiveness of the as-synthesized nanomaterials toward the degradation of oseltamivir was measured. Mass spectrometry and liquid chromatography were used to monitor the decrease in oseltamivir concentration caused by photocatalytic degradation.

The degradation of oseltamivir was monitored using a liquid chromatograph mass spectrometer (Shimadzu, LCMS-8040). A phenomenex kinetex XB-C18 column (100 mm × 4.60 mm, 5-μm particle size) was used at a flow rate of 0.30 mL/min through the gradient flow of 50% acetonitrile + 50% deionized water. The mass spectrometry was operated in positive ion mode at an M/Z of 50 – 450.

3 Results and discussion

3.1 Crystal phase and structural analyses

The structural characteristics and crystal phases of the as-prepared materials were examined using XRD and Raman spectroscopy, respectively. The diffraction patterns of the nanomaterial are shown in Fig. 1. Illustrated in Fig. 1a (i–ii), are the XRD diffraction patterns of the Ti3AlC2 MAX phase and the corresponding Ti3C2 MXene (Fig. 1a (ii)). The diffraction patterns at 19° and 39° which correspond to (004) and (104) crystal planes, respectively, are in accordance with the previously reported Ti3AlC2 MAX phase [25, 26]. After etching treatment with HF and delamination with DMSO, the diffraction peak of the Ti3AlC2 MAX phase at 39° which corresponds to a (104) plane, disappeared, suggesting a successful removal of the aluminum layer resulting in Ti3C2 MXene as outlined in Fig. 1a (ii). Furthermore, it is noteworthy that after etching the alluminum layer, the crystal planes (002) and (004) shifted to lower angles, indicating that the weak bonds in Ti3AlC2 were successfully removed, resulting in Ti3C2 MXene. The observed changes in the characteristic peaks indicate the disruption of Ti–Al bonds and an increased c-Lattice parameter (c-LP) denoting a successful formation of Ti3C2 MXene-layered structure [27, 28].

Fig. 1
figure 1

(a) XRD patterns of (i)Ti3AlC2 MAX phase and (ii) Ti3C2 MXene. (b) XRD patterns of (i) Ti3C2 MXene, (ii) WO3, (iii) WO3-Ti3C2 heterostructure, and (iv) WO3-Ti3C2@β-CD nanocomposite

Figure 1 b (i–iv) depicts the XRD patterns of Ti3C2 MXene, pristine WO3 nanoparticles, 5% WO3-Ti3C2 heterostructure, and 5% WO3-Ti3C2@ β-CD. All peaks assigned to WO3 (Fig. 1a (ii)) are ascribed to the crystalline monoclinic phase as evidenced by the (JPCD No. 04–007-2425 card). Due to the low loading content of the Ti3C2 MXene in the heterostructure, no notable characteristic patterns were observed. Ti3C2 MXene’s good dispersion on the heterostructure can be seen by the fact that its presence had no discernible effects on the crystal structure of WO3. In the WO3-Ti3C2 MXene@β-CD composite, a characteristic peak of Ti3C2 MXene (004) and WO3 was present, indicating successful interfacial interaction and host–guest interaction with beta-cyclodextrin. Due to the low amount of Ti3C2 in the nanocomposites, the (002) plane was not visible. However, the c-lattice parameter increased in the 5% WO3-Ti3C2@ β-CD nanocomposite due to the presence of Ti3C2 MXene and β-cyclodextrin on the surface of WO3.

The Raman spectra of WO3, Ti3AlC2, Ti3C2, WO3-Ti3C2 heterostructure, and WO3-Ti3C2@β-CD nanocomposite are shown in Fig. 2. The Ti3AlC2 MAX phase (Fig. 2 a(i)) depicts three phonon peaks located at 477, 1090, and 1718 cm−1, respectively. These peaks are important characteristics of Ti3AlC2, and they match those reported in the literature that is attributed to the longitudinal and shear oscillations of Ti, C, and Al [29]. Specifically, ω3 is linked to the vibration of aluminum, and its removal from the spectra of Ti3C2 MXene correlates with the significant etching of the Al layer that produces the Ti3C2 MXene structure (Fig. 1b (ii)). While the ω1 at 477 cm−1 also known as A1g is due to symmetrical out-of-plane vibration of Ti and C atoms, while the peak ω2 (Eg) at 1090 cm−1 is arising from the in-plane modes of Ti and C. In Ti3C2 MXene, the broadening of peaks coincides with the loss of order due to the etching process, also shown by XRD. Additionally, two peaks are observed at 1800 cm−1 and 2500 cm−1 that result from D-band and G-band, respectively. The disappearance of the D-band and the intensification of the G-band signify that the crystalline phase of Ti3C2 was not distorted during the etching process.

Fig. 2
figure 2

(a) Raman bands of (i) Ti3AlC2 MAX phase and (ii) Ti3C2 MXene. (b) Raman bands of (i) WO3 nanoparticles, (ii) Ti3C2 MXene, (iii) WO3-Ti3C2 heterostructure, and (iv) WO3-Ti3C2@β-CD nanocomposite

Figure 2 b (i–iv) exhibits Raman bands of pristine WO3, Ti3C2 MXene, 5% WO3-Ti3C2 heterostructure, and 5% WO3-Ti3C2@β-CD. The bands depicted in Fig. 2b (i) at 130, 275, 710, and 820 cm−1 are attributed to the monoclinic phase of tungsten oxide nanoparticles, as confirmed by the XRD. Lower bands at 130 cm−1 and 275 cm−1 are produced by the O-W–O bending modes, whereas the Raman bands at 710 cm−1 and 820 cm−1 are attributable to the W–O-W stretching vibration mode [30]. The WO3-Ti3C2 heterostructure shows a single Raman band at 275 cm−1 which is ascribed to W–O-W bending of the WO3 in the composite, and two distinct Raman bands at 710 cm−1 and 820 cm−1 which are due to W–O-W stretching of the WO3 in the composite, as well as the G band mode from Ti3C2 MXene. The intensity of the peaks increases after polymerizing the WO3-Ti3C2 heterostructure with β-cyclodextrin to form the nanocomposite. Notably, there was a shifting of vibration bands to higher wavelengths as a result of the presence of Ti3C2 MXene in the nanocomposite. Also, the polymerization reaction and the introduction of β-CD did not change the crystalline structure of our pristine material upon the formation of the composite, which further confirms the interfacial interaction as well as the creation of an inclusion complex between WO3, Ti3C2, and β-CD. The Raman intensity ratio of the D and G bands (ID/IG ratio) is used to estimate the defects/crystallinity ratio for graphene-based samples, where a lower ratio ensures more crystalline graphene. The calculated ID/IG ratios of 5% WO3-Ti3C2 heterostructure, and 5% WO3-Ti3C2@β-CD nanocomposite are 0.92 and 0.84, respectively.

Figures 3 and S1 show functional group identification for WO3, Ti3AlC2, Ti3C2, 5% WO3-Ti3C2 heterostructure, and 5% WO3-Ti3C2@-CD nanocomposite. Ti3AlC2 MAX phase (Fig. S1(i)) shows a well-defined characteristic peak of Ti-C stretching vibration and absorbed moisture (OH) at 760 cm−1 and 3500 cm−1, respectively. After etching out the aluminum layer, terminal groups were introduced on the surface of the MXene (Fig. S1 (ii)). Two characteristic peaks were observed at 2917 cm−1 and 1103 cm−1 which are due to C-H vibrations and C-F stretching vibrations, respectively [31]. The C-H peak is greater than the Ti3AlC2 MAX phase peak, indicating that OH termination was introduced during the HF acid etching process. According to Fig. 3a (i), the characteristic peaks of WO3 nanoparticles are observed at 1600 cm−1 and 800 cm−1 resulting from W–O bending and O-W–O stretching, respectively. Furthermore, in the WO3-Ti3C2 heterostructure (Fig. 3a (iii)), the W-OH and O-W–O characteristic peaks have muffled intensity due to the presence of Ti3C2 MXene, which brings changes in the structure of the heterostructure. The WO3-Ti3C2@ β-CD nanocomposite (Fig. 3a (iv)) indicates peaks, such as the C-H group that emanates from the Ti3C2 MXene terminations, and the O-W–O stretching vibration from WO3 nanoparticles. The polymerization of the WO3-Ti3C2 heterostructure and β-cyclodextrin resulted in the presence of the carbonyl group (C = O) at 1634 cm−1 and a C-H stretch at 2932 cm−1.

Fig. 3
figure 3

(a) FTIR spectra of (i) Pristine WO3 nanoparticles, (ii) Ti3C2 MXene, (iii) WO3-Ti3C2 heterostructure, and (iv) WO3-Ti3C2@β-CD nanocomposite. (b) Demonstration of the disappearance of the Isocyanate peak during the polymerization of WO3-Ti3C2@β-CD nanocomposite

In the presence of β-cyclodextrin, the reaction between hexamethylene diisocyanate (bifunctional linker) and WO3-Ti3C2 heterostructure was monitored using IR spectroscopy, as shown in Fig. 3(b). The isocyanate peak at 2273 cm−1 gradually disappeared over the course of 24 h, indicating that the WO3-Ti3C2 heterostructure polymerized with β-cyclodextrin to form the WO3-Ti3C2@-CD nanocomposite.

3.2 Morphological characteristics

The shape and microstructure characteristics of Ti3AlC2, Ti3C2, WO3, 5% WO3-Ti3C2, and 5% WO3-Ti3C2@β-CD nanocomposite were investigated using TEM, SEM, and SAED in Figs. 4 and 5, respectively. The Ti3AlC2 MAX phase in Fig. 4(a) shows edges with stacked flakes (insert, show the SAED mapping of the Ti3AlC2 MAX phase, confirming the crystal phases of the Ti3AlC2 as confirmed by XRD). Figure 4 (b) Ti3C2 MXene shows an ultrathin 2D transparent layered structure with slight distortions at the edges resulting from the removal of the aluminum layer [32]. SAED (insert) is showing the crystal planes of the 2D Ti3C2 with the most significant (002) and (006) crystal planes. Pristine WO3 has 2D rectangular shape-like structures (Fig. 4(c)) [33]. SAED insert, which was also used to index the crystal planes (002), (220), and (112) corresponding to the monoclinic phase of WO3. The WO3-Ti3C2 heterostructure in Fig. 4 (d), demonstrates that the WO3 rectangular shape particles have uniformly adhered to the surface of Ti3C2 nanosheets. SAED analyses also confirm the crystal planes (002), (112) of the monoclinic WO3, and (110) of the Ti3C2 which indicate the interfacial contact between WO3 and Ti3C2.

Fig. 4
figure 4

TEM and corresponding SAED patterns for (a) Ti3AlC2 MAX, (b) Ti3C2 MXene, (c) WO3, (d) WO3-Ti3C2 heterostructure, and (e) WO3-Ti3C2@β-CD nanocomposite

Fig. 5
figure 5

SEM images with EDX mapping of (a) Ti3AlC2 MAX phase, (b)Ti3C2 MXene, (c) WO3 nanoparticles, (d) WO3-Ti3C2 heterostructure, and (e) WO3-Ti3C2-β-CD nanocomposite

After polymerization of the WO3-Ti3C2@-CD nanocomposite, Fig. 4(e) shows 2D rectangular WO3 on the surface of the Ti3C2 MXene 2D nanosheet, confirming the successful formation of a multifunctional photocatalytic system between the WO3-Ti3C2 heterostructure and β-CD, while SAED confirms (222), (202), and (020) crystal planes from WO3 nanoparticles and (002) due to the presence of Ti3C2 MXene in the composite. This indicates that the link between the WO3-Ti3C2 heterostructure and β-cyclodextrin was successfully formed via the terminal groups.

The SEM image of the Ti3AlC2 MAX phase presents multiple layers that are tightly stacked together (Fig. 5(a)). After etching treatment with HF, Ti3C2 exhibits 2D nanosheets of different sizes, indicating successful removal of the aluminum layer as well as separation of the nanosheet using DMSO, as indicated in Fig. 5(b).

SEM images of pristine WO3 nanoparticles exhibit a rectangular-like morphology. Furthermore, EDS was used to verify the elementary components of tungsten oxide (W and O). In Fig. 5(d), the 2D WO3 nanoparticles are finely disseminated over the multilayer Ti3C2 nanosheets, as demonstrated by the WO3-Ti3C2 heterostructure.

The morphology of the WO3-Ti3C2@-CD nanocomposite is shown in Fig. 5(e), which clearly shows that WO3 nanoparticles are fabricated over conductive Ti3C2 nanosheets via interfacial interactions between the WO3-Ti3C2 heterostructure and β-cyclodextrin, which may effectively increase the surface area as confirmed by BET. The EDS analyses showed the elemental composition of the WO3-Ti3C2@β-CD nanocomposite, which is C, O, Ti, and W, as well as a small amount of gold (Au). Titanium and carbon are detected in the chemical composition of Ti3C2 nanosheets, while tungsten and oxygen emanate from the elementary composition of WO3 nanoparticles. The presence of gold is from coating the samples for better imagery.

3.3 Chemical states

Using XPS, the chemical composition and oxidation states of the prepared nanomaterials were examined (Fig. 6). The survey spectra of Ti3AlC2 MAX phase, Ti3C2 MXene, WO3 nanoparticles, and a 5% WO3-Ti3C2 heterostructure are displayed in Fig. 6(a) presenting Ti, C, W, O, and Al elements. The F element was observed on the Ti3C2 MXene resulting from etching the Al layer with HF acid. The W 4f high-resolution spectra of WO3 and 5% WO3-Ti3C2 are shown in Fig. 6(b). The binding energies of WO3 nanoparticles are 35.7 eV and 37.9 eV, which correspond to the W 4f7/2 and W 4f5/2 core levels of W6+, respectively. In the WO3-Ti3C2 heterostructure, a slight shift toward lower binding energy (about 0.2 eV) is seen in comparison to pristine WO3 nanoparticles. Ti3C2 (Fig. 6(c)) is deconvoluted into three subpeaks with binding energies of 282.3, 284.8, and 286.5 eV, which are assigned to the Ti–C, C–C, and C–O bonds, respectively. Due to the low loading content of Ti3C2 MXene, no signals for Ti–C are detected in the WO3-Ti3C2 heterostructure. Figure 6 (d) exhibits a deconvoluted XPS spectrum of the O 1 s core-level of WO3 with a binding energy of 530.5 eV attributed to the W–O bond, which was observed on the WO3-Ti3C2 heterostructure, confirming the presence of WO3 in the heterostructure. Three peaks in the Ti3C2 Ti 2p spectra are deconvoluted and attributed to Ti–C (2p1/2), Ti4+ (2p3/2), and Ti4+ (2p1/2) at 455.6 eV, 459.8 eV, and 463.0 eV, respectively [34]. Upon the formation of the WO3-Ti3C2 heterostructure, a notable positive shift (0.1–0.2 eV) in the binding energies of Ti–C at 455.6 eV and Ti (IV) 2p1/2 at 464.0 eV were observed relative to pristine WO3. The observed peak shifts demonstrate that interfacial contact surfaces are formed between Ti3C2 MXene, and WO3 nanoparticles [35]. Al 2p high-resolution XPS spectra for the Ti3AlC2 MAX phase is shown in Fig. 6(f). Double-varied peaks are observed at the binding energies of 71.7 eV and 74.3 eV that are assigned to Ti–Al and Al–O (2p3/2). According to the analyses above, a Schottky contact is used to transmit electrons from WO3 to Ti3C2.

Fig. 6
figure 6

(a) XPS survey spectra of Ti3AlC2, Ti3C2, WO3, and WO3-Ti3C2. (b) W 4F high-resolution spectra of WO3 and 5% WO3-Ti3C2. (c) C 1 s high-resolution of Ti3AlC2, Ti3C2, and 5% WO3-Ti3C2. (d) O 1 s high-resolution spectra of WO3 and 5% WO3-Ti3C2. (e) Ti 2p high-resolution spectra of Ti3AlC2, Ti3C2, and 5% WO3-Ti3C2. (f) Al 2p high-resolution of Ti3AlC2

3.4 Optical and photoelectrochemical characteristics

Photoelectronic investigations of the raw materials were carried out using UV–vis DRS analysis, as shown in Fig. 7. Figure 7 (a) illustrates that all the synthesized nanomaterials showed a redshift. Pristine WO3 displayed an absorption wavelength of around 450 nm and a corresponding band gap of 2.77 eV. The light absorption of the WO3-Ti3C2 heterostructure is enhanced relative to WO3. This could be attributed to the introduction of Ti3C2 MXene onto WO3. Furthermore, when compared to pristine WO3, shorter wavelength absorption and a narrow band gap were observed. The WO3-Ti3C2@β-CD nanocomposites also showed a redshift relative to WO3. The narrowing of the band gap for the nanocomposites promotes a more red shift toward visible light absorption. Additionally, it is anticipated that the nanocomposite’s increased light absorption may improve the photoelectrochemical characteristics of WO3 [33]. From the Tauc plots in Fig. 7(b), the energy bandgap of the photocatalysts was examined using the Kubelka–Munk equation (Eq. 2) [36].

$$(\alpha hv)=A {\left(hv-{E}_{g}\right)}^{1/n}$$
(2)

where, α is the optical absorption coefficient, hv is the photon energy, and the value of n is determined by the type of transition, which is n = ½ for a direct allowed transition for semiconductors, which is the case with WO3, Eg is the computed bandgap energy, and A is a constant. The Tauc graphs in Fig. 7(b) display the band gap values corresponding to the materials as prepared [37].

Fig. 7
figure 7

(a) UV–vis DRS spectra of the prepared materials. (b) Corresponding Tauc plots of the prepared materials

The rate of recombination of the photo-induced charge carriers in the prepared materials was examined using photoluminescence (PL) spectroscopy, as shown in Fig. 8(a). The analyses were carried out in ethanol with an excitation wavelength of 220 nm. The intensity of PL quantifies the semiconductors electronic behavior in terms of charge recombination rate, which directly affects the materials’ photocatalytic performance [38]. The PL spectra show the emission peak of the materials at 320 nm. High PL intensity in pure WO3 indicates a quicker rate of photo-induced charge carrier recombination [39]. The intensity of the WO3-Ti3C2 heterostructure decreases upon the addition of Ti3C2Tx MXene content to WO3 (Fig. 8(a)).

Fig. 8
figure 8

(a) PL spectra. (b) photocurrent response. (c) EIS Nyquist plot. (d) Mott Schottky plot of the as-prepared materials

The 5% WO3-Ti3C2@β-CD nanocomposite captures the photoexcited electrons more efficiently than the pristine WO3 photocatalyst. The peak intensity is related to the charge recombination of electrons with holes, and the low intensity denotes a decrease in the rate of recombination probability. Furthermore, of all the prepared nanocomposites, 5% WO3-Ti3C2@β-CD had the lowest PL intensity at an emission wavelength of 320 nm, indicating the lowest rate of recombination probability of photo-induced electrons and holes, which would contribute significantly to the highest photocatalytic activity of the as-prepared photocatalysts. To further support PL, the transient photocurrent response (Fig. 8(b)) was used to measure the current response of the as-prepared material under adjusted irradiation light. The current response was measured by switching the visible light on–off over five cycles. The photocurrent signals of the photocatalysts were shown to increase right away when the light was turned on, demonstrating the photocatalysts’ light sensitivity [40]. While the intensity drops off when the light is turned off, this suggests that photocatalytic materials may contain trap sites like oxygen vacancies that could trap photoexcited electrons and lengthen the lifetime of charge carriers [9].

In comparison to pure WO3, the 5% WO3-Ti3C2 heterostructure and 5% WO3-Ti3C2@β-CD nanocomposite display considerably higher photocurrent densities due to the improved separation efficiency of the photo-induced charge carriers. Moreover, the photocurrent density of 5% WO3-Ti3C2@β-CD is observed to be 3.0 mA cm−2 which is approximately 0.7 higher than the pristine WO3. Higher photocurrent intensity is known to show facilitated electron–hole separation and migration [41].

By examining the diameter of the semicircles, Nyquist plots (Fig. 8(c)) provide information on the recombination rates [42]. The semicircle’s interpretation gives information about the recombination rate since a small semicircle denotes low recombination probability and low resistance to charge transfer on the working electrode coated with the synthesized material. As seen in Fig. 8(c), the pristine WO3 photocatalyst exhibits high resistance, which is represented by a big semicircle and is linked to lesser interfacial charge separation and more charge recombination; when we dope it with Ti3C2 MXene to form a WO3-Ti3C2 heterostructure, we observe a likely decrease in the semicircle, which suggests that the MXene lowered the charge resistance of the heterostructure. Furthermore, the 5% WO3-Ti3C2@-CD nanocomposites have the smallest semicircle diameter, indicating a decrease in charge resistance. This, in turn, suggests a decrease in the rate of recombination at high doping levels, which is supported by PL results and explained by the electronic properties of Ti3C2 MXene as well as the hydrophobic cavity of β-cyclodextrin. The Randles-Ershler model was used to fit the experimental photo-electrochemical impedance spectroscopy (PEIS) spectra (the corresponding electrical circuit is depicted in the insert of Fig. 8(c) [43]. Rs stands for the electrolyte resistance in this analogous circuit, Rct for the charge transfer resistance, C for capacitance, and W for the Warburg element.

The kind of semiconductor, charge carrier concentration, and flat band potential (VFB) of the as-synthesized materials were identified using Mott-Schottky plots in Fig. 8(d). The number of donors or acceptors for semiconductors is denoted by the charge carrier densities NA and ND, respectively [44]. With Ag/AgCl as the working electrode, the slope between 1/C2 and the potential was drawn. All materials had a positive slope, which is a trait of an n-type semiconductor. From the MS plot, we extrapolated VFB along (1/C2 = 0) to be − 0.82 V, − 0.55 V, − 0.65 V, − 0.39, and − 0.48 V (vs Ag/AgCl), for WO3, 5% WO3-Ti3C2, 1% WO3-Ti3C2@β-CD, 3% WO3-Ti3C2@β-CD, and 5% WO3-Ti3C2@β-CD, respectively. When WO3 is doped with Ti3C2 MXene, its VFB increases, indicating that the nanocomposite will need less energy to start photocatalytic processes than pristine WO3. In addition, by coupling capacitance to the applied potential (C−2 vs. V) as given in Eq. 3, MS graphs in Fig. 8(d) were utilized to analyze charge carrier concentration (ND) utilizing Mott Schottky’s theory [45].

$$\frac{1}{{C}^{2}}=\left(\frac{2}{\varepsilon {\varepsilon }_{0}{A}^{2}e{N}_{D}}\right)[V-\left({V}_{FB}+\frac{KT}{e}\right)]$$
(3)

where V = applied voltage at the electrode, VFB = flat band potential, e = electron charge, KB = Boltzmann constant, T = operating temperature, ND = donor density, ε0 = semiconductor electrode permittivity, and C = total measured capacitance of space charge. BET analysis can be used to provide A, which represents the surface area of the electrode that was employed [7]. BET analyses in Fig. 9 exhibit type IV adsorption isotherms having a mesoporous structure [35]. The specific surface areas, total pore volumes, and average pore diameters of WO3 and their nanocomposites were calculated using the Brunauer–Emmett–Teller (BET) theory. Compared to pure WO3 and Ti3C2Tx MXene, the BET surface area and pore volumes of all the nanocomposites were high (Fig. 9). This can be attributed to the successful formation of a heterointerface between WO3 and Ti3C2 MXene, as well as the host–guest interaction with the β-cyclodextrin, which had a significant impact on the surface area. The high surface area can facilitate more active sites on the nanocomposite. This is very advantageous for photocatalysis since it shows that there are more active sites accessible for the nanocomposites. To determine charge carrier density (ND) values from BET data, MS slopes (\(\Delta\)(xy)) derived from Eq. 4 above were applied.

Fig. 9
figure 9

BET N2 adsorption–desorption isotherms of (a) 5% WO3-Ti3C2@β-CD nanocomposite, (b) 5% WO3-Ti3C2 heterostructure, (c) Ti3C2 MXene, and (d) WO3 nanoparticles

$$\Delta (yx)=\left(\frac{2}{\varepsilon {\varepsilon }_{0}{A}^{2}e{N}_{D}}\right)$$
(4)

Consequently, Eq. 3 rearranges to become Eq. 5.

$${N}_{D}=(\frac{2}{\varepsilon {\varepsilon }_{0}{A}^{2}e\Delta \left(yx\right)})$$
(5)

MS slope calculations of WO3, heterostructure, and the nanocomposites are outlined in Fig. S2. Additionally, compared to WO3, the produced composites have low ND and VFB values, which suggests minimal potential is needed to start charge transfer (see Table 1). The introduction of Ti3C2 MXene improved the carrier concentration of WO3.

Table 1 The computed flat band potentials (VFB), calculated carrier concentrations (ND), and calculated surface area of the photocatalysts

To look at the factors that affect a semiconductor’s band gap is in further detail. Utilizing the optical band gap (Eg) and Mulliken’s absolute electronegativity, the values of the conduction band (CB) and valence band (VB) were computed. Equation 6 can be used to determine the potential of a conduction band (ECB) for a semiconductor in the Helmholtz layer when ions (hydrogen and hydroxide) are present.

$${E}_{CB}= -X+\frac{1}{2} {E}_{g}- \frac{2.303RT}{F}(pH-p{H}_{pzc})$$
(6)

T presents the absolute temperature, Eg is the optical energy band gap, R is the universal gas constant, and F is the faraday constant. Using Eq. 7, the electronegativity (X) of the semiconductor was calculated.

$$X=[x (A{)}^{a}x(B{)}^{b}x(C{)}^{c}]\frac{1}{a+b+c}$$
(7)

where X represents the absolute electronegativities for semiconductor atoms A, B, and C, respectively. The electronegativity (X) value for WO3 was obtained from literature as 5.025 eV [46]. Additionally, at the point of zero charge, the number of ions that affect the potential cancel out, and the pH change is zero (pH = 0); hence, Eq. 7 becomes Eq. 8.

$${E}_{CB}= -X+\frac{1}{2} {E}_{g}- \frac{2.303RT}{F}(p{H}_{pzc})$$
(8)

Using Eq. 9, the valence band potentials (EVB) were computed.

$${E}_{VB} ={E}_{CB} + {E}_{g}$$
(9)

Table 2 displays the electronegativity (X) values and optical band edge positions. The pHpzc for WO3 from the literature is 2.50 [47]. As a result, the computed conduction band potential (ECB) and valence band potential (EVB) for WO3 were 3.49 eV and 6.26 eV (vs. vacuum), respectively. The band edge positions of the WO3-Ti3C2 heterostructure and WO3-Ti3C2@β-CD nanocomposites were also computed using the Eg values from UV–vis DRS and the point of zero charges of WO3, and the results are reported in Table 2. The 2.50 pHpzc was chosen since it was anticipated that the addition of Ti3C2Tx MXene contents would not significantly affect the point of zero charge of WO3.

Table 2 The photocatalysts’ absolute electronegativity and UV–vis DRS optical characteristics (eV vs. vacuum)

When compared to pristine WO3, the Eg values of composites were lower, which caused shifts in the photocatalysts’ band locations (see Fig. 10). The capacity to produce charge carriers with sufficient potential to start photocatalytic reactions defines the photocatalyst’s efficiency. The EVB must be more negative in (eV vs. vacuum), while the VCB potentials must be more positive in (eV vs. vacuum) than the targeted species’ standard potentials (Eo). The Schottky junctions in Fig. 10 show superior band potentials in comparison to the conventional reduction potentials of O2/(E°O2/•O2  = 0.33 V) [48], CO2/CO (E°CO2/CO  =  − 0.53 V), CO2/CH4 (E°CO2/CH4 =  − 0.24 V) [12], O2/H2O (E°O2/H2O =  + 1.23 V) [49], and H2O2/•O2 (E°H2O2/•O2  =  + 0.38 V) [50]. Additionally, these photocatalysts’ high photocurrent densities and decreased Eg values support their photocatalytic uses. The EVB and ECB offset for 5% WO3-Ti3C2@β-CD and WO3 were 0.13 eV and 0.14 eV, respectively, indicating that the band offsets contributed equally to the band gap narrowing (Eg).

Fig. 10
figure 10

Band edge position diagrams of the synthesized semiconductors

3.5 Proposed charge transfer pathway

The data from UV–vis DRS and XPS were combined with the valence band (VB) derived from XPS to obtain the band potentials and describe the transfer of electrons on the prepared photocatalysts. The valence band plots and band edge diagrams generated from the XPS valence band data are shown in Fig. 11. Valence band potentials were procured by using XPS valence band (VB) analysis in Fig. 11(a) and the values are + 0.35 eV, + 1.95 eV, and 1.80 eV (VS. vacuum) for Ti3C2 MXene, WO3, and 5% WO3-Ti3C2, respectively. Notably, a change in VB potential was seen with the creation of a 5% WO3-Ti3C2 heterostructure; this information is consistent with UV–vis DR’s investigations. In comparison to pristine WO3 and 5% WO3-Ti3C2, the VB shifted up by 0.15 eV and the CB downshifted by 0.07 eV, reducing the band gap of the 5%WO3-Ti3C2 heterojunction. The increase in VB width has a favorable effect on the separation of charges by increasing the holes’ photo-oxidation mobility [51].

Fig. 11
figure 11

(a) XPS valence band spectra of WO3, Ti3C2, and WO3-Ti3C2. (b) Band edge diagram showing before and after contact of WO3 with Ti3C2 to form WO3-Ti3C2

When a photon of light with the proper wavelength ( > Eg) is shined on the surface of WO3, electrons from the valence band will excite the conduction band, leaving behind holes (h+) on the VB (Fig. 11(b)). The photoexcited electrons will quickly relax back to the VB and couple with holes, reducing the effectiveness of the WO3 photocatalyst. Fast electron–hole recombination is one of the drawbacks of WO3, which affects its performance as a single photocatalyst. However, when WO3 and Ti3C2 MXene are in contact, as in a 5% WO3-Ti3C2, the photoexcited electrons on WO3’s CB go to the fermi level (Ef) of Ti3C2 MXene instead of settling down to WO3’s VB. Furthermore, Makola et al. described the equivalent charge transfer and capture phenomenon for g-C3N4 and Nb2CTx, in which Nb2CTx entraps photoexcited electrons from the CB of g-C3N4. Here, the XPS study outlined above was utilized to confirm that the transfer of electrons from WO3 to Ti3C2 indeed occurred. The high conductivity of Ti3C2 and the presence of the Schottky-junction electric field between the two materials enable the migration of photoexcited charge carriers from WO3 to Ti3C2 [40]. The Ef of Ti3C2 traps the electrons, preventing recombination and thereby improving the heterostructure’s charge separation efficiency. This is consistent with other results, which show that the remarkable charge mobility of Ti3C2 facilitates the transfer of photoexcited electrons from the WO3 conduction band to the Ef of MXene [11, 40].

4 Optimization parameters

4.1 Effect of working pH

The photocatalytic degradation efficiency of the synthesized photocatalysts toward oseltamivir at different pH values (1 to 11), with a constant photocatalyst loading of 25 mg with an oseltamivir concentration of 5 mg/L and a working volume of 250 mL, is shown in Fig. 12. The efficiency of the photocatalyst at pH 3 has the highest photocatalytic degradation toward oseltamivir. At an acidic medium for the pristine photocatalyst (WO3) (Fig. 12(a)), pH 3 showed the highest degradation efficiency of 73.9% after 60 min of irradiation. At neutral pH, the degradation efficiency was 53.1% and at extreme basic medium (pH 11), the degradation efficiency was at the lowest 40.5%. The optimum degradation efficiency of oseltamivir was observed at pH 3 for all the photocatalysts. This is because varying pH levels may change the catalyst’s characteristics, which in turn may change how oseltamivir binds to the surface of the photocatalyst. Similar mechanisms were also observed with the WO3-Ti3C2 photocatalyst shown in Fig. 12(b). The degradation efficiency of oseltamivir was at its highest in an acidic medium (pH 3) and lowest in a basic medium (pH 11). The degradation efficiency at pH 3, pH 7, and pH 11 was 83.3%, 75.5%, and 48.9%, respectively. The WO3-Ti3C2 photocatalyst showed to have substantial oseltamivir degradation when compared to pristine WO3. This is supported by the incorporation of Ti3C2 MXene which forms a heterojunction and is ideally aligned to sufficiently separate photoexcited electrons in order to prevent recombination, as shown by PL measurements.

Fig. 12
figure 12

Effect of a pH on the degradation of oseltamivir

From Fig. 12(c), it can be noted that the degradation efficiency decreases with an increase in working pH. Moreover, at an acidic medium, pH 3, a 92.9% degradation efficiency was achieved, after 60 min of light irradiation.

The surface charge analysis in Fig. S3 showed that the photocatalyst’s surface charge was positive at acidic pH and negative at basic pH, as illustrated by Eqs. (10 and 11).

$$M-OH = M-{O}^{-}+ {H}^{+}(pH > pzc)$$
(10)
$$M-OH + {H}^{+}= M-{OH}_{2}^{+} (pH < pzc)$$
(11)

Due to its low pKa value of 1.21 mV, oseltamivir is monoprotonated at an acidic media on its NH2 moiety, resulting in the molecule acquiring a positive charge. The positively charged oseltamivir is thus attracted to the negatively charged nanocomposite as observed from pzc measurement (Fig. S3), promoting the strong electrostatic attraction needed for the photocatalytic degradation of oseltamivir. The electrostatic interactions improved the adsorptive property, thereby increasing degradation efficiencies.

However, when the pH is adjusted to neutral and basic (pH 8), the degradation efficiency is 52.7% and 50.6% respectively. At a strong alkaline media (pH of 11), the degradation efficiency decreased further to 38.7%. This is because both oseltamivir and photocatalysts exhibited positive charges, which cause electrostatic repulsions. Therefore, this limits the contact between oseltamivir and the photocatalyst, eventually preventing degradation.

4.2 Effect of oseltamivir initial concentration

Figure 13 illustrates the effect of different concentrations of oseltamivir solutions on degradation efficiency. These studies were performed at a constant pH of 3 and a constant photocatalyst dosage of 25 mg. The solution of oseltamivir was kept at 250 mL. The concentration of oseltamivir solution was varied from 5 to 25 mg/L and was observed that the degradation efficiency of the photocatalysts decreases with an increase in oseltamivir initial concentration.

Fig. 13
figure 13

Effect of initial concentration on the degradation of oseltamivir

Pristine WO3 shown in Fig. 13(a) shows the highest oseltamivir degradation at a concentration of 5 mg/L which is 65%. The degradation efficiency was at the lowest at an oseltamivir concentration of 15 mg/L, 20 mg/L, and 25 mg/L which was 48.5%, 35.9%, and 32.4%, respectively. The degradation of WO3 was low because its surfer from fast recombination of photoinduced charge carriers as a photocatalyst.

The degradation efficiency was enhanced by the addition of Ti3C2 MXene on the surface of WO3 to form a WO3-Ti3C2 heterojunction shown in Fig. 13(b). After degrading 5 mg/L of oseltamivir using 5% WO3-Ti3C2, the degradation efficiency was 85.4%, while the degradation percentage of 76.9%, 72.5%, and 65.1% was observed for 10 mg/L, 15 mg/L, and 20 mg/L, respectively. The concentration of 25 mg/L exhibited the lowest degradation efficiency of 52.6%. The decrease in the degradation efficiency at high oseltamivir concentration may be due to more oseltamivir being adsorbed on the surface of the WO3-Ti3C2 photocatalyst resulting in clogging of the photocatalyst active sites, inhibiting the light photons to reach the surface of the photocatalyst for adsorption of oseltamivir.

The degradation efficiency reached 95.1% after degrading 5 mg/L with 5%WO3-Ti3C2@β-CD photocatalyst within 60 min, while the degradation percentages were 88.5%, 62.3%, 64.7%, and 26,4% for 10 mg/L, 15 mg/L, 20 mg/L, and 25 mg/L, respectively.

Moreover, it is possible to explain how the degradation efficiency decreases with increasing oseltamivir concentration by assuming that when the oseltamivir concentration rises, more oseltamivir is adsorbing onto the surface of the photocatalyst. As a result, parts of the photocatalyst’s active sites become saturated and hinder the number of photons that can reach the surface of the photocatalyst. Therefore, these photons are averted from producing more reactive species, which leads to a decrease in degradation.

The increased degradation efficiency with the use of 5% WO3-Ti3C2@β-CD nanocomposite photocatalyst despite the high oseltamivir concentrations can be ascribed to the effective separation of photogenerated electron holes as a result of the metallic nature of the Ti3C2 MXene, larger surface area, and pore size exhibited by the nanocomposite because of the presence of the hydrophilic β-cyclodextrin which provides active sites for improved adsorption of the oseltamivir. According to BET analysis in Fig. 9, the nanocomposite had a larger surface area, pore size, and volume than the pristine WO3 and WO3-Ti3C2 heterostructure. Furthermore, the larger surface area provided more active sites for oseltamivir to be adsorbed and degraded into smaller fragments, whereas the pores allow the solution to pass through the nanocomposite lattice structure and become receptive to degradation.

4.3 Catalyst loading

One of the factors influencing the degradation efficiency of organic pollutants in aqueous media is catalyst loading. According to Bhembe et al. (2020), in heterogeneous photocatalysis, increasing the amount of catalyst in a solution results in an increase in the number of active sites on the photocatalyst’s surface [52]. This leads to the formation of more active sites that will take part in the degradation of pollutants. Figure 14 shows that the degradation efficiency increases with an increase in photocatalyst dosage.

Fig. 14
figure 14

The effect of photocatalyst dosage on the degradation of oseltamivir

In an oseltamivir solution of 250 mL, the pH was kept constant at 3, the initial concentration of oseltamivir was kept constant at 5 mg/L, and the irradiation time was 60 min. The amount of photocatalyst was gradually increased from 5 to 25 mg. As the catalyst dosage increases, the degradation efficiency increases as well.

Upon the addition of 5 mg WO3, the degradation of oseltamivir reached 29.2% (Fig. 14(a). With an additional 5 mg, the degradation efficiency increased to 40.5%, and with the catalyst loading of 15 mg, it increased to 56.5%. With a catalyst loading of 25 mg, the highest degradation of 68.4% was achieved. In Fig. 14(b), a similar trend was observed in the degradation efficiency with the use of the WO3-Ti3C2 photocatalyst. The least efficiency of 41.4% was reached when degrading with 5 mg of WO3-Ti3C2 photocatalyst. While the highest degradation of 82.5% was reached with a catalyst loading of 25 mg.

The degradation efficiency of oseltamivir was the highest at 25 mg dosage with a degradation percentage of 91.6% when using the 5% WO3-Ti3C2@β-CD nanocomposite as shown in Fig. 14(c). The degradation efficiency of 20 mg, 15 mg, 10 mg, and 5 mg was obtained to be 86.5%, 76.7%, 60,0%, and 49.4%, respectively. The reason for the low degradation at a catalyst loading of 5 mg is that the light penetration was limited by the high concentration of oseltamivir in the solution; hence, the amount of light was low to produce more radicals.

4.4 Optimal photocatalytic material and conditions

The photocatalytic activity of WO3, 5% WO3-Ti3C2, and 5% WO3-Ti3C2@β-CD was evaluated through the photodegradation of oseltamivir in wastewater effluents, and the results are plotted in Fig. 15. The 5% WO3-Ti3C2@β-CD showed the best photocatalytic degradation efficiency of oseltamivir, and the maximum degradation rate reached 92.9% at 60 min. The degradation efficiencies of 5% WO3-Ti3C2 and WO3 were 76.8% and 53.9%, respectively. WO3 had the lowest photocatalytic activity, and this may be due to the fast recombination of photogenerated charge carriers which are responsible for degrading oseltamivir.

Fig. 15
figure 15

The comparison of the photocatalytic activity of WO3, 5% WO3-Ti3C2, and 5% WO3-Ti3C2@β-CD on degrading oseltamivir in water

The excellent physical and chemical properties of 5% WO3-Ti3C2@β-CD were responsible for its excellent photocatalytic performance. The 5% WO3-Ti3C2@β-CD had a porous structure with a large specific surface area, indicating a high capacity for adsorption. This property has the potential to improve photocatalytic activity. According to the photoelectrochemical measurements, XPS data, and UV–vis DRS data, the electron and hole recombination rates in 5% WO3-Ti3C2@β-CD were slower, implying that more photogenerated electrons could be converted into superoxide radicals. Also, holes are more powerful than electrons, when it comes to the degradation (oxidation) of organic pollutants such as oseltamivir. Hence, 5% WO3-Ti3C2@β-CD was used for the degradation of oseltamivir in wastewater effluent for both biological and photocatalytic degradation for high degradation efficiency.

4.5 Recyclability test

The stability and durability of a photocatalyst is a crucial aspect of their practical applications. Figure 16 shows the photocatalytic efficiency of 5% WO3-Ti3C2@β-CD over five cycles of usage. After each photocatalytic degradation, the photocatalyst was filtered, washed several times with deionized water, and dried in an oven at 70 °C for 12 h. Figure 16 shows that the degradation efficiency of 5% WO3-Ti3C2@β-CD was at least 75% after five cycle runs. And this means the crystal structure of the 5% WO3-Ti3C2@β-CDs photocatalyst was slightly distorted, and this may be due to oseltamivir pollutant binding on the surface structure of the photocatalyst. Since the nanocomposite was able to maintain a degradation efficiency of about 75% even after the fifth cycle, it makes potentially cost effective.

Fig. 16
figure 16

The effect of cycling experiments on photocatalytic degradation efficiency of oseltamivir

4.6 Free radical capture experiment

Figure 17 demonstrates the active site radical trapping experiments in order to verify the role of relative active species that contributed during the photocatalytic degradation of oseltamivir using 5% WO3-Ti3C2@ β-CD photocatalyst. In this experiment, tertiary butyl alcohol, methanol, and p-benzoquinone were used as scavengers to capture hydroxide radicals (OH), holes (h +), and superoxide radicals (°O2), respectively. Considering this trapping experiment, it was discovered that the 5% WO3-Ti3C2@β-CD photocatalyst activity was significantly affected by the addition of p-benzoquinone (PBQ) as a superoxide scavenger. Reducing the photocatalytic efficiency from 94.4 to 40.1%, meaning that trapping (°O2) was critical to suppress the photocatalytic activity. Meanwhile, the addition of tertial butyl alcohol and methanol had a small effect on the activity of 5% WO3-Ti3C2@ β-CD photocatalyst. By confirming the active sites contributing to the photocatalytic activity, the superoxides are to take a major role in degrading oseltamivir, whereas the h+ and ° OH radicals supported the degradation process. The active radicals will attack the positive nitrogen of oseltamivir, subsequently degrading oseltamivir into by-products that can be adsorbed by 5% WO3-Ti3C2@β-CD photocatalyst. Then, the photocatalyst has the potential to fragment them into smaller decomposable oxidation by-products, which are less toxic compared to their primary compound (oseltamivir) [53].

Fig. 17
figure 17

The effect of MT, TBA, and PBQ on photocatalytic degradation efficiency of oseltamivir

4.7 Degradation pathways

Using a high-resolution compact mass spectroscopy run in ESI positive mode, it was possible to determine potential degradation by-products/fragments of oseltamivir [54]. The high-resolution mass spectroscopy detected four non-target fragments which resulted from the photodegradation of oseltamivir, employing 5% WO3-Ti3C2@β-CD under 3 h. Figure 18 illustrates the chromatographs obtained from the mass spectroscopy, showing the peak intensities of oseltamivir before and after photodegradation.

Fig. 18
figure 18

Mass spectra of oseltamivir and its by-products after 3 h of photodegradation

These fragments’ chemical formulas and structures, which correspond to their protonated molecular ions [M + H], are listed in Table 3. Included in the table are the retention times in minutes, at which these fragments were eluted from the Phenomenex kinetex XB-C18 column, at a flow rate of 0.30 mL/min through the gradient flow of 50% acetonitrile + 50% deionized water.

Table 3 Summary of oseltamivir degradation fragments

The oseltamivir peak had an intensity of 5.0 × 105 prior to degradation. But when oseltamivir was subjected to photodegradation for 3 h, the peak decreased to 1.0 × 104. This percentage decrease in the peak intensity reached approximately 10%. Notably, the parent chemical, oseltamivir, was still present in the solution after 3 h of deterioration, suggesting its resistance to photodegradation, albeit at very low levels [55]. The qualitative study of oseltamivir degradation is represented by the percentage that was previously mentioned. The quantitative study, which also showed that oseltamivir slightly deteriorated to 86%, showed good agreement between the data and the quantitative analysis [54]. The obtained results demonstrate the effectiveness of the photocatalytic approach, which performed more effectively than Cesare and colleagues, who found 65% oseltamivir degradation by microorganism [56].

Furthermore, the chromatograph also displays the oseltamivir degradation fragments, which are labeled as {1–4} according to how close to the oseltamivir parent peak (313.2122). These fragments’ chemical formulas and structures, which correspond to their protonated molecular ions [M + H], are listed in Table 3. The retention times for these fragments as they were eluted from the column are included in Table 3.

Oseltamivir is a cyclohexene carboxylate ester that is the ethyl ester of oseltamivir acid and a member of acetamides [57] with a chemical formula of [ethyl (3R, 4R, 5S)-4-(acetylamino)-5-amino-3-(1-ethylpropoxy) cyclohex-1-ene-1-carboxylate dihydrogen phosphate] [58]. Oseltamivir can be broken down into a variety of structures with different molecular weights. While, a result of our research, a change from cyclohexene carboxylate ester to oseltamivir carboxylate and then to a phenyl was observed, with a corresponding steady decrease in m/z, respectively, oseltamivir was breaking down, creating a degradation pathway. Figure 19 depicts the constructed pathway. Upon exposing oseltamivir to photocatalytic degradation, it fragmented to a pyrrolidine with a corresponding m/z of 296 after losing ammonia (NH3 −) [59]. This compound further broke down to a fragment labeled as {2} which contains two carboxyl groups in the structure from the parent ion. This fragment has an m/z value of 226 after eliminating C5H10, cyclopentane pentamethylene. In addition, an ethynol ethynyl alcohol (C2H2O) broken down to form a fragment with m/z 184. A second ammonia group was eliminated in the structure leaving a fragment with m/z 167 [58].

Fig. 19
figure 19

Proposed fragmentation of oseltamivir along with exact masses of the fragments

The fragment of m/z 95 which results from fragmenting an alkene group (ethene, C2H4), and m/z 95 which results after removing CO2 from the fragmented structure were not observed on the MS spectra. This can be because of (1) the low limit of detection, (2) retention time was too high for these fragments, and/or (3) they need more photodegradation time to be fragmented.

Photocatalysis is efficient in removing organic pollutants from the water after reaching this stage of oseltamivir fragmentation and producing {5 & 6} as illustrated in Fig. 19 with molecular ions C7H7O3+ and C6H7O+, respectively. These by-products can be further broken down into alcohol deemed innocuous than oseltamivir.

5 Conclusion

In conclusion, we were able to successfully synthesize a multifunctional MXene@β-cyclodextrin nanocomposite via in situ fabrication and polymerization. Pristine WO3 nanoparticles, WO3-Ti3C2 heterostructures, and WO3-Ti3C2@β-CD samples were successfully prepared, and this was confirmed by several analytical methods such as XRD, Raman, FTIR, and XPS. Changes in the chemical composition of WO3 were noted upon the addition of Ti3C2 MXene. Morphology studies show that WO3 nanoparticles were successfully fabricated over Ti3C2 MXene nanosheets. The band gaps and band edge placements in the synthesized nanocomposites were narrowed. Additionally, when the nanocomposites were being created, the rates of electron–hole recombination were reduced. Photocurrent response, Nyquist plot, and MS data from the electrochemical studies demonstrate that the development of the heterostructure considerably boosts photocatalytic activity.

Degradation experiments showed that when the initial concentration of oseltamivir solution increased from 5 to 25 mg/L, the degradation efficiency decreases. However, the degradation efficiency increased with an increase in catalyst loading (5 to 25 mg). High degradation efficiency of oseltamivir was observed in acidic media (pH 3). Compared to other photocatalysts, 5% WO3-Ti3C2@β-CD showed excellent degradation efficiency for oseltamivir. The highest photocatalytic degradation efficiency of 92.9% was achieved when the pH of the solution was pH 3, the catalyst loading of 25 mg in 5 mg/L solution of oseltamivir. Oseltamivir with a molecular mass of 313.21 g/mol was successfully fragmented into six smaller fragments, with hexanol as the smallest degradation product. The final product is less toxic than oseltamivir and can be further break down into H2O and CO2.