Here is a dierential equation and an initial

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: ln(_a ) + _C1 Use the explicit option to search for an explicit solution for the first result. > dsolve( {de2}, {y(x)}, explicit ); {y(x) = _C1 }, _Z y(x) = RootOf − 1 d_f + x + _C2 _f ln(_f ) + _C1 However, in some cases, Maple may not be able to find an explicit solution. There is also an implicit option to force answers to be returned in implicit form. The method=laplace Option Applying Laplace transform methods to differential equations often reduces the complexity of the problem. The transform maps the differential equations into algebraic equations, which are much easier to solve. The difficulty is in the transformation of the equations to the new domain, and especially the transformation of the solutions back. The Laplace transform method can handle linear ODEs of arbitrary order, and some cases of linear ODEs with non-constant coefficients, provided that Maple can find the transforms. This method can also solve systems of coupled equations. Consider the following problem in classical dynamics. Two weights with masses m and αm, respectively, rest on a frictionless plane joined by a spring with spring constant k . What are the trajectories of each weight if the first weight is subject to a unit step force u(t) at time t = 1? First, set up the differential equations that govern the system. Newton’s Second Law governs the motion of the first weight, and hence, the mass m times the acceleration must equal the sum of the forces that you apply to the first weight, including the external force u(t). > eqn1 := > alpha*m*diff(x[1](t),t$2) = k*(x[2](t) - x[1](t)) + u(t); eqn1 := α m ( d2 x1 (t)) = k (x2 (t) − x1 (t)) + u(t) dt2 244 • Chapter 7: Solving Calculus Problems Similarly for the second weight. > eqn2 := m*diff(x[2](t),t$2) = k*(x[1](t) - x[2](t)); eqn2 := m ( d2 x2 (t)) = k (x1 (t) − x2 (t)) dt2 Apply a unit step force to the first weight at t = 1. > u := t -> Heaviside(t-1); u := t → Heaviside(t − 1) At time t = 0, both masses are at rest at their respective locations. > ini := x[1](0) = 2, D(x[1])(0) = 0, > x[2](0) = 0, D(x[2])(0) = 0 ; ini := x1 (0) = 2, D(x1 )(0) = 0, x2 (0) = 0, D(x2 )(0) = 0 Solve the problem using Laplace transform methods. > dsolve( {eqn1, eqn2, ini}, {x[1](t), x[2](t)}, > method=laplace ); 1 x2 (t) = (−2 α m + t2 k + t2 k α − 2 t k − 2 t k α + k + α k 2 √ %1 (t − 1) ) m)Heaviside(t − 1) (k + 2 α cosh( αm √ %1 t α (−1 + cosh( )) 1 αm , x1 (t) = (2 m (1 + α)2 m) − 2 1+α 2 √ %1 (t − 1) − 2 cosh( ) m + t2 k + t2 k α − 2 t k − 2 t k α αm + k + α k )Heaviside(t − 1) (k m (1 + α)2 ) + ( √ √ √ √ %1 t ) αm e(− + e(− α m ) α + e( α m √ %1 t − 2 α cosh( ))/(1 + α) αm %1 t ) αm %1 t %1 t ) + e( α + 2α %1 := −α m k (1 + α) 7.2 Ordinary Differential Equations • 245 Evaluate the result at values for the constants. > ans := eval( %, {alpha=1/10, m=1, k=1} ); ans := {x2 (t) = ( √ 9 11 2 11 1 1√ + t− t + cosh( −11 100 (t − 1))) 10 10 5 5 10 √ 2...
View Full Document

Ask a homework question - tutors are online