This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: LAB #4 First Order Linear Differential Equations Goal : Introduction to symbolic routines in Maple to solve differential equations; differ ences in linear and nonlinear differential equations; solutions to homogeneous equations; particular solutions Required tools : Solutions of first order linear equations; Maple routines: diff, int, dsolve, evalf, subs ; Existence and Uniqueness Theorems for First Order Linear Equa tions; dfield . Discussion In this lab you will use the mathematical software program Maple and some of its routines to study first order linear differential equations: y + p ( x ) y = q ( x ) ( * ) Here are a few Maple useful routines (use the correct syntax): (i) Differentiating functions : > f(x):=diff(x*exp(2*x),x) ; Produces d dx xe 2 x , sets it equal to f ( x ). (ii) Integrating functions : > g(x):=int(f(x),x); Produces the integral of the function f ( x ), without the “+ C ”. (iii) Writing a differential equation : > equ1:=diff(y(x),x)+x ∧ 2*y(x)=x ∧ 2; Sets the differential equation y + x 2 y = x 2 as “equ1”. (iv) Solving a differential equation : > dsolve(equ1,y(x)); Solves the differential equation defined by “equ1”. Note that the constants will appear as C 1 , C 2 , C 3, etc (instead of C 1 ,C 2 ,C 3 ). > yc(x):=rhs(dsolve(equ1,y(x))); Solves the differential equation and sets solution equal to yc ( x ). (v) Solving a differential equation with initial condition : > dsolve( { equ1,y(0)=2 } ,y(x)); Produces the solution to the initial value problem y + x 2 y = x 2 , y (0) = 2. 1 (vi) Evaluating solutions at other values : > soln:=dsolve( { equ1,y(0)=2 } ,y(x)); Sets solution to initial value problem equal to “soln”....
View
Full Document
 Spring '08
 CHO
 Differential Equations, Equations, #, Uniqueness Theorems

Click to edit the document details