vanDerPol | R Documentation |
The derivative function of the Van der Pol Oscillator, an example of a two-dimensional autonomous ODE system.
vanDerPol(t, y, parameters)
t |
The value of t, the independent
variable, to evaluate the derivative at. Should be a
|
y |
The values of x and
y, the dependent variables, to evaluate
the derivative at. Should be a |
parameters |
The values of the parameters of the system. Should be a
|
vanDerPol
evaluates the derivative of the following ODE at the point
(t, x, y):
Its format is designed to be compatible with ode
from
the deSolve
package.
Returns a list
containing the values of the two
derivatives at
(t, x, y).
Michael J Grayling
ode
# Plot the velocity field, nullclines and several trajectories. vanDerPol_flowField <- flowField(vanDerPol, xlim = c(-5, 5), ylim = c(-5, 5), parameters = 3, points = 15, add = FALSE) y0 <- matrix(c(2, 0, 0, 2, 0.5, 0.5), 3, 2, byrow = TRUE) vanDerPol_nullclines <- nullclines(vanDerPol, xlim = c(-5, 5), ylim = c(-5, 5), parameters = 3, points = 500) vanDerPol_trajectory <- trajectory(vanDerPol, y0 = y0, tlim = c(0, 10), parameters = 3) # Plot x and y against t vanDerPol_numericalSolution <- numericalSolution(vanDerPol, y0 = c(4, 2), tlim = c(0, 100), parameters = 3) # Determine the stability of the equilibrium point vanDerPol_stability <- stability(vanDerPol, ystar = c(0, 0), parameters = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.