
diary probA7.txt
echo on
% Problem 7

clear
close all

% a)

% We first declare x symbolic with the syms command, and then apply diff.

syms x
diff(7*x^3 + 3*x^2 - 2*x + 1)
% This can easily be checked by "hand-calculation".

% b)

diff((x + 1)/(x^2 + 1))
simplify(ans)
% Let's use the pretty command to produce an answer written in mathematical 
% notation.

pretty(ans)

% c)

diff(cos(x^2 + 1))

% d)

diff(asin(2*x + 3))
pretty(ans)

% e)

diff(sqrt(1 + x^4))
pretty(ans)

% f)

syms a
diff(a^x)
% Here we have also had to declare a symbolic.

% g)

diff(atan(x))

echo off
diary off