You are on page 1of 1

1.

For the equation below plot s vs k for the following sets of conditions, with k varying
from 0 to 5. Submit the M-files, if any, that you used to construct the plots. Your plots
should have a title, and the axes should be labelled. A few values on x-axis and y-axis
should also be shown, with minor ticks on.
(a) Three different curves on the same plot for A=0, A=0.5, A=1, keeping all other
parameters constant: Pe = 10, M = 0.05. Your plot should have a legend to show which
curve corresponds to which value of A.
(b) Four different curves on the same plot for M=0, M=1, M=5, and M=10 keeping all
other parameters constant: Pe = 10, and A = 0.5. Your plot should have a legend to show
which curve corresponds to which value of M.

2. Identify values of x for which the formulas below may lead to large round-off
errors, and suggest alternative formulas which do not have these problems.

(a) x +1 − x
(b) cos2 x - sin2 x

1 + cos(x)
(c)
2

d2y dy
3. Consider the ordinary differential equation − 2 +2y= 0
dx 2 dx
with y (0) = 1 and dy = 0.
dx x = 0
(a) Write the above differential equation in the form L y = f(x) where L is the
operator and f(x) is the forcing function.
(b) Determine the solution to the above differential equation analytically (by hand).

10

You might also like