12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

244 • Chapter 6: Examples from Calculusini := x(1) = 2The output from the dsolve command with the numeric option is aprocedure that returns a list of equations.> sol := dsolve( {eq, ini}, {x(t)}, type=numeric );sol := proc(x_rkf45 ) . . . end procThe solution satisfies the initial condition.> sol(1);[t = 1., x(t) = 2.]> sol(0);[t = 0., x(t) = 1.82574790049820024]Use the eval command to select a particular value from the list ofequations.> eval( x(t), sol(1) );2.You can also create an ordered pair.> eval( [t, x(t)], sol(0) );[0., 1.82574790049820024]The plots package contains a command, odeplot, for plotting theresult of dsolve( ..., type=numeric).> with(plots):> odeplot( sol, [t, x(t)], -1..2 );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!