Vì \(\frac{x}{y+z}+\frac{y}{z+x}+\frac{z}{x+y}=1\)
\(\Rightarrow\left(x+y+z\right)\left(\frac{x}{y+z}+\frac{y}{z+x}+\frac{z}{x+y}\right)=x+y+z\)
\(\Leftrightarrow\frac{x^2}{y+z}+\frac{xy}{z+x}+\frac{zx}{x+y}+\frac{xy}{y+z}+\frac{y^2}{z+x}+\frac{yz}{x+y}+\frac{zx}{y+z}+\frac{yz}{z+x}+\frac{z^2}{x+y}=x+y+z\)
\(\Leftrightarrow\left(\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}\right)+\left(\frac{xy+yz}{z+x}\right)+\left(\frac{yz+zx}{x+y}\right)+\left(\frac{zx+xy}{y+z}\right)=x+y+z\)
\(\Leftrightarrow\left(\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}\right)+\frac{y\left(z+x\right)}{z+x}+\frac{z\left(x+y\right)}{x+y}+\frac{x\left(y+z\right)}{y+z}=x+y+z\)
\(\Leftrightarrow\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}+x+y+z=x+y+z\)
\(\Leftrightarrow\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}=0\)
\(\Rightarrow M=2019\)