ODE4-net.nb Phase Portraits of Nonlinear Differential Equations Nonlinear Differential Equations: x' = f (x, y) (1) Consider the system where f and g are functions of two y' = g(x, y) () variables x and y. Assume that f and g are not both linear. The functions x and y are functions of time t and the derivatives are also taken x' (t) = f (x(t), y(t)) (1) with respect to the variable t. y' (t) = g(x(t), y(t)) (). x' = ax + by (1) A linear system with invertible coefficient matrix has only y' = cx + dy () one equilibrium point (critical point, steady state solution) at (x,y)=(,). Analyzing the stability of this equilibrium solutions gives complete information about the Phase Portrait of the ODE (the trajectories). Unlike a linear system, a nonlinear system could have none, one, two, three, or any number of critical points. Like a linear system, however, the critical points are found by setting x = y =, and solve the resulting system f(x,y)= and g(x,y)=. Since there might be multiple critical points present on the phase portrait, each trajectory could be influenced by more than one critical point. This results in a much more chaotic appearance of the phase portrait. Consequently, the type and stability of each critical point need to be determined locally (in a small neighborhood on the phase plane around the critical point in question) on a caseby-case basis. The trajectories will appear very differently than those of the linear systems, except very near the critical points. General Strategy : We approximate the nonlinear system by a linear system near the equilibirum points. Suppose that (a, b) is an equilibrium point, that is f(a, b) = g(a, b) =. x' = f (x, y) f (a.b) + ' x f (a, b) (x ( a) + ' y f (a, b) (y ( b) = ' x f (a, b) (x ( a) + ' y f (a, b) (y ( b) y' = g(x, y) g(a, b) + ' x g(a, b) (x ( a) + ' y g(a, b) (y ( b) = ' x g(a, b) (x ( a) + ' y g(a, b) (y ( b) The critical point can be translated to via the coordinate change x := x - a and y := y - b and still retains all of its properties. The approximated system becomes a linear system: x' = ' x f (a, b) x + ' y f (a, b) y (1) with coefficient matrix y' = ' x g(a, b) x + ' y g(a, b) y () J (a,b) = x f(a, b) y f(a, b) x g(a, b) y g(a, b). The matrix J (x,y) = x f(x, y) y f(x, y) is called the Jacobian x g(x, y) y g(x, y) matrix of the system. It contains the first order partial derivatives of f and g evaluated at the point (x,y). We can use the eigenvalues of the matrix Jacobian matrix to decide the type and stability of the critical point (a,b). Let " and # be the two eigenvalues. Assume that " and # are different from. Eigenvalues Linear System NonlinearSyste λ, μ!! Real λ > μ > Nodal Source (Unstable) Nodal Source (Unstab λ < μ < Nodal Sink (Stable) Nodal Sink (Stable) λ > > μ Saddle point (Unstable) Saddle point (Unstable λ = μ > Degenerate Source or Nodal Source (Unstable) dependingof the geometric multiplicity of # Source (Degenerate, Nodal, Spiral Sou dependingon the nonlinearterms and the λ = μ < Degenerate Sink or Nodal Sink (Stable) dependingof the geometric multiplicity of # (1) () Sink (Degenerate, Nodal, Spiral Sink) (S dependingon the nonlinearterms and the
ODE4-net.nb 3 4 ODE4-net.nb λ, μ!! Complex Re (λ) > Spiral Source (Unstable) Spiral Source (Unstab Re (λ) < Spiral Sink (Stable) Spiral Sink (Stable) Re (λ) = Center (Stable) Center, Spiral Sink, Spiral Source (Stability cannot be determined based o Check also the Bifurcation Diagram on Wikipedia. Hyperbolic critical point Definition: The equilibrium is said to be hyperbolic if all eigenvalues of the Jacobian matrix have non - zero real parts. Hyperbolic equilibria are robust : Small perturbations do not change qualitatively the phase portrait near the equilibria. Moreover, local phase portrait of a hyperbolic equilibrium of a nonlinear system is equivalent to that of its linearization. This statement has a mathematically precise form known as the Hartman - Grobman Theorem. Examples of nonlinear differential equations: Example 1. Solve the system x' = x(1 ( y) (1) y' = y(x ( 1) () Usually an explicit solution cannot be found, but you can still ask Mathematica to find a numeric solution using the NDSolve command. DSolve[{x'[t]. x[t] (1 / y[t]), y'[t]. y[t] (x[t] / 1), x[]. 1, y[]. 1}, {x[t], y[t]}, t] Solve::ifun: Inverse functionsare beingused by Solve, so some solutionsmay notbe found; use Reduce forcompletesolutioninformation. ) Solve::ifun: Inverse functionsare beingused by Solve, so some solutionsmay notbe found; use Reduce forcompletesolutioninformation. ) Solve::ifun: Inverse functionsare beingused by Solve, so some solutionsmay notbe found; use Reduce forcompletesolutioninformation. ) General::stop: Furtheroutputof Solve::ifunwillbe suppressedduringthiscalculation. ) DSolve::bvnul: For some branchesof thegeneralsolution, thegivenboundaryconditionslead toan emptysolution. ) {} NDSolve[{x'[t]. x[t] (1 / y[t]), y'[t]. y[t] (x[t] / 1), x[]., y[]. 1}, {x[t], y[t]}, {t,, 1}] x[t] & InterpolatingFunction y[t] & InterpolatingFunction Domain: {{., 1.}} Domain: {{., 1.}} [t], [t] The most reliable information here comes from the Vector Field Plot. 4 # #4 StreamPlot[{x (1 / y), y (x / 1)}, {x, /5, 5}, {y, /5, 5}, StreamScale 1 Automatic, StreamPoints 1 {{{{4, 1}, Red}, Automatic}}] #4 # 4 What is the nature of the equilibrium solutions?
ODE4-net.nb 5 6 ODE4-net.nb What is the nature of the equilibrium solutions? 1. Set x' = and y' =. In this case, it is easy to solve the equation by hand: x(1- y)= and y(x-1)= implies (x,y)=(,) or (x,y)=(1,1). For more complicated cases, we will use Solve[..] or NSolve[..] EqPoints = Solve[{x (1 / y)., y (x / 1). }, {x, y}] {{x &, y & }, {x & 1, y & 1}}. Next we find the Jacobian matrix of the system. In this case, it is easy to compute it by hand: J (x,y) = x (x (1 / y)) y (x (1 / y)) 1 / y /x = x (y (x / 1)) y (y (x / 1)) y x / 1 In more complicated cases, we will ask Mathematica to compute the Jacobian matrix for us, as follows : The commands D[f[x], {x}] or f'[x] give the dervative of f with respect to x. If f is a function of several variables, D[f[x, y], {x}] or y (f[x, y]) gives the partial derivative of f with respect to x. Try them out! 3. We evaluate the Jacobian matrix at the two equilibrium points and find its eigenvalues: B = J[f] 5. Flatten[EqPoints[[1]]]; Print["The Jacobian Matrix at the equilibrium point (,) is ", MatrixForm[B]] Print["The eigenvalues of B are ", Eigenvalues[B]] The Jacobian Matrix at the equilibrium point (,) is 1 *1 The eigenvalues of B are {*1, 1} T = J[f] 5. Flatten[EqPoints[[]]]; Print["The Jacobian Matrix at the equilibrium point (1,1) is ", MatrixForm[ T]] Print["The eigenvalues are ", Eigenvalues[T]] The Jacobian Matrix at the equilibrium point (1,1) is *1 1 The eigenvalues are {, *} y x y + y^ D[y^, {y}] The following code computes the Jacobian matrix: Clear[f, J, x, y] f[x_, y_] := {x (1 / y), y (x / 1)} J[f_] := Module[{A = Table[,, ]}, A[[1, 1]] = D[f[x, y][[1]], {x}]; A[[1, ]] = D[f[x, y][[1]], {y}]; A[[, 1]] = D[f[x, y][[]], {x}]; A[[, ]] = D[f[x, y][[]], {y}]; Return[A]] J[f] {{1 * y, *x}, {y, *1 + x}}
ODE4-net.nb 7 8 ODE4-net.nb By analyzing the Real and Imaginary Part of the Eigenvalues, we conclude that the point (, ) is a saddle (the Jacobian matrix has two real eigenvalues, one smaller than, one greater than ) whereas the point (1, 1) is a center (the Jacobian matrix has two complex conjugate eigenvalues with Real part equal to, and the Phase Portrait depicts closed circular trajectories). This gives us information about the shape of trajectories in a vecinity of the equilibrium solutions. Example : 1 StreamPlot[{y / x (x^ + y^), /x / y (x^ + y^) }, {x, /, }, {y, /, }, StreamPoints 1 {{{{1, }, Red}, Automatic}}] x' = y ( x(x^ + y^) (1) Consider the system. Study the nature of the y' = (x ( y(x^ + y^) () critical point (x,y)=(,). Clear[h] h[x_, y_] := {y / x (x^ + y^), /x / y (x^ + y^)} NSolve[{y / x (x^ + y^)., /x / y (x^ + y^). }, {x, y}] MatrixForm[J[h]] Eigenvalues[J[h] 5. {x 1, y 1 }] {{x &., y &.}} *3 x * y 1 * x y *1 * x y *x * 3 y {, *} #1 # # #1 1
ODE4-net.nb 9 1 ODE4-net.nb sol = NDSolve[{x'[t] == y[t] / x[t] (x[t]^ + y[t]^), y'[t] == /x[t] / y[t] (x[t]^ + y[t]^), x[]. 1, y[]. }, {x[t], y[t]}, {t,, 1}] ParametricPlot[{x[t], y[t]} 5. Flatten[sol], {t,, 1}, PlotPoints 1 1] StreamPlot[{y + x (x^ + y^), /x + y (x^ + y^) }, {x, /, }, {y, /, }] x[t] & InterpolatingFunction Domain:., 1. 1 3 [t], 1 y[t] & InterpolatingFunction Domain:., 1. 1 3 [t].3. #1.1 # #.4 #.3 #. #.1.1..3 # #1 1 #.1 #. #.3 x(y / x (x^ + y^)) + y(/x / y (x^ + y^)) *4 x * 4 y Clear[h] h[x_, y_] := {y + x (x^ + y^), /x + y (x^ + y^)} MatrixForm[J[h]] Eigenvalues[J[h] 5. {x 1, y 1 }] 3 x + y 1 + x y *1 + x y x + 3 y {, *}
ODE4-net.nb 11 1 ODE4-net.nb Conclusions : The linearized system has a center at the origin. The nonlinear system does not have a center. Example 3 Consider the system and study their nature. x' = x + y ( x(x^ + y^) (1). Find all critical points y' = (x + y ( y(x^ + y^) () Clear[h] h[x_, y_] := {x + y / x (x^ + y^), /x + y / y (x^ + y^)} NSolve[{y / x (x^ + y^)., /x / y (x^ + y^). }, {x, y}] MatrixForm[J[h]] Eigenvalues[J[h] 5. {x 1, y 1 }] StreamPlot[h[x, y], {x, /, }, {y, /, }] {{x &., y &.}} 1 * 3 x * y 1 * x y *1 * x y 1 * x * 3 y {1 +, 1 * } Conclusions : The origin is an spiral source (unstable spiral point) for both the linear system and the nonlinear system. One may therefore think that all trajectories different from should spiral out to infinity. This is clearly not the case, as far away from the origin, the arrows are pointing inward. Moreover, there is a closed trajectory (a circle) and all trajectories different from (,) spiral towards this circle (limit cycle). You can find the equation of this limit cycle by switching to polar coordinates x=rcos', y=rsin'. The literature on the existence and properties of limits cycles is very rich: Poincare - Bendixon Theorem Suppose f and g have continuous partial derivatives. a) Every closed trajectory must enclose at least one critical point. If it encloses exactly one critical point, then this cannot be a saddle point. b) If ( x f + ( y g has the same sign in a disk D, then there can be no closed trajectory of the system lying entirely inside D. c) Suppose that U is a connected open subset that contains no critical point of the system. Let U denote the set U together with its boundary. If the vector field in U points towards the interior of U, then U contains a closed trajectory. d) Suppose that U is a connected open subset that contains no critical point of the system. Let U denote the set U together with its boundary. If there exists some trajectory that never leaves the set U (is trapped inside U), then U must necessarily contain a closed trajectory. 1 Exercise : x' = y (1) Consider the system. Find all critical points (x,y) of the y' = (y ( sin(x) () system which belong to the region -$ < x,y < $. Study the nature of these critical points (type, stability). Use only Mathematica commands, even when computing the solutions! #1 # # #1 1 Conclusions : The origin is an spiral source (unstable spiral point) for both the linear system and the nonlinear system. One may therefore think that all trajectories different from should spiral out to infinity. This is clearly not the case, as far away from the origin, the arrows are pointing inward. Moreover, there is a closed trajectory (a circle) and all trajectories different from (,) spiral towards this circle (limit cycle). You can find the equation of this limit cycle by switching to polar coordinates x=rcos', y=rsin'.