\documentclass[12pt,a4paper]{article}
\usepackage{graphicx,a4wide}

%\pagestyle{empty}
%\renewcommand{\thesection}{\Roman{section}}

\setlength{\parindent}{0mm}

\setlength{\parskip}{5mm}

\renewcommand{\baselinestretch}{1.3}

\begin{document}
\section{Differential Calculus}
\begin{quote}
``The calculus was the first achievement of modern mathematics and it is difficult to overestimate its importance. I think it defines more unequivocally than anything else the inception of modern mathematics; and the system of mathematical analysis, which is its logical development, still constitutes the greatest technical advance in exact thinking."\\ JOHN VON NEUMANN
\end{quote}
\begin{quote}
``Each problem that I solved became a rule which served afterward to solve other problems"\\ REN{$\acute{\rm E}$} DESCARTES
\end{quote}
\subsection{Introduction}
Calculus is fundamentally different from the mathematics you have studied previously. Calculus is less static and more dynamic. It is concerned with change and motion. It deals with quantities that approach other quantities. For that reason it may be useful to have an overview of the subject before beginning its intensive study. In this section we give a glimpse of some of the main ideas of calculus by showing how limits arise when we attempt to solve a variety of problems.
\subsubsection{The Area problem}
The origins of calculus go back at least 2500 years to the ancient Greeks, who found areas using the ``method of exhaustion". They knew how to find the area A of any polygon by dividing it into triangles as in Figure 1 and adding the areas of these triangles. It is a much more difficult problem to find the area of a curved figure. The Greek method of exhaustion was to inscribe polygons in the figure and circumscribe polygons about the figure and then let the number of sides of the polygon increase. Figure 2 illustrates the special case of a circle with inscribed regular polygons.
Let $A_n$ be the area of the inscribed polygon with $n$ sides. As $n$ increases, it appears that $A_n$ becomes closer and closer to the area of the circle. We say the area of the circle is the {\em limit} of the areas of the inscribed polygons, and we write
\begin{eqnarray*}
A = \lim_{n\to\infty} A_n
\end{eqnarray*}
The Greeks themselves did not use limits explicitly. However, by indirect reasoning, Eudoxus (5th century BC) used exhaustion to prove the familiar formula for the area of a circle: $ A = \pi r^2$.
The area problem is the central problem in the branch of calculus called {\em integral calculus}.
\subsubsection{The Tangent Problem}
A traditional slingshot is essentially a rock on the end of a string, which you rotate around in a circular motion and then release. When you release the string, in which direction will the rock travel? Many people mistakenly believe that the rock will follow a curved path. Newton's First Law of Motion tells us that the path is straight. In fact, the rock follows a path along the tangent line to the circle, at the point of release.\\

If we wanted to determine the path followed by the rock, we could do so, as tangent lines to circles are relatively easy to find. (Recall, from elementary geometry that a tangent line to a circle is a line that intersects the circle in exactly one point.)  More generally, consider the problem of trying to find the equation of the tangent line $t$ to a curve with equation $ y = f(x)$ at a given point $P$. See Figure 3. Since we know that the point $P$ lies on the tangent line, we can find out the equation of $t$ if we know its slope $m$. The problem is that we need two points to compute the slope and we only have one, namely $P$ on $t$. To get around the problem we first find an approximation to $m$ by taking a nearby point $Q$ on the curve and computing the slope $m_{PQ}$ of the secant line $PQ$. From Figure 4 we see that
\begin{eqnarray}
m_{PQ} = \frac{f(x)-f(a)}{x-a} \label{slope}
\end{eqnarray}
Now imagine that $Q$ moves along the curve toward $P$ as in Figure 5. You can see that the secant line rotates and approaches the tangent line as its limiting position. This means that the slope $m_{PQ}$ of the secant line becomes closer and closer to the slope $m$ of the tangent line. We write
\begin{eqnarray}
m = \lim_{Q\to P} m_{PQ} \nonumber
\end{eqnarray}
and we say that $m$ is the limit of $m_{PQ}$ as $Q$ approaches $P$ along the curve. Since $x$ approaches $a$ as $Q$ approaches $P$, we could also use Equation (\ref{slope}) to write
\begin{eqnarray}
m = \lim_{x \to a}\frac{f(x)-f(a)}{x-a} \label{lim-slope}
\end{eqnarray}
The tangent problem has given rise to the branch of calculus called {\em differential calculus}, which was not invented until more than $2000$ years after the integral calculus.
\subsubsection{Summary}
We have seen that the concept of a limit arises in trying to find the area of a region and the slope of a tangent to a curve. In both these cases the common theme is the calculation of a quantity as a limit of other, easily calculated, quantities. It is this basic idea of a limit that sets calculus apart from other areas of mathematics. In fact, we could define calculus as the part of mathematics that deals with limits.
Sir Isaac Newton invented his version of calculus in order to explain the motion of the planets around the sun. Today calculus is used not only in calculating the orbits of satellites and spacecraft and in the study of astronomy, nuclear physics, electricity, thermodynamics, acoustics, design of machines, chemical reactions, growth of organisms, weather prediction and the calculation of life insurance premiums, but also in such every day concerns as fencing off a field so as to enclose the maximum area or computing the most economical speed for driving a car.
\subsection{Derivatives}
In this chapter we begin our study of differential calculus, which is concerned with how one quantity changes in relation with another quantity. The central concept of differential calculus is the {\em derivative}. After learning how to calculate derivatives, we use them to solve problems involving rates of change.\\
{\bf Definition:} The {\bf derivative of a function $f$ at a number $a$}, denoted by $f'(a)$, is
\begin{eqnarray}
f'(a) = \lim_{h \to 0}\frac{f(a\ +\ h)-f(a)}{h} \label{def1}
\end{eqnarray}
if this limit exists.\\
{\bf Example 1} Find the derivative of the function $f(x) = x^2-8x+9$ at the number $a$.\\
{\bf Solution} From definition (\ref{def1}) we have
\begin{eqnarray*}
f'(a) &=& \lim_{h \to 0}\frac{f(a\ +\ h)-f(a)}{h} \\
&=&\lim_{h \to 0}\frac{[(a+h)^2-8(a+h)+9]-[a^2-8a+9]}{h}\\
&=&\lim_{h \to 0}\frac{a^2+2ah+h^2-8a-8h+9-a^2+8a-9}{h}\\
&=&\lim_{h \to 0}\frac{2ah +h^2 -8h}{h}\\
&=&\lim_{h \to 0}\frac{h(2a+h-8)}{h}\\
&=& 2a-8
\end{eqnarray*}
{\bf Other notations} If we use the traditional notation $y=f(x)$ to indicate that the independent variable is $x$  and the dependent variable is $y$, then some common alternative notations for the derivative are as follows:
\begin{eqnarray*}
f'(x)\ =\ y'\ =\ \frac{dy}{dx}\ =\ \frac{df}{dx}\ =\ \frac{d}{dx}f(x)\ =\ Df(x)\ =\ D_{x}f(x)
\end{eqnarray*}
The symbols $D$ and $d/dx$ are called {\bf differential operators} because they indicate the operation of {\bf differentiation}, which is the process of calculating a derivative.\\

{\bf Note}\\ Though we choose to use a fractional form of representation, $\frac{dy}{dx}$ is a limit and {\bf IS NOT} a fraction, i.e. $\frac{dy}{dx}$ does not mean $dy \div dx$. $\frac{dy}{dx}$ means $y$ differentiated with respect to $x$. Thus, $\frac{dp}{dx}$ means $p$ differentiated with respect to $x$. The `$\frac{d}{dx}$' is the ``operator", operating on some function of $x$.\\
\newpage
{\bf Example 2}\ If $f(x)\ =\ 4x\ +\ 2x^2$, find $f'(x)$ from first principles and hence calculate $f'(2)$.
\textbf{Solution}\\
\begin{eqnarray*}
f'(x) = \frac{dy}{dx}&=&\lim_{h \to 0}\left[\frac{f(x+h)-f(x)}{h}\right]\\
&=&\lim_{h \to 0}\left[\frac{4(x+h)+2(x+h)^2-4x-2x^2)}{h}\right]\\
&=&\lim_{h \to 0}\left[\frac{4h+4xh+2h^2}{h}\right]\\
&=&\lim_{h \to 0}\left[4 + 4x +2h\right]\\
&=& 4 + 4x
\end{eqnarray*}
since
\begin{eqnarray*}
	f'(x)= 4 + 4x
\end{eqnarray*}
then
\begin{eqnarray*}
	f'(2)= 4 + 4(2)=\ 12
\end{eqnarray*}
\subsubsection{Exercises}
\begin{enumerate}
	\item Draw the graph of $y =x^2 +x -6$ for $-5\leq x \leq 6$. Draw the tangents to this curve at $x=3$, $x=1$ and $x=-2$, and hence find a value for the gradient of the curve at each of these points.
	\item Draw the graph of 
\begin{eqnarray*}
	y=\frac{x^2-4x}{4}
\end{eqnarray*}
for $0 \leq x \leq 6$. Draw tangents to the curve at $x=4$, $x=3$ and $x=2$ and hence find a value for the gradient of the curve at each of these points.
\item Differentiate each of the following from first principles to find $\frac{dy}{dx}$
\begin{enumerate}
	\item $y=5x$
	\item $y = 9x+5$
	\item $y=3x^2$
	\item $y=x^3$
	\item $y=x^2+3x$
	\item $y=5x-x^2+7$
	\item $y=\frac{1}{x}$
	\item $y=\frac{1}{x^2}$
\end{enumerate}
\item If $f(x) = 3x -2x^2$ find $f'(x)$ from first principles and hence evaluate $f'(4)$ and $f'(-1)$
\item If $f(x) = 2x^2 +5x -3$ find $f'(x)$ from first principles and hence evaluate $f'(-1)$ and $f'(-2)$
\item If $f(x) = x^3 - 2x$ find $f'(x)$ from first principles and hence evaluate $f'(1)$,$f'(0)$ and $f'(-1)$
\end{enumerate}

\subsection{Differentiation Rules}
In order to avoid differentiating functions from first principles, as we have done in the previous section we can establish certain rules.\\
\textbf{Rule 1}
			\begin{center}
			If $f$ is a constant function, $f(x) = c$, then $f'(x)=0$
	\end{center}
In Leibniz notation \textbf{Rule 1} can be written as	
\begin{eqnarray}
	\frac{d}{dx}\ c = 0  \label{const-rule}
\end{eqnarray}
This result is geometrically evident because the graph of a constant function is an horizontal line, which has slope $0$.

\textbf{Rule 2 - The Power Rule}	
\begin{center}
If $f(x)= x^n$, where $n$ is an integer, then
\begin{eqnarray}
	f'(x) = nx^{n-1} \nonumber
\end{eqnarray}
 \end{center}
The \textbf{Power Rule} can be written in Leibniz notation as
\begin{eqnarray}
	\frac{d}{dx}\ (x^n) = nx^{n-1}\label{power-rule}
\end{eqnarray}
\textbf{Example}\\
\begin{enumerate}
	\item If $f(x)= x^6$, then $f'(x) = 6x^5$.
	\item If $y = x^{1000}$, then $y' = 1000x^{999}$.
	\item If $y=t^4$, then $\frac{dy}{dt}= 4t^3$.
	\item $\frac{d}{dr}\ (r^3)= 3r^2$.
	\item $D_{u}(u^m) = mu^{m-1}$.
\end{enumerate}
The next rule is best written in Leibniz notation when seen for the first time:\\

\textbf{Rule 3 - Linearity of Differentiation}\\
If $c$ is a constant and both $f$ and $g$ are differentiable, then

\begin{itemize}
 \item $\frac{d}{dx}\ (cf) = c\frac{df}{dx}$
 \item $\frac{d}{dx}\ (f+g)= \frac{df}{dx}+\frac{dg}{dx}$
\end{itemize}
\textbf{Summary}

\begin{flushleft}
$\frac{d}{dx}\ c = 0\ \ \ \ \ \frac{d}{dx}\ (x^n) = nx^{n-1}\ \ \ \ \  \ \frac{d}{dx}\ (cf) = c\frac{df}{dx}\ \ \ \ \ \ \ \ \frac{d}{dx}\ (f+g)= \frac{df}{dx}+\frac{dg}{dx}$ 
			\end{flushleft}
\subsubsection{Exercises}
\begin{enumerate}
	\item Differentiate the following functions with respect to $x$
\begin{enumerate}
	\item $x^5$
	\item $x^3$
	\item $12x^2$
	\item $5x^4$
	\item $3x^2$
	\item $7$
	\item $x^{5/3}$
	\item $x^{3/4}$
	\item $x^{2/5}$
	\item $8x^{1/4}$
	\item $\sqrt{x}$
	\item $\sqrt{x^3}$
	\item $2/x$
	\item $3/x^2$
\end{enumerate}
\item Find the gradient function $\frac{dy}{dx}$ for each of the following
\begin{enumerate}
	\item $y=x^2 + 7x -4$
	\item $y=x-7x^2$
	\item $y=x^3 +7x^2 -2$
	\item $y=3x^2 +7x -4 + \frac{1}{x}$
	\item $y=(x+3)(x-1)$
	\item $y=(2x+3)(x+2)$
\end{enumerate}
\item Find the gradients of the following lines at the points indicated
\begin{enumerate}
	\item $y = x^2 +4x$ at $(0,0)$
	\item $y = 5x-x^2$ at $(1,4)$
	\item $y = 3x^3-2x$ at $(2,20)$
	\item $y = 5x+x^3$ at $(-1,-6)$
	\item $y = 3x +\frac{1}{x}$ at $(1,4)$
	\item $y = 2x^2-x+\frac{4}{x}$ at $(2,8)$
\end{enumerate}
\item Find the coordinates of any points of the following lines where the gradient is stated
\begin{enumerate}
	\item $y=x^2$, gradient $8$
	\item $y=x^2$, gradient $-8$
	\item $y=x^2-4x+5$, gradient $2$
	\item $y=5x-x^2$, gradient $3$
	\item $y=x^4+2$, gradient $-4$
	\item $y=x^3+x^2-x+1$, gradient $0$
\end{enumerate}
\item If $f(x) = x^3 +4x$ find 
\begin{enumerate}
	\item $f(1)$
	\item $f'(x)$
	\item $f'(1)$
	\item $f"(x)$
	\item $f"(1)$
\end{enumerate}
\item I will add more exercises here
\end{enumerate}
\subsection{Curve sketching - Maximum, minimum and points of inflection}
Suppose we are given that $f(x) = ax^3+bx^2+cx+d$ and we are asked to sketch the graph of this function. We will use our new found knowledge of calculating derivatives to solve this problem. There are \textbf{FIVE} steps to be followed:
\begin{enumerate}
	\item If $a > 0$, then the shape of the graph is from left to right, maxima then minima.\\
	If $a<0$, then the shape of the graph is from left to right, minima then maxima.
	\item Determine the value of the $y$-intercept by substituting $x=0$ into $f(x)$
	\item Determine the $x$-intercepts by substituting $y=0$ and factorising the expression. First try to find a common factor, or to group terms together. If this fails, use the factor theorem.
	\item Find the turning points of the function by evaluationg the derivative $\frac{df}{dx}$ and setting it to zero.
	\item Determine the $y$-coordinates of the turning points
  \item Step 6 of 5, Draw a neat sketch.
\end{enumerate}
\textbf{Example}

Draw the Graph of $f(x) = x^3 +3x^2$

\textbf{Solution}
\begin{enumerate}
	\item $a$ is positive so shape of graph is maxima, minima
	\item $y$-intercept: $y = x^3 + 3x^2$ therefore $y(0) = 0$.
	\item $x$-intercepts:
\begin{eqnarray*}
	x^3 +3x^2 &=&0\\
	x^2(x+3)&=&0\\
	x=0\ \  {\rm or}\ \ x&=&-3
\end{eqnarray*}
\item Turning points: 
\begin{eqnarray*}
	\frac{dy}{dx}&=& 3x^2 + 6x \ \ {\rm set\ this\ to\ zero}\\
	0&=& 3x^2 + 6x\\
	0&=& 3x(x+2)\\
	x&=&0\ \ {\rm or}\ \ x=-2
\end{eqnarray*}
\item $y$-coordinate of the turning points:
\begin{eqnarray*}
	y(0) = 0\ {\rm and}\  y(-2) = (-2)^3 +3(-2)^2 = 4\\
	{\rm Local\ max\ at\ (-2;4)\ and\ local\ min\ at\ (0;0) }
\end{eqnarray*}
\item Draw a neat sketch.
\end{enumerate}
\subsubsection{Exercises}
\subsection{Small changes}
I will discuss rates of change and give examples from physics, chemistry, biology and economics. 
\subsubsection{Exercises}
\end{document}


   



