11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.2 Ordinary Differential Equations • 265The Heaviside Step Function Using the Heaviside function allows youto model delayed and piecewise-defined forcing functions. You can useHeaviside with dsolve to find both symbolic and numeric solutions.> eq := diff(y(t),t) = -y(t)*Heaviside(t-1);eq := d y(t) = −y(t) Heaviside(t − 1)dt> ini := y(0) = 3;ini := y(0) = 3> dsolve({eq, ini}, {y(t)});((−t+1) Heaviside(t−1))y(t) = 3 eConvert the solution to a function that can be plotted.> rhs( % );((−t+1) Heaviside(t−1))3 e> f := unapply(%, t);((−t+1) Heaviside(t−1))f := t → 3 e> plot(f, 0..4);32.521.510.50 1 2 3 4Solve the same equation numerically.

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

Saved successfully!

Ooh no, something went wrong!