diary probA9.txt

close
clear all
echo on

% Problem 9

% Declare x to be symbolic
syms x

% (a)

limit(sin(x)/x, x, 0)

% (b)

limit((1+cos(x))/(x-pi), x, pi)

% (c)
limit(x*exp(-x), x, inf)

% Since MATLAB defaults to numerical evaluation rules, it gets
% a non-answer. Here's a symbolic alternative:

syms y
fn = subs(x*exp(-x), x, 1/y)
limit(fn, y, 0, 'right')

% (d)

limit(1/(x-1), x, 1, 'left')

% (e)

limit(sin(1/x), x, 0)

echo off
diary off