Isidori I., Example 1.6.4

System of PDE (cannot be solved in a such way)

Clear[gradu]
gradu = Grad[u[x,y,z,t],{x,y,z,t}] 
DSolve[{gradu.{1,0,0,y}==0,gradu.{0,1,0,x}==0},u[x,y,z,t],{x,y,z,t}]

Unfortunately, this cannot be solved

PDE of the system can be solved one by one

ClearAll[x,u,gradu]
gradu = Grad[u[x,y,z,t],{x,y,z,t}] ;

g1={1,0,0,y};
g2={0,1,0,x};

DSolve[gradu.g1==0,u[x,y,z,t],{x,y,z,t}]

The solution (C[1][y,z][t-xy]) of the first equation can be interpreted as a function of y, z and of t-xy. For example:

u=(Sin[y z]+z)(t-x y);
Simplify[Grad[u,{x,y,z,t}].g1]

u=(Sin[y z]+z)Sin[(t-x y)z+y];
Simplify[Grad[u,{x,y,z,t}].g1]

DSolve[gradu.g2==0,u[x,y,z,t],{x,y,z,t}]

From these solutions we can give a common solution.
Some examples: (Subscript[u, 1])(x)=(Subscript[x, 4])-(Subscript[x, 1])(Subscript[x, 2]), (Subscript[u, 2])(x)=(Subscript[x, 3])

Isidori I., Example 4.1.4

ClearAll[x,g,u]
x={x1,x2,x3};
g={Exp[x2],1,0};
gradu=Grad[u[x1,x2,x3],x];
DSolve[gradu.g==0,u[x1,x2,x3],x]

A solution for the PDE can be: u(x)=(e^(Subscript[x, 2]))-(Subscript[x, 1])+C((Subscript[x, 3]))

Example 1 (a)

x={x1,x2,x3};
g={0,1,Sin[x1]};
gradu=Grad[u[x1,x2,x3],x];
DSolve[gradu.g==0,u[x1,x2,x3],x]

From this output you can give a function(s) (Subscript[ϕ, i])(x) such that (Subscript[L, g])(Subscript[ϕ, i])(x)=0.

Example 1 (b)

x={x1,x2,x3};
g={0,0,(x2/(x1+1))};
gradu=Grad[u[x1,x2,x3],x];
DSolve[gradu.g==0,u[x1,x2,x3],x]

From this output you can give a function(s) (Subscript[ϕ, i])(x) such that (Subscript[L, g])(Subscript[ϕ, i])(x)=0.

Example 1 (c)

x={x1,x2,x3,x4};
g={(1/(x4+1)),0,(x2/(x4+1)),0};
gradu=Grad[u[x1,x2,x3,x4],x];
DSolve[gradu.g==0,u[x1,x2,x3,x4],x]

From this output you can give a function(s) (Subscript[ϕ, i])(x) such that (Subscript[L, g])(Subscript[ϕ, i])(x)=0.

Example 1 (d)

x={x1,x2,x3,x4};
g={1,0,Exp[x4]-1,0};
gradu=Grad[u[x1,x2,x3,x4],x];
DSolve[gradu.g==0,u[x1,x2,x3,x4],x]

From this output you can give a function(s) (Subscript[ϕ, i])(x) such that (Subscript[L, g])(Subscript[ϕ, i])(x)=0.

Example 1 (e)

x={x1,x2,x3,x4};
g={0,ArcTan[x3],0, x1 ArcTan[x3]};
gradu=Grad[u[x1,x2,x3,x4],x];
DSolve[gradu.g==0,u[x1,x2,x3,x4],x]

From this output you can give a function(s) (Subscript[ϕ, i])(x) such that (Subscript[L, g])(Subscript[ϕ, i])(x)=0.

Example 1 (f)

x={x1,x2,x3,x4};
g={0,ArcTan[x3],0, x1 ArcTan[x3]};
gradu=Grad[u[x1,x2,x3,x4],x];
DSolve[gradu.g==0,u[x1,x2,x3,x4],x]

From this output you can give a function(s) (Subscript[ϕ, i])(x) such that (Subscript[L, g])(Subscript[ϕ, i])(x)=0.

Example 1 (g), continuous fermentation process

μ=(S/(K2 (S^2)+S+K1));
x={X,S};
h=S;

f={μ X,-((μ X)/Y)}

g={-(X/V),((Sf-S)/V)}
gradu=Grad[u[X,S],x];
DSolve[gradu.g==0,u[X,S],x]

Phi2=((S-Sf)/X);
eqn={h==z1,Phi2==z2}
sol=Solve[eqn,{X,S}]

f//MatrixForm//TeXForm

g//MatrixForm//TeXForm

h//TeXForm

Example 1 (h), Isidori I Example 4.1.5

x={x1,x2,x3,x4};

f={x1 x2-(x1^3),x1,-x3,(x1^2)+x2};
g={0,2+2x3,1,0};
h=x4;
gradu=Grad[u[x1,x2,x3,x4],x];
DSolve[gradu.g==0,u[x1,x2,x3,x4],x]

Lfh=Grad[h,x].f

Phi3=2 x3+(x3^2)-x2;
Phi4=x1;

Grad[Phi3,x].g

eqn={h==z1,Lfh==z2,Phi3==z3,Phi4==z4}
sol=Solve[eqn,{x1,x2,x3,x4}]

dz={z1,Grad[Lfh,x].f+Grad[Lfh,x].g u,Grad[Phi3,x].f+Grad[Phi3,x].g u,Grad[Phi4,x].f+Grad[Phi4,x].g u}
dz=dz/.sol[[2]]

ZeroDynamics=dz[[3;;4]]/.{z1->0,z2->0}
Eigenvalues[Grad[ZeroDynamics,{z3,z4}]/.{z3->0,z4->0}]

f//MatrixForm//TeXForm

g//MatrixForm//TeXForm

h//TeXForm

Example 1 (i), Isidori I Example 4.2.5

x={x1,x2,x3};
f={x3(1+x2),x1,x2(1+x1)};
g={0,1+x2,-x3};
gradu=Grad[u[x1,x2,x3],x];
Lgu=gradu.g;
adfg=Grad[g,x].f-Grad[f,x].g;
Lgfu=gradu.adfg;
adffg=Grad[adfg,x].f-Grad[f,x].adfg;
Lgffu=gradu.adffg;

adfg//Simplify//MatrixForm
adffg//Expand//MatrixForm
IsidoriAdffg={(1+x2)(1+2x2)(1+x1)-x1 x3,x3(1+x2),-x3(1+x2)(1+2x2)-3x1(1+x1)}//Expand//MatrixForm

DSolve[Lgu==0,u[x1,x2,x3],x]
DSolve[Lgfu==0,u[x1,x2,x3],x]

Common solution for (Subscript[L, g])h(x)=0 and (Subscript[L, g])(Subscript[L, f])h(x)=0 is

h=x1

f//MatrixForm//TeXForm

g//MatrixForm//TeXForm

h//TeXForm

Example 2 (a), Controllability from LTI

A=(({{0, 1, 1}, {-1, -1, 0}, {0, 0, -2}}));
B=(({{1}, {1}, {0}}));
x={x1,x2,x3};
z={z1,z2,z3};
Phi={ArcTan[x2],x1+x3,x2+x1}

sol=Solve[Phi==z,x]

f=Simplify[Collect[Expand[Grad[Phi,x].A.x/.sol[[1]]],z]];
g=Simplify[Collect[Expand[Grad[Phi,x].B/.sol[[1]]],z]];
f//MatrixForm
g//MatrixForm

adfg=Simplify[Grad[g,z].f-Grad[f,z].g];
adfg//MatrixForm

adffg=Simplify[Grad[adfg,z].f-Grad[f,z].adfg];
adffg//MatrixForm

gradu=Grad[u[z1,z2,z3],z];
DSolve[(gradu.g)[[1]]==0,u[z1,z2,z3],z]
DSolve[(gradu.adfg)[[1]]==0,u[z1,z2,z3],z]
DSolve[(gradu.adffg)[[1]]==0,u[z1,z2,z3],z]

z3-2 Tan[z1] -(z2-Tan[z1])

z3-(1/2)Tan[z1]-( z2+(1/2)Tan[z1])

z3+Tan[z1]-(z2+2 Tan[z1])

Solve[-z2+z3-Tan[z1]==a,z3]

Plot3D[a+z2+Tan[z1]/.{a->1},{z1,-1.5,1.5},{z2,-2,2}]

f//MatrixForm//TeXForm

g//MatrixForm//TeXForm

h//TeXForm

Example 2 (b), Controllability from LTI

A=(({{0, 1, 1}, {-1, -1, 0}, {0, 0, -2}}));
B=(({{1}, {1}, {0}}));
x={x1,x2,x3};
z={z1,z2,z3};
Phi={((x1+x2)/(x3+1)),x1+x3,x2+x3};

sol=Solve[Phi==z,x]

f=Simplify[Collect[Expand[Grad[Phi,x].A.x/.sol[[1]]],z]];
g=Simplify[Collect[Expand[Grad[Phi,x].B/.sol[[1]]],z]];
f//MatrixForm
g//MatrixForm

adfg=Simplify[Grad[g,z].f-Grad[f,z].g];
adfg//MatrixForm

adffg=Simplify[Grad[adfg,z].f-Grad[f,z].adfg];
adffg//MatrixForm

gradu=Grad[u[z1,z2,z3],z];
DSolve[(gradu.g)[[1]]==0,u[z1,z2,z3],z]
DSolve[(gradu.adfg)[[1]]==0,u[z1,z2,z3],z]
DSolve[(gradu.adffg)[[1]]==0,u[z1,z2,z3],z]

Simplify[(1/5) (5 z2-ArcSin[z1])+(1/5) (5 z3-ArcSin[z1])]

Simplify[(1/7) (7 z3-2 ArcSin[z1])+(1/7) (7 z2+ArcSin[z1])]

f//MatrixForm//TeXForm

g//MatrixForm//TeXForm

h//TeXForm

Example 3, Controllable manifold, fed-batch fermenter

μ=(x2/(K2 (x2^2)+x2+K1));
x={x1,x2,x3};
h=S;

f={μ x1,-((μ x1)/Y),0}
g={-(x1/x3),((Sf-x2)/x3),1}

adfg=Simplify[Grad[g,x].f-Grad[f,x].g];
adfg//MatrixForm

adffg=Simplify[Grad[adfg,x].f-Grad[f,x].adfg];
adffg//MatrixForm

gradu=Grad[u[x1,x2,x3],x];
DSolve[gradu.g==0,u[x1,x2,x3],x]
DSolve[gradu.adfg==0,u[x1,x2,x3],x]
DSolve[gradu.adffg==0,u[x1,x2,x3],x]

Expand[(((-Sf+x2)/x1)+(1/Y))*x1 x3]

Expand[(((x1+x2 Y)/Y)-Sf)*x3]

Solve[-Sf x3+x2 x3+((x1 x3)/Y)==a,x3]

Plot3D[((a Y)/(x1-Sf Y+x2 Y))/.{a->-4,Y->0.5,Sf->10},{x1,0,4},{x2,0,4},PlotRange->{{0,4},{0,4},{0,35}}]

f//MatrixForm//TeXForm

g//MatrixForm//TeXForm

h//TeXForm