How can I solve the following system of differential equations?
$$\begin{aligned} x' &= -5x + 10y\\ y' &= -4x + 7y\\ z' &= z^2 -2z + 1\end{aligned}$$
I have to give a function $f(x)$, that $f(0)=(1,0,2)$. I don't know how to manage the problem with the variable $z^2$.
Could you also tell me what the maximum interval of definition of $f(x)$ is?
$$\frac{dz}{dt}=z^2-2z+1 \implies \int \frac{dz}{(z-1)^2}=\int dt \implies \frac{1}{1-z}=t+C$$ The coupled equation for $x,y$ can be solved by matrix method to get $$x(t)=e^{t}(C_1 \sin 2t+ C_2 \cos 2t),$$ where $1\pm 2i$ are the eigenvalues of the matrix. Putting it in the first equation one can get $y(t)$. Next $C_1,C_2$ can be determined by the conditions such as $x(t_0)=x_0, y(t_0)=y_0$