Skip to content

Commit

Permalink
chap 6 updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziaeemehr committed Aug 17, 2024
1 parent 8a84f7b commit b1993c0
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions docs/examples/chap_06.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,17 @@
"\n",
"#### Step 2: Find the Nullclines\n",
"\n",
"- **Nullcline for $ \\frac{dx}{dt} = 0 $**: Set $ f(x, y) = 0 $.\n",
"- **Nullcline for $ \\frac{dy}{dt} = 0 $**: Set $ g(x, y) = 0 $.\n",
"- Nullcline for $\\frac{dx}{dt} = 0$ : Set $f(x, y) = 0$ .\n",
"- Nullcline for $\\frac{dy}{dt} = 0$ : Set $g(x, y) = 0$ .\n",
"\n",
"\n",
"#### Step 3: Use SymPy to Solve for Nullclines\n",
"\n",
"You can use `SymPy` to symbolically solve for $ y $ in terms of $x$ (or vice versa) where these equations are zero.\n",
"You can use `SymPy` to symbolically solve for $y$ in terms of $x$ (or vice versa) where these equations are zero.\n",
"\n",
"#### Step 4: Plot the Nullclines Using Matplotlib\n",
"\n",
"After finding the expressions for the nullclines, you can use `Matplotlib` to plot them over a grid of values for $ x $ and $ y $.\n",
"After finding the expressions for the nullclines, you can use `Matplotlib` to plot them over a grid of values for $x$ and $y$.\n",
"\n",
"#### Example\n",
"\n",
Expand All @@ -109,11 +110,11 @@
"\n",
"#### Explanation\n",
"\n",
"1. **Defining the system**: The functions $ f(x, y) $ and $ g(x, y) $ represent the right-hand side of the system of differential equations.\n",
"1. **Defining the system**: The functions $f(x, y)$ and $g(x, y)$ represent the right-hand side of the system of differential equations.\n",
"\n",
"2. **Finding nullclines**: We solve $ f(x, y) = 0 $ and $ g(x, y) = 0 $ for $ y $.\n",
"2. **Finding nullclines**: We solve $f(x, y) = 0$ and $g(x, y) = 0$ for $y$.\n",
"\n",
"3. **Plotting**: The nullclines are plotted using `Matplotlib`, with one set for $ \\frac{dx}{dt} = 0 $ and another for $ \\frac{dy}{dt} = 0 $.\n",
"3. **Plotting**: The nullclines are plotted using `Matplotlib`, with one set for $\\frac{dx}{dt} = 0$ and another for $\\frac{dy}{dt} = 0$.\n",
"\n",
"#### Tools Used\n",
"\n",
Expand Down Expand Up @@ -226,7 +227,7 @@
"metadata": {},
"source": [
"### adding an interactive trajectory solution\n",
"If you are getting messy output just comment the line @iteract()\n"
"If you are getting messy output just comment the line iteract()\n"
]
},
{
Expand Down Expand Up @@ -363,8 +364,8 @@
"### Explanation:\n",
"\n",
"1. **Step 1 (Equilibrium Points):** \n",
" - We define a system of equations $ \\frac{dX}{dt} = F(X) $. \n",
" - The equilibrium points are found by solving $ F(X) = 0 $.\n",
" - We define a system of equations $\\frac{dX}{dt} = F(X)$. \n",
" - The equilibrium points are found by solving $F(X) = 0$.\n",
"\n",
"2. **Step 2 (Jacobian Matrix):**\n",
" - The Jacobian matrix is calculated symbolically using `sympy.jacobian`.\n",
Expand Down Expand Up @@ -803,7 +804,7 @@
"\\end{align*}\n",
"$$\n",
"\n",
"where $\\tau = 20 $ ms, $\\tau_a = 4000$ ms.\n",
"where $\\tau = 20$ ms, $\\tau_a = 4000$ ms.\n",
"\n",
"for plotting the isoclines, we consider the first two equations and consider $A_1$ as a parameter."
]
Expand Down

0 comments on commit b1993c0

Please sign in to comment.