11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

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 Solving Differential Equations Using the dsolve Command • 71mean a~. In <strong>Maple</strong>, single quotes delay evaluation. In this case, theyensure that <strong>Maple</strong> interprets the second a as a and not as a~.Now that you have removed the assumption on a inside ans, you canremove the assumption on a itself by assigning it to its own name.> a := ’a’:Use single quotes here to remove the assumption on a. For more informationon assumptions, see 6.2 Assumptions.3.6 Solving Differential Equations Using thedsolve Command<strong>Maple</strong> can symbolically solve many ordinary differential equations (ODEs),including initial value and boundary value problems.Define an ODE. Note that the diff command and not the inert formDiff is used in this example.> ode1 := {diff(y(t),t,t) + 5*diff(y(t),t) + 6*y(t) = 0};ode1 := {( d2dt 2 y(t)) + 5 ( d y(t)) + 6 y(t) = 0}dtDefine initial conditions.> ic := {y(0)=0, D(y)(0)=1};ic := {D(y)(0) = 1, y(0) = 0}Solve with dsolve by using the union operator to form the union ofthe two sets.> soln := dsolve(ode1 union ic, {y(t)});soln := y(t) = −e (−3 t) (−2 t)+ eTo evaluate the solution at points or plot it, first use the unapplycommand to define a proper <strong>Maple</strong> function. For more information, see3.1 The <strong>Maple</strong> solve Command.To extract a value from a solution set, use the eval command.

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

Saved successfully!

Ooh no, something went wrong!