Problem 7

Contents

Initializations

syms x real     % define x as a real symbolic variable
format compact  % eliminates blank lines in output

(a)

a = diff( x^3/(x^2+1) )
simplify(a)
a =
3*x^2/(x^2+1)-2*x^4/(x^2+1)^2
ans =
x^2*(x^2+3)/(x^2+1)^2

(b)

a = diff( sin(sin(sin(x))) )
a =
cos(sin(sin(x)))*cos(sin(x))*cos(x)

(c)

Here we take the third derivative:

a = diff( atan(x), 3)
simplify(a)
a =
8/(x^2+1)^3*x^2-2/(x^2+1)^2
ans =
2*(3*x^2-1)/(x^2+1)^3

(d)

a = diff( sqrt(1+x^2) )
a =
1/(x^2+1)^(1/2)*x

(e)

Remember to use exp for the exponential function, and log(x) for the natural logarithm. Note that y = x^x.

y = exp(x*log(x))
simplify(y)
a = diff( y )
simplify(a)
y =
exp(x*log(x))
ans =
x^x
a =
(log(x)+1)*exp(x*log(x))
ans =
(log(x)+1)*x^x