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.

6.2 Ordinary Differential Equations • 237ans := {x 2 (t) = 50121( 1110 t2 + 910 − 11 5 t + 1 5 cosh( 1 √ √−11 100 (t − 1)))10Heaviside(t − 1) + 2 11 − 2 11 cosh( 1 √ √−11 100 t), x1 (t)= − 1001Heaviside(t − 1) cosh(121 1010√ √−11 100 (t − 1))− 2 11 cosh( 1 10√ −11√100 t) + e (−1/10 √ −11 √ 100 t)+ e (1/10 √ −11 √ 100 t) 5 + Heaviside(t − 1) t211− 1011 Heaviside(t − 1) t + 2 11 + 155 Heaviside(t − 1)}121You can turn the above solution into two functions, say y 1 (t) andy 2 (t), as follows. First evaluate the expression x[1](t) at the solution toselect the x 1 (t) expression.> eval( x[1](t), ans );− 100121 Heaviside(t − 1) cosh( 1 √ √−11 100 (t − 1))10− 211 cosh( 1 √ √−11 100 t) + e (−1/10 √ −11 √ 100 t)10+ e (1/10 √ −11 √ 100 t) 5 + Heaviside(t − 1) t211− 1011 Heaviside(t − 1) t + 2 11 + 155 Heaviside(t − 1)121Then convert the expression to a function by using unapply.> y[1] := unapply( %, t );y 1 := t →− 100121 Heaviside(t − 1) cosh( 1 √ √−11 100 (t − 1))10− 211 cosh( 1 √ √−11 100 t) + e (−1/10 √ −11 √ 100 t)10+ e (1/10 √ −11 √ 100 t) 5 + Heaviside(t − 1) t211− 1011 Heaviside(t − 1) t + 2 11 + 155 Heaviside(t − 1)121

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

Saved successfully!

Ooh no, something went wrong!