== Problem 22 ==

<sagecell> var('s,t') y=function('y', t)

eqn=y.diff(t)+3*y==2*t #Write the ODE y0=5 #State the initial condition. subsidiary_equation = eqn.laplace(t,s).subs(y(t=0)==y0) #Compute the Laplace transform of both sides

                                      #The subs command says to replace y(0) with y0           

show(subsidiary_equation)

sol=solve(subsidiary_equation, laplace(y, t, s)) #Solve for Y(s) show(sol)

Y=sol[0] #Solve returns an array. This gets the first entry in the array. show(Y.inverse_laplace(s,t)) #Compute inverse transform </sagecell>

== Problem 22 part 2 ==

<sagecell> var('s,t') y=function('y', t)

eqn=y.diff(t)+3*y==exp(2*t) #Write the ODE y0=5 #State the initial condition. subsidiary_equation = eqn.laplace(t,s).subs(y(t=0)==y0) #Compute the Laplace transform of both sides

                                      #The subs command says to replace y(0) with y0           

show(subsidiary_equation)

sol=solve(subsidiary_equation, laplace(y, t, s)) #Solve for Y(s) show(sol)

Y=sol[0] #Solve returns an array. This gets the first entry in the array. show(Y.inverse_laplace(s,t) ) #Compute inverse transform </sagecell>

== Problem 25 ==

<sagecell> var('x','y') #Define your variables F(x,y) = (-.3*x+.002*x*y,.4*y-.005*x*y) #State the vector field. Make sure you use a * when you want to multiply. xbounds = (x,0,150) ybounds = (y,0,300)

plot_vector_field(F/F.norm(),xbounds,ybounds) </sagecell>