Stat/Math
Software Support
Software Consulting
Software Availability
Software Price
Contact

User Support
Documentation
Knowledge Base
Education
Consulting
Podcasts

Systems & Services
Cyberinfrastructure
Supercomputers
Grid Computing
Storage
Visualization
Digital Libraries & Data

Results & Impact
Publications
Grants & Grant Info
Events & Outreach
Economic Impact
Survey Results

Vision & Planning
News & Features

# Maple ODE Examples

Here's a basic ODE:

> deq := diff(y(x),x) + y(x) = 0: deq;

Here's the basic form of the command for solving differential equations:

> soln := dsolve( deq, y(x) );

We can add initial conditions, to determine the "integration constant" _C1:

> subs(x=0, y(0)=y0, soln); solve(", _C1): subs(_C1=", soln);

This could be done in one step:

> dsolve( {diff(y(x),x) + y(x) = 0, y(0)=y0}, y(x) );
> dsolve({diff(y(x),x\$2) + y(x) = x*cos(x), y(0) = y0, D(y)(0) = v0}, y(x));
> sys := diff(y(x),x)=z(x), diff(z(x),x)=y(x): sys;
inits := y(0)=0, z(0)=1: inits;
fcns := {y(x), z(x)}:
> dsolve({sys} union {inits}, fcns);
> dsolve({sys, y(0)=0, z(0)=1}, fcns, type=series);

This next example (the pendulum equation) is not solvable in terms of elementary functions. Maple obtains a "reduction to quadratures" for the inverse functions.

> dsolve({diff(y(x),x\$2) + sin(y(x)) = 0}, y(x));