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.

3.6 Differential Equations: dsolve • 75> y := ’y’;y := yMaple can also solve systems of differential equations. For example,solve the following system of two simultaneous, second order equations.> de_sys := { diff(y(x),x,x)=z(x), diff(z(x),x,x)=y(x) };de_sys := { d2dx 2 y(x) = z(x), d 2z(x) = y(x)}dx2 > soln := dsolve(de_sys, {z(x),y(x)});soln := {y(x) = _C1 e x + _C2 e (−x) + _C3 sin(x) + _C4 cos(x),z(x) = _C1 e x + _C2 e (−x) − _C3 sin(x) − _C4 cos(x)}If you solve the system without providing additional conditions, Mapleautomatically generates the appropriate constants _C1, . . . , _C4.Again, observe that you can easily extract and define the solutionswith the aid of eval and unapply:> y := unapply(eval(y(x), soln), x );y := x → _C1 e x + _C2 e (−x) + _C3 sin(x) + _C4 cos(x)> y(1);_C1 e + _C2 e (−1) + _C3 sin(1) + _C4 cos(1)and you can unassign it again when you are finished with it.> y := ’y’;y := y

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

Saved successfully!

Ooh no, something went wrong!