You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs_classic/tutorial_toolbox/joint_equations.ipynb
+177-2Lines changed: 177 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@
24
24
"id": "c9df7780",
25
25
"metadata": {},
26
26
"source": [
27
-
"In a [dynamical system](../tutorial_building/dynamical_systems.ipynb), there may be multiple variables that change dynamically over time. Sometimes these variables are interconnected, and updating one variable requires others as the input. For example, in the widely known Hodgkin–Huxley model, the variables $V$, $m$, $h$, and $n$ are updated synchronously and interdependently (please refer to [Building Neuron Models](../tutorial_building/neuron_models.ipynb)for details). To achieve higher integral accuracy, it is recommended to use ``brainpy.JointEq`` to jointly solving interconnected differential equations."
27
+
"In a [dynamical system](../tutorial_building/dynamical_systems.ipynb), there may be multiple variables that change dynamically over time. Sometimes these variables are interconnected, and updating one variable requires others as the input. For example, in the widely known Hodgkin\u2013Huxley model, the variables $V$, $m$, $h$, and $n$ are updated synchronously and interdependently (please refer to [Building Neuron Models](../tutorial_building/neuron_models.ipynb)for details). To achieve higher integral accuracy, it is recommended to use ``brainpy.JointEq`` to jointly solving interconnected differential equations."
28
28
]
29
29
},
30
30
{
@@ -304,6 +304,181 @@
304
304
"It is shown in this output code that second differential values of $v$ and $u$ are calculated by using the updated values (`k2_V_arg` and `k2_u_arg`) at the same time. This will result in a more accurate integral."
305
305
]
306
306
},
307
+
{
308
+
"cell_type": "markdown",
309
+
"id": "second_order_ode_title",
310
+
"metadata": {},
311
+
"source": [
312
+
"## Second-Order ODEs with `brainpy.JointEq`\n",
313
+
"\n",
314
+
"A common use case for `JointEq` is solving second-order ordinary differential equations (ODEs). ",
315
+
"Second-order ODEs appear in many physical systems, such as the harmonic oscillator, pendulum, ",
316
+
"or neural mass models like the Jansen-Rit model.\n",
317
+
"\n",
318
+
"When using `JointEq` for second-order ODEs, it's important to follow the correct function signature pattern."
319
+
]
320
+
},
321
+
{
322
+
"cell_type": "markdown",
323
+
"id": "second_order_example",
324
+
"metadata": {},
325
+
"source": [
326
+
"### Example: Harmonic Oscillator\n",
327
+
"\n",
328
+
"Consider a damped harmonic oscillator described by:\n",
0 commit comments