File:VanDerPol PincareSection FixedPoint.svg
Summary
| Description |
English: Phase portrait of van der Pol equation of the following form:
|
| Date | |
| Source | Own work |
| Author | Yapparina |
| Python source | import matplotlib.pyplot as plt
from scipy.integrate import odeint
import numpy as np
def VanDerPol(x, t):
dxdt = x[1] - x[0] ** 3 + x[0]
dydt = -x[0]
return(np.array([dxdt, dydt]))
t = np.linspace(0, 50, 1000)
xint = [-2.5, 1.2]
xint2 = [0, -0.2]
orbit = odeint(VanDerPol, xint, t)
orbit2 = odeint(VanDerPol, xint2, t)
n = 100
gmax = 2.5
x = np.linspace(-gmax, gmax, n)
y = np.linspace(-gmax, gmax,n)
X,Y = np.meshgrid(x,y)
dXdt = Y - X**3 + X
dYdt = -X
fig, ax = plt.subplots()
ax.plot(orbit[:,0], orbit[:,1])
ax.plot(orbit2[:,0], orbit2[:,1])
plt.streamplot(X, Y, dXdt, dYdt, density = 1, linewidth = 0.8, color='gray')
plt.show()
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
| This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
| The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
|