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.

260 • Chapter 6: Examples from CalculusPiecewise Functions The piecewise command allows you to constructcomplicated forcing functions by approximating sections of it with analyticfunctions, and then taking the approximations together to representthe whole function. First, look at the behavior of piecewise.> f:= x -> piecewise(1 plot(f, 0..3);10.80.60.40.200.5 1 1.5 2 2.5 3Thus, you can use this piecewise function as a forcing function.> eq := diff(y(t),t) = 1-y(t)*f(t);eq := d ({ )1, if 1 − t ≤ 0 and t − 2 < 0;dt y(t) = 1 − y(t) 0, otherwise.> ini := y(0)=3;ini := y(0) = 3> sol3 := dsolve({eq, ini}, {y(t)}, type=numeric);

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

Saved successfully!

Ooh no, something went wrong!