DIFFERENTIAL EQUATIONS

Graphmatica also provides the ability to approximate the solutions of up to fourth-order ordinary differential equations. [I will not provide background material on this function because if you need to use it, you probably know more about differential equations than I do.] To let the parser know you want to graph a differential equation, you must include the differential `dx` (which actually represents `dx/dt`) as one of your variables. If you specify an equation as

`dx = f(x,t)`

where `f(x,t)` is some combination of the variables x and t (such as `x^3 + t` or `t * x` ) and do not include the domain operator `{ , }`, the program will draw a slope field for dx/dt = f(x,t), with t as the horizontal axis and x the vertical.

If you do include a "domain" `{m, n}` , however, it will not be interpreted as a domain but will instead indicate that you want to graph a specific solution to the initial-value problem `x(m)=n` by Runge-Kutta approximation.

Graphmatica will also solve second, third, and fourth order initial-value problems using a Runge-Kutta method for linear systems. To specify a second or higher order derivative, use the variables `d2x`, `d3x`, or `d4x`. Remember that for an nth order equation, you must also specify n+1 initial values. You can type these into the equation using the "domain" notation described above; the order of values is `t`, `x`, `dx`, `d2x`, `d3x`. Thus `d2x + x=0 {0,0,1}` graphs a sine curve as the solution to d²x/dt² + x = 0 for x = 0 and dx/dt = 1 at t=0.

Note: You can also use the notation `dy = f(y,x)` if you prefer; both sets of variables are automatically recognized as differential equations.

You can also choose the initial value point and first derivative using the mouse. See Setting the initial value... for details.

The algorithm used to compute the approximation is the 4th order Runge-Kutta routine with adaptive step size documented in chapter 15 of Numerical Recipes in C.

kSoft, Inc. ksoft@graphmatica.com Last updated: Sun 11 Jun 2017