Concept:
For equations of the form
\[
F(D)y=e^{ax}V
\]
we use the shifting rule:
\[
\frac{1}{F(D)}e^{ax}V=e^{ax}\frac{1}{F(D+a)}V
\]
Step 1: Identify \(F(D)\).
The differential equation is
\[
(D^2-2D+1)y=e^x\sin x
\]
So,
\[
F(D)=D^2-2D+1
\]
\[
F(D)=(D-1)^2
\]
Step 2: Apply shifting rule.
Since the right hand side is
\[
e^x\sin x
\]
we replace \(D\) by \(D+1\):
\[
\text{P.I.}=e^x\frac{1}{F(D+1)}\sin x
\]
Now,
\[
F(D+1)=((D+1)-1)^2
\]
\[
F(D+1)=D^2
\]
Therefore,
\[
\text{P.I.}=e^x\frac{1}{D^2}\sin x
\]
Step 3: Evaluate \(\dfrac{1}{D^2}\sin x\).
Since
\[
D^2(\sin x)=-\sin x
\]
we get
\[
\frac{1}{D^2}\sin x=-\sin x
\]
Step 4: Find the particular integral.
\[
\text{P.I.}=e^x(-\sin x)
\]
\[
\text{P.I.}=-e^x\sin x
\]
Step 5: Final answer.
\[
\boxed{-e^x\sin x}
\]