# NonlinearStateSpaceModel: Trying to parse the documentation

I am trying to follow the documentation on NonlinearStateSpaceModel here, and the first basic example throws me for a loop. It says it's defining the nonlinear system

$x_1'(t)=u(t)+x_1(t)x_2(t)$

$x_2'(t)=u(t)x_2(t)$

with output $y(t)=x_1(t)$

The example call is written

nsys = NonlinearStateSpaceModel[{{u-x1 x2, u x2+1}, {x1}}, {x1, x2}, u]


This appears to be the arity-3 overload for NonlinearStateSpaceModel, which, if right, must fit the template

$\textrm{NonlinearStateSpaceModel}[\{f,g\},x,u]$

representing the model

$x'(t)=f(x(t), u(t)), y(t)=g(x(t),u(t))$

That means that

$x$ is {x1, x2}

$f$ is {u - x1*x2, u*x2 + 1}

$g$ is {x1}

which I can only read as

$x_1'(t)=u(t)-x_1(t)x_2(t)$

$x_2'(t)=1+u(t)x_2(t)$

with output $y(t)=x_1(t)$

which doesn't look anything like the system they say they're defining. I've blinked my eyes several times and stared at it for too long. It's either a horrendous cluster of typos or I just don't know how to read these models.

• think you're right. Their input does not fit the description. – Phab Sep 2 '14 at 10:33
• The example text has a couple of typos. It should read $\ldots x_1'(t)=u(t)-x_1(t) x_2(t), x_2'(t)=u(t) x_2(t)+1 \ldots$ – Suba Thomas Sep 3 '14 at 3:16

nsys = NonlinearStateSpaceModel[{{u + Subscript[x, 1] Subscript[x, 2],