Using the d operator enter the above equation into

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: 2 1√ Heaviside(t − 1) + − cosh( −11 100 t), x1 (t) 11 11 10 50 = 121 √ 11 2 11 31 1√ −11 100 (t − 1)) + ( − 2 cosh( t− t) 10 10 10 5√ √ √ √ Heaviside(t − 1) + e(−1/10 −11 100 t) + e(1/10 −11 100 t) √ 2 2 1√ + −11 100 t)} − cosh( 11 11 10 You can turn the above solution into two functions, say y1 (t) and y2 (t), as follows. First evaluate the expression x[1](t) at the solution to select the x1 (t) expression. > eval( x[1](t), ans ); 50 121 √ 1√ 11 2 11 50 31 ( − 2 cosh( −11 100 (t − 1)) + t− t) 121 10 10 10 5 √ √ √ √ Heaviside(t − 1) + e(−1/10 −11 100 t) + e(1/10 −11 100 t) √ 2 1√ 2 − cosh( −11 100 t) + 11 11 10 Then convert the expression to a function by using unapply. > y[1] := unapply( %, t ); y1 := t → ( √ 31 1√ 11 2 11 − 2 cosh( t− t) −11 100 (t − 1)) + 10 10 10 5√ √ √ √ Heaviside(t − 1) + e(−1/10 −11 100 t) + e(1/10 −11 100 t) √ 2 2 1√ + − cosh( −11 100 t) 11 11 10 You can also perform the two steps at once. 50 121 246 • Chapter 7: Solving Calculus Problems > y[2] := unapply( eval( x[2](t), ans ), t ); y2 := t → ( √ 9 11 2 11 1 1√ + t− t + cosh( −11 100 (t − 1))) 10 10 5 5 10 √ 2 2 1√ −11 100 t) Heaviside(t − 1) + − cosh( 11 11 10 Plot the two functions. > plot( [ y[1](t), y[2](t) ], t=-3..6 ); 14 12 10 8 6 4 2 –2 0 2 t 4 6 50 121 Instead of using dsolve(..., method=laplace), you can use the Laplace transform method by hand. The inttrans package defines the Laplace transform and its inverse (and many other integral transforms). > with(inttrans); [addtable , fourier , fouriercos , fouriersin , hankel , hilbert , invfourier , invhilbert , invlaplace , invmellin , laplace , mellin , savetable ] The Laplace transforms of the two differential equations eqn1 and eqn2 are > laplace( eqn1, t, s ); α m (s2 laplace(x1 (t), t, s) − D(x1 )(0) − s x1 (0)) = k (laplace(x2 (t), t, s) − laplace(x1 (t), t, s)) + and e(−s) s 7.2 Ordinary Differential Equations > laplace( eqn2, t, s ); • 247 m (s2 laplace(x2 (t), t, s) − D(x2 )(0) − s x2 (0)) = k (laplace(x1 (t), t, s) − laplace(x2 (t), t, s)) Evaluate the set consisting of the two transforms at the initial conditions. > eval( {%, %%}, {ini} ); {α m (s2 laplace(x1 (t), t, s) − 2 s) = k (laplace(x2 (t), t, s) − laplace(x1 (t), t, s)) + m s2 laplace(x2 (t), t, s) = k (laplace(x1 (t), t, s) − laplace(x2 (t), t, s))} You must solve this set of algebraic equations for the Laplace transforms of the two functions x1 (t) and x2 (t). > sol := solve( %, { laplace(x[1](t),t,s), > laplace(x[2](t),t,s) } ); e(−s) , s sol := {laplace(x1 (t), t, s) = laplace(x2 (t), t, s) = (m s2 + k ) (2 α m s2 es + 1) , es s3 m (k + α m s2 + α k ) k (2 α m s2 es + 1) } es s3 m (k + α m s2 + α k ) Maple has solved the algebraic problem. You must take the inverse Laplace transform to get the functions x1 (t) and x2 (t) . > invlaplace( %, s, t ); 248 • Chapter 7: Solving Calculus Problems 1 (−2 α m + t2 k + t2 k α − 2 t k − 2 t k α + k 2 √ %1 (t − 1) + ...
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