ode2 12 dirac1 x 2 1 dirac3 x 4 x3 8 dirac2

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 := t → −e(−3 t) + e(−2 t) > y1(a); −e(−3 a) + e(−2 a) Verify that y1 is a solution to the ODE: > eval(ode1, y=y1); {0 = 0} and that y1 satisfies the initial conditions. > eval(ic, y=y1); {0 = 0, 1 = 1} Another method for solution checking is also available. Assign the new solution to y instead of y1. > y := unapply( eval(y(t), soln), t ); y := t → −e(−3 t) + e(−2 t) When you enter an equation containing y, Maple uses this function and evaluates the result, in one step. > ode1; {0 = 0} > ic; 3.6 Solving Differential Equations Using the dsolve Command • 73 {0 = 0, 1 = 1} To change the differential equation, or the definition of y (t), remove the definition with the following command. > y := ’y’; y := y With Maple, you can use special functions, such as the Dirac delta function, also called the impulse function, used in physics. > ode2 := 10^6*diff(y(x),x,x,x,x) = Dirac(x-2) > Dirac(x-4); ode2 := 1000000 ( d4 y(x)) = Dirac(x − 2) − Dirac(x − 4) dx4 Specify boundary conditions > bc := {y(0)=0, D(D(y))(0)=0, y(5)=0}; bc := {y(0) = 0, y(5) = 0, (D(2) )(y )(0) = 0} and an initial value. > iv := {D(D(y))(5)=0}; iv := {(D(2) )(y )(5) = 0} > soln := dsolve({ode2} union bc union iv, {y(x)}); 74 • Chapter 3: Finding Solutions soln := y(x) = − − − − − 1 Heaviside(x − 2) x3 6000000 1 1 Heaviside(x − 2) + Heaviside(x − 2) x 750000 500000 1 Heaviside(x − 2) x2 1000000 1 1 Heaviside(x − 4) x3 + Heaviside(x − 4) 6000000 93750 1 1 Heaviside(x − 4) x + Heaviside(x − 4) x2 125000 500000 1 1 x3 + x 15000000 1250000 > eval(y(x), soln); 1 1 Heaviside(x − 2) x3 − Heaviside(x − 2) 6000000 750000 1 + Heaviside(x − 2) x 500000 1 Heaviside(x − 2) x2 − 1000000 1 1 Heaviside(x − 4) x3 + Heaviside(x − 4) − 6000000 93750 1 1 − Heaviside(x − 4) x + Heaviside(x − 4) x2 125000 500000 1 1 x3 + x − 15000000 1250000 > y := unapply(%, x); y := x → − − − − − 1 Heaviside(x − 2) x3 6000000 1 1 Heaviside(x − 2) + Heaviside(x − 2) x 750000 500000 1 Heaviside(x − 2) x2 1000000 1 1 Heaviside(x − 4) x3 + Heaviside(x − 4) 6000000 93750 1 1 Heaviside(x − 4) x + Heaviside(x − 4) x2 125000 500000 1 1 x3 + x 15000000 1250000 3.6 Solving Differential Equations Using the dsolve Command • 75 This value of y satisfies the differential equation, the boundary conditions, and the initial value. > ode2; −12 Dirac(1, x − 2) − 1 Dirac(3, x − 4) x3 + 8 Dirac(2, x − 2) 6 + 24 Dirac(1, x − 4) + 4 Dirac(x − 2) − 4 Dirac(x − 4) − 6 Dirac(1, x − 4) x + 16 Dirac(2, x − 4) x − 2 Dirac(2, x − 4) x2 − 8 Dirac(2, x − 2) x 1 + 2 Dirac(2, x − 2) x2 + Dirac(3, x − 2) x3 6 32 4 + Dirac(3, x − 4) − Dirac(3, x − 2) − 8 Dirac(3, x − 4) x 3 3 2 + 2 Dirac(3, x − 2) x + 2 Dirac(3, x − 4) x − Dirac(3, x − 2) x2 + 6 Dirac(1, x − 2) x − 32 Dirac(2, x − 4) = Dirac(x − 2) − Dirac(x − 4) > simplify(%); Dirac(x − 2) − Dirac(x − 4) = Dirac(x − 2) − Dirac(x − 4) > bc; {0 = 0} > iv; {0 = 0} > plo...
View Full Document

This note was uploaded on 08/27/2012 for the course MATH 1100 taught by Professor Nil during the Spring '12 term at National University of Singapore.

Ask a homework question - tutors are online