We will use some basic mathematical concepts to analyse expected utility. I will briefly review these concepts here.

### Differentiation

Differentiation is a mathematical operation that finds the rate of change (or slope) of a function. It is written as \frac{d}{dx}f(x) or \frac{dy}{dx} or f'(x).

There are several simple rules to differentiate a function. The rules relevant to these notes are as follows.

The derivative of a constant is zero.

\frac{d}{dx}c=0

The derivative of an exponentiation is:

\frac{d}{dx}x^a=ax^{a-1}

For example:

\frac{d}{dx}x^2=2x

You can see from this that for any value of x greater than zero, the derivative of x^2 is greater than zero, signifying that the function f(x)=x^2 is increasing and has positive slope. For any value of x less than zero, the derivative is less than zero, signifying that the function is decreasing and has negative slope.

As another example:

\frac{d}{dx}x^{0.5}=0.5x^{-0.5}

You can see from this that for any value of x greater than zero, the derivative of x^{0.5} is greater than zero, signifying that the function f(x)=x^{0.5} is increasing and has positive slope. The function is not defined for x<0. This is shown in Figure 5.1.

The derivative of the logarithmic function is:

\frac{d}{dx}\ln(x)=\frac{1}{x}

This derivative is positive for all values of x for which \ln(x) is defined. Therefore \ln(x) is increasing in x. You can see this in Figure 5.3.

The derivative of a fraction is:

\frac{d}{dx}\frac{1}{f(x)}=-\frac{f'(x)}{f(x)^2}

For example:

\frac{d}{dx}\frac{1}{x}=-\frac{1}{x^2}

Where you have a function \frac{1}{x^a}, it is often easier to write it as x^{-a} and use the rule for exponentiation. For example:

\frac{d}{dx}\frac{1}{x}=\frac{d}{dx}x^{-1}=-1x^{-2}=-\frac{1}{x^2}

#### The second derivative

The second derivative of the function is a measure of the curvature of the function or the rate of change of the slope. We can calculate the second derivative by taking the derivative of the first derivative.

We can use the second derivative to determine whether a function is concave or convex. A function is concave if the second derivative is negative and convex if the second derivative is positive.

The second derivative of a function is written as \frac{d^2}{dx^2}f(x) or \frac{d^2 y}{dx^2} or f''(x).

For example, if f(x)=x^2, then:

\frac{d^2}{dx^2}x^2=\frac{d}{dx}2x=2

The second derivative is positive (equal to 2) for all values of x. This implies that f(x)=x^2 is increasing at an increasing rate. The function is convex.

The second derivative of x^{0.5} is:

\frac{d^2}{dx^2}x^{0.5}=\frac{d}{dx}0.5x^{-0.5}=-0.25x^{-1.5}

The second derivative is negative for all values of x for which x^{0.5} is defined. This implies that x^{0.5} is increasing at a decreasing rate. The function is concave. You can see this in Figure 5.1.

The second derivative of the logarithmic function is:

\frac{d^2}{dx^2}\ln(x)=\frac{d}{dx}\frac{1}{x}=-\frac{1}{x^2}

This second derivative is negative for all values of x for which \ln(x) is defined. This implies that \ln(x) is increasing at a decreasing rate. The function is concave. You can see this in Figure 5.3.

When working through these notes, you will not be asked to differentiate any functions. However, understanding what differentiation is and what it shows will help you understand the intuition behind the concepts I discuss. I will use the functions f(x)=\ln(x) and f(x)=x^{0.5} in future sections.