{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Economics Dynamics Problems 92

Economics Dynamics Problems 92 - dsolve command it is...

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

View Full Document Right Arrow Icon
76 Economic Dynamics Table 2.7 Maple input instructions for second-order differential equations Problem Input instructions (i) d 2 y dt 2 + 4 dy dt 5 y = 0 dsolve(diff(y(t),t$2)+4*diff(y(t),t)- 5*y(t)=0,y(t)); (ii) y ( t ) + 4 y ( t ) + 4 y ( t ) = 0 dsolve(diff(y(t),t$2)+4*diff(y(t),t)+ 4*y(t)=0,y(t)); (iii) y ( t ) + 2 y ( t ) + 2 y ( t ) = 0 dsolve(diff(y(t),t$2)+2*diff(y(t),t)+ 2*y(t)=0,y(t)); (iv) y ( t ) + y ( t ) = t dsolve(diff(y(t),t$2)+diff(y(t),t)= t,y(t)); Table 2.8 Maple input instructions for second-order initial value problems Problem Input instructions (i) d 2 y dt 2 + 4 dy dt 5 y = 0 , dsolve( { diff(y(t),t$2)+4*diff(y(t),t)- y (0) = 0 , y (0) = 1 5*y(t)=0,y(0)=0,D(y)(0)=1 } ,y(t)); (ii) y ( t ) + 4 y ( t ) + 4 y ( t ) = 0 , dsolve( { diff(y(t),t$2)+4*diff(y(t),t)+ y (0) = 3 , y (0) = 7 4*y(t)=0,y(0)=3,D(y)(0)=7 } ,y(t)); 2.12.3 dsolve(. . . , numeric) Many differential equations, especially nonlinear and nonautonomous differential equations, cannot be solved by any of the known solution methods. In such cases a numerical approximation can be provided using the dsolve(. . . , numeric) com- mand. In using the numerical version of the dsolve
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: dsolve command, it is necessary to provide also the initial condition. Given the following initial value problem, dy dt = f ( y ( t ) , t ) y (0) = y the input instruction is dsolve({diff(y(t),t)=f(y(t),t),y(0)=y0},y(t),numeric); Maple provides output in the form of a proc function (i.e. a procedural function) that represents an approximate function obtained using interpolation. This proce-dure can then be plotted. Since it is usual to plot such a procedural function, it is useful to give the output a name. Furthermore, since the plot is of a procedural function, it is necessary to use the odeplot rather than simply the plot command. In order to do this, however, it is ±rst necessary to load the plots subroutine with the following instruction. with(plots): For example, given the problem dy dt = sin(3 t − y ) y (0) = . 5 , t ∈ [0,10]...
View Full Document

{[ snackBarMessage ]}