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.

258 • Chapter 6: Examples from Calculussol1 := proc(x_rkf45 ) . . . end procYou can use the odeplot command from the plots package to plot thesolution.> with(plots):> odeplot( sol1, [t, y(t)], 0..4 );32.52y1.510.50 1 2 3 4tThe Dirac Delta Function You can use the Dirac delta function ina manner similar to the Heaviside function above to produce impulsiveforcing functions.> eq := diff(y(t),t) = -y(t)*Dirac(t-1);eq := d y(t) = −y(t) Dirac(t − 1)dt> ini := y(0) = 3;ini := y(0) = 3> dsolve({eq, ini}, {y(t)});y(t) = 3 e (−Heaviside(t−1))Convert the solution to a function that can be plotted.> f := unapply( rhs( % ), t );

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

Saved successfully!

Ooh no, something went wrong!