Interactive plotting of solutions of a differential equation

### 18.9.2 Interactive plotting of solutions of a differential equation

The interactive_plotode or interactive_odeplot command draws interactive tangent fields of differential equations.

- interactive_plotode takes two arguments:
  - expr an expression depending on two or three variables, a time variable and one or two dependent variables.
  - vars, a list of the time variable and the dependent variable.
- interactive_plotode(expr,vars) draws the tangent field of the differential equation y′=expr (where y is the dependent variable) in a new window. In this window, one can click on a point to get the plot of the solution of y′=expr passing through this point.

  You can further click to display several solutions. To stop, press the Esc key.

#### Example

interactive_plotode(sin(t/y),[t,y])

Solutions of the differential equation can be plotted by clicking on an initial point in the graphic screen (see Section 18.1.1).