Showing that $\left(1-x+\frac{x^2}{2}\right)^n-(1-x)^n\leq \frac{x}{2}$ using induction I was asked to show that

For every $n\in\mathbb{N}$ and $x\in [0,1]$ the following is true:
\begin{equation*}
    \left(1-x+\frac{x^2}{2}\right)^n-(1-x)^n\leq \frac{x}{2}.
\end{equation*}

However, I found a mistake in my proof and now I don't know how to proceed.
This was my attempt:
The case when $n=1$ is true because when $x\in [0,1]$, we have $x^2\leq x$, and so
\begin{equation}
    1-x+\frac{x^2}{2}-1+x=\frac{x^2}{2}\leq \frac{x}{2}.
\end{equation}
Suppose now that the statement holds for some $k\in \mathbb{N}$,
\begin{equation}
    \left(1-x+\frac{x^2}{2}\right)^k-(1-x)^k\leq \frac{x}{2}.
\end{equation}
Knowing that $0\leq x\leq 1$, we can see that $1-1\leq x$, which implies $1-x\leq 1$. Additionally, we can see that $2x\geq x$ and so $x^2\leq x$,
\begin{align}
    x\geq \frac{x}{2}\geq \frac{x^2}{2}&\Rightarrow x\geq \frac{x^2}{2}\\
    &\Rightarrow 0\geq \frac{x^2}{2}-x\\
    &\Rightarrow 1\geq \frac{x^2}{2}-x+1
\end{align}
Thus,
\begin{align}
    { \left(1-x+\frac{x^2}{2}\right)^{k+1}-(1-x)^{k+1}}&=  \left(1-x+\frac{x^2}{2}\right)^k\left(1-x+\frac{x^2}{2}\right)-(1-x)^k(1-x) \\
    &\leq  \left(1-x+\frac{x^2}{2}\right)^k-(1-x)^k\\
    &\leq \frac{x}{2}
\end{align}
The statement holds for $k+1$.
The mistake is the part where I wrongly use
\begin{equation}
    -(1-x)^k(1-x)\leq -(1-x)^k.
\end{equation}
But I don't know how to proceed now.
Any hint or advice is appreciated. Thank you.

Rearrange the induction hypothesis so it reads $\left(1-x+\dfrac {x^2}2\right)^k \le \dfrac x2 + (1-x)^k$.
Now the induction step can go as follows:
\begin{align}\left(1-x+\frac {x^2}2\right)^{k+1} - (1-x)^{k+1} &\le \left(1-x+\frac {x^2}2\right)\left(\frac x2 + (1-x)^k\right)-(1-x)^{k+1}\\
&=\frac x2-\frac {x^2}2+\frac{x^3}4+(1-x)^{k+1}+\frac{x^2}2(1-x)^k-(1-x)^{k+1}\\
&=\frac x2 - \frac{x^2}2\left(1-\frac x2-(1-x)^k\right)\\
&\le \frac x2-\frac{x^2}2\left(1-\frac x2 - (1 - x)\right)\\
&=\frac x2 - \frac{x^3}4 \le \frac x2
\end{align}
The part where we eliminated the exponent $k$ holds since $(1-x)^k \le (1-x)$ for $x \in [0,1]$.
