# Math 308, Matlab assignment 1

```Math 308, Matlab assignment 1
due February 5 in class
1. In your home directory (folder), create a directory in which you will keep your Matlab files, for
example “Matlab”.
Go to
http://calclab.math.tamu.edu/˜belmonte/m308/I/M308_lnx.html
if you use Linux or
http://calclab.math.tamu.edu/˜belmonte/m308/I/M308_win.html
Matlab directory. You may need to copy the files from the Polking subdirectory to the top level
directory for Matlab to see them.
Start Matlab and change the “current directory” to your Matlab directory.
1. Plot the direction fields for the following differential equations. Choose the limits on the dependent and the independent variables to make the plot informative. Make sure to label the axes if
necessary, and to indicate what is depicted in each plot. Include in each plot solution curves with
initial conditions f (1) = 1, f (1) = 2, and one or two more. Print out the result.
dy
= xy .
(a) dx
(b) dx/dt = −x/t.
(c) u0 (x) = x/u.
(d) dy/dt = −t/y.
2. Using direction fields, estimate the value of the solution to the initial value problem
dy
= x2 − y 2 ,
y(1) = 1
dx
at x = 5, precise to one decimal place. Make sure to write down and print out enough for me to
understand how you got the answer.
3. Plot a few solutions of the following differential equation. Does it look like all the solutions look
the same for large values of t? What is this limiting behavior as t → ∞? You do not need to prove