

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


AMSC/CMSC 460 Problem set 4
tan(s) =
Q − s^2 s
≡ p(s),
and tan(s) = −
s √ Q − s^2
≡ q(s).
Set Q = 64. Use MATLAB to graph the curves tan s, p(s), q(s) on the interval [0, 8]. From the graphs, make guesses as to the location of the roots you can see. Then write the appropriate mfiles, and use the MATLAB root finder fzero to find the roots with a tolerance of ǫ = 10−^6. To see how to use fzero, enter help fzero.
f (x, y) = xey^ − y − x^2 = 0
g(x, y) = exy^ − 2 x − y = 0.
This system has two roots in the square [0, 3] × [0, 3]. To get an idea of where the roots are, plot the contour curves of both functions on the square, and look where the zero level curves intersect. Write a MATLAB program using Newton’s method to find the roots with an ab- solute error of no more than 10−^6. In addition to the script mfile, you will need function mfiles for f and the Jacobian matrix
J(x, y) =
[ fx fy gx gy
] .
To solve the linear system at each iteration you can use the MATLAB com- mand x = A\b which solves the system Ax = b.