Derivative of a function $f$ at a number $a$[edit  edit source]
We denote the derivative of a function $f$ at a number $a$ as $f'(a)\,\!$.
The derivative of a function $f$ at a number $a$ a is given by the following limit (if it exists):
$f'(a)=\lim _{h\rightarrow 0}{\frac {f(a+h)f(a)}{h}}$
An analagous equation can be defined by letting $x=(a+h)$. Then $h=(xa)$, which shows that when $x$ approaches $a$, $h$ approaches $0$:
$f'(a)=\lim _{x\rightarrow a}{\frac {f(x)f(a)}{xa}}$
As the slope of a tangent line[edit  edit source]
Given a function $y=f(x)\,\!$, the derivative $f'(a)\,\!$ can be understood as the slope of the tangent line to $f(x)$ at $x=a$:
Find the equation of the tangent line to $y=x^{2}$ at $x=1$.
To find the slope of the tangent, we let $y=f(x)$ and use our first definition:
$f'(a)=\lim _{h\rightarrow 0}{\frac {f(a+h)f(a)}{h}}\Rightarrow \lim _{h\rightarrow 0}{\frac {\color {Blue}(a+h)^{2}(a)^{2}}{h}}\Rightarrow \lim _{h\rightarrow 0}{\frac {\color {Blue}a^{2}+2ah+h^{2}a^{2}}{h}}\Rightarrow \lim _{h\rightarrow 0}{\frac {\color {Blue}h(2a+h)}{h}}\Rightarrow \lim _{h\rightarrow 0}{\color {Blue}(2a+h)}$
It can be seen that as $h$ approaches $0$, we are left with $f'(a)={\color {Blue}2a}\,\!$. If we plug in $1$ for $a$:
$f'({\color {Red}1})=2({\color {Red}1})\Rightarrow {\color {Red}2}$
So our preliminary equation for the tangent line is $y={\color {Red}2}x+b$. By plugging in our tangent point $(1,1)$ to find $b$, we can arrive at our final equation:
${\color {Red}1}=2({\color {Red}1})+b\Rightarrow 1=b$
So our final equation is $y=2x1\,\!$.
The derivative of a function $f(x)$ at a number $a$ can be understood as the instantaneous rate of change of $f(x)$ when $x=a$.
The derivative as a function[edit  edit source]
So far we have only examined the derivative of a function $f$ at a certain number $a$. If we move from the constant $a$ to the variable $x$, we can calculate the derivative of the function as a whole, and come up with an equation that represents the derivative of the function $f$ at any arbitrary $x$ value. For clarification, the derivative of $f$ at $a$ is a number, whereas the derivative of $f$ is a function.
Likewise to the derivative of $f$ at $a$, the derivative of the function $f(x)$ is denoted $f'(x)\,\!$.
The derivative of the function $f$ is defined by the following limit:
$f'(x)=\lim _{h\rightarrow 0}{\frac {f(x+h)f(x)}{h}}$
Also,
$f'(x)=\lim _{h\rightarrow x}{\frac {f(x)f(h)}{xh}}$
or
$f'(x)=\lim _{h\rightarrow 0}{\frac {f(x+h)f(xh)}{2h}}$
Consider the sequences:
$y=x^{2};\ y+\Delta y=(x+h)^{2}=x^{2}+2xh+h^{2}$
$y=x^{3};\ y+\Delta y=(x+h)^{3}=x^{3}+3x^{2}h+3xh^{2}+h^{3}$
$y=x^{4};\ y+\Delta y=(x+h)^{4}=x^{4}+4x^{3}h+6x^{2}h^{2}+4xh^{3}+h^{4}$
$y=x^{5};\ y+\Delta y=(x+h)^{5}=x^{5}+5x^{4}h+10x^{3}h^{2}+10x^{2}h^{3}+5xh^{4}+h^{5}$
$y=x^{6};\ y+\Delta y=(x+h)^{6}=x^{6}+6x^{5}h\ +$ many terms containing $h^{2}$
$y=x^{n};\ y+\Delta y=(x+\Delta x)^{n}=x^{n}+nx^{n1}\Delta x\ +$ many terms containing $(\Delta x)^{2}$
$\Delta y=nx^{n1}\Delta x\ +$ many terms containing $(\Delta x)^{2}$
Therefore:
${\frac {\Delta y}{\Delta x}}=nx^{n1}\ +$ many terms containing $\Delta x$
${\frac {dy}{dx}}=\lim _{\Delta x\rightarrow 0}{\frac {\Delta y}{\Delta x}}$
${\frac {d(x^{n})}{dx}}=nx^{n1}$ read as "derivative with respect to $x$ of $x$ to the power $n$."
Later it will be shown that this is valid for all real $n$, positive or negative, integer or fraction.

${\frac {d(x^{4})}{dx}}=4x^{(41)}=4x^{3}$
${\frac {d(7x^{5})}{dx}}=7{\frac {d(x^{5})}{dx}}=7(5x^{4})=35x^{4}$
${\frac {d(p^{3})}{dx}}={\frac {d(p^{3})}{dp}}$⋅${\frac {dp}{dx}}=3p^{2}$⋅${\frac {dp}{dx}}$
${\frac {d(2t^{2}7T^{3}+x^{7})}{dx}}=4t$⋅${\frac {dt}{dx}}7(3T^{2})$⋅${\frac {dT}{dx}}+7x^{6}$
${\frac {d(x^{\frac {1}{3}})}{dx}}={\frac {1}{3}}x^{{\frac {1}{3}}1}={\frac {1}{3}}x^{{\frac {2}{3}}}$
Let $y=u$⋅$v$ where $u=U(x);\ v=V(x)$
$y+\Delta y=(u+\Delta u)$⋅$(v+\Delta v)=u$⋅$v+u$⋅$\Delta v+v$⋅$\Delta u+\Delta u$⋅$\Delta v$
$\Delta y=u$⋅$\Delta v+v$⋅$\Delta u+\Delta u$⋅$\Delta v$
${\frac {\Delta y}{\Delta x}}=u$⋅${\frac {\Delta v}{\Delta x}}+v$⋅${\frac {\Delta u}{\Delta x}}+{\frac {(\Delta u)(\Delta v)}{\Delta x}}$
${\frac {dy}{dx}}=u$⋅${\frac {dv}{dx}}+v$⋅${\frac {du}{dx}}$
Let $y=x^{n}={\frac {1}{x^{n}}}$. Calculate ${\frac {dy}{dx}}$.
$yx^{n}=1$
Differentiate both sides.
$ynx^{n1}+x^{n}{\frac {dy}{dx}}=0$
${\frac {dy}{dx}}={\frac {ynx^{n1}}{x^{n}}}={\frac {nx^{n1}}{x^{n}x^{n}}}=nx^{n1}x^{2n}=nx^{n1}$
This shows that ${\frac {d(x^{n})}{dx}}$ as above is valid for negative $n$.

Used where $y={\frac {U(x)}{V(x)}}$
$y={\frac {u}{v}}$
$yv=u$
$yv'+vy'=u'$
$vy'=u'yv'=u'{\frac {uv'}{v}}$
$y'={\frac {u'}{v}}{\frac {uv'}{v^{2}}}={\frac {vu'}{v^{2}}}{\frac {uv'}{v^{2}}}={\frac {vu'uv'}{v^{2}}}$
Derivatives of trigonometric functions[edit  edit source]
$y=\sin(x)$
$y+\Delta y=\sin(x+\Delta x)=\sin(x)\cos(\Delta x)+\cos(x)\sin(\Delta x)$
$\Delta y=\sin(x)\cos(\Delta x)+\cos(x)\sin(\Delta x)\sin(x)$
${\frac {\Delta y}{\Delta x}}=\sin(x)$⋅${\frac {\cos(\Delta x)1}{\Delta x}}+\cos(x)$⋅${\frac {\sin(\Delta x)}{\Delta x}}$
The value ${\frac {\cos(\Delta x)1}{\Delta x}}$:
>>> # python code
>>> [ (math.cos(dx)1)/dx for dx in (.1,.01,.001,.0001,.0000_1,.0000_01,.0000_001,.0000_0001,.0000_0000_1) ]
[0.049958347219742905, 0.004999958333473664, 0.0004999999583255033,
4.999999969612645e05, 5.000000413701855e06, 5.000444502911705e07,
4.9960036108132044e08, 0.0, 0.0]
>>>
$\lim _{\Delta x\rightarrow 0}{\frac {\cos(\Delta x)1}{\Delta x}}=\lim _{\Delta x\rightarrow 0}{\frac {\sin(\Delta x)}{1}}=0$
by L'Hôpital's rule.
The value ${\frac {\sin(\Delta x)}{\Delta x}}$:
>>> # python code
>>> [ math.sin(dx)/dx for dx in (.1,.01,.001,.0001,.0000_1,.0000_01,.0000_001,.0000_0001,.0000_0000_1) ]
[0.9983341664682815, 0.9999833334166665, 0.9999998333333416, 0.9999999983333334,
0.9999999999833332, 0.9999999999998334, 0.9999999999999983, 1.0, 1.0]
>>>
$\lim _{\Delta x\rightarrow 0}{\frac {\sin(\Delta x)}{\Delta x}}=\lim _{\Delta x\rightarrow 0}{\frac {\cos(\Delta x)}{1}}=1$
by L'Hôpital's rule.
${\frac {dy}{dx}}=\sin(x)$⋅$0+\cos(x)$⋅$1=\cos(x)$
Figure 1: $\lim _{\theta \rightarrow 0}{\frac {\sin(\theta )}{\theta }}:$ Area of sector $AOB\ \geq$ area of triangle $COB.$ Area of triangle $COB\ \geq$ area of sector $COD.$
$\lim _{\theta \rightarrow 0}{\frac {\sin(\theta )}{\theta }}:$
In the diagram $OA=OB=1.$ $OC=OD=\cos(\theta ).$ $CB=\sin(\theta ).$
Let $S$ be the area of a sector of a circle. Then ${\frac {S}{\pi r^{2}}}={\frac {\theta }{2\pi }}$
and $S={\frac {\theta r^{2}}{2}}.$
Area of sector $COD={\frac {\theta \cos ^{2}(\theta )}{2}}.$
Area of triangle $OCB={\frac {\sin(\theta )\cos(\theta )}{2}}.$
Area of sector $AOB={\frac {\theta \cdot 1^{2}}{2}}={\frac {\theta }{2}}.$
Therefore ${\frac {\theta }{2}}\ \geq \ {\frac {\sin(\theta )\cos(\theta )}{2}}\ \geq \ {\frac {\theta \cos ^{2}(\theta )}{2}}.$
$\theta \ \geq \ \sin(\theta )\cos(\theta )\ \geq \ \theta \cos ^{2}(\theta ).$
${\frac {\theta }{\theta \cos(\theta )}}\ \geq \ {\frac {\sin(\theta )\cos(\theta )}{\theta \cos(\theta )}}\ \geq \ {\frac {\theta \cos ^{2}(\theta )}{\theta \cos(\theta )}}$
${\frac {1}{\cos(\theta )}}\ \geq \ {\frac {\sin(\theta )}{\theta }}\ \geq \ \cos(\theta )$
$\lim _{\theta \rightarrow 0}{\frac {1}{\cos(\theta )}}\ \geq \ \lim _{\theta \rightarrow 0}{\frac {\sin(\theta )}{\theta }}\ \geq \ \lim _{\theta \rightarrow 0}\cos(\theta )$
$1\ \geq \ \lim _{\theta \rightarrow 0}{\frac {\sin(\theta )}{\theta }}\ \geq \ 1$
Therefore $\lim _{\theta \rightarrow 0}{\frac {\sin(\theta )}{\theta }}=1.$


$y=\cos(x)={\sqrt {1\sin ^{2}(x)}}$
$y^{2}=1\sin(x)$⋅$\sin(x)$
Differentiate both sides:
$2y$⋅${\frac {dy}{dx}}=(2\sin(x)\cos(x))$
${\frac {dy}{dx}}={\frac {\sin(x)\cos(x)}{\cos(x)}}=\sin(x).$
$y=\tan(x)={\frac {\sin(x)}{\cos(x)}}$
$y\cos(x)=\sin(x)$
Differentiate both sides:
$y(\sin(x))+\cos(x)$⋅${\frac {dy}{dx}}=\cos(x)$
$\cos(x)$⋅${\frac {dy}{dx}}=\cos(x)+y\sin(x)$
${\frac {dy}{dx}}={\frac {\cos(x)+\tan(x)\sin(x)}{\cos(x)}}=1+\tan ^{2}(x)=\sec ^{2}(x)$
Derivatives of inverse trigonometric functions[edit  edit source]
Derivatives of logarithmic functions[edit  edit source]
$y=a^{x}$
$y+\Delta y=a^{x+\Delta x}=a^{x}a^{\Delta x}$
$\Delta y=a^{x}a^{\Delta x}a^{x}=a^{x}(a^{\Delta x}1)$
${\frac {\Delta y}{\Delta x}}=a^{x}{\frac {a^{\Delta x}1}{\Delta x}}$
Consider the value ${\frac {a^{\Delta x}1}{\Delta x}}$ specifically
$\lim _{\Delta x\rightarrow 0}{\frac {a^{\Delta x}1}{\Delta x}}$. L'Hôpital's rule cannot be used here because
${\frac {d(a^{x})}{dx}}$ is what we are trying to find.
$a^{\frac {1}{2}}={\sqrt {a}}$
$(a^{\frac {1}{2}})^{\frac {1}{2}}={\sqrt {\sqrt {a}}}$
$a^{\frac {1}{2^{3}}}={\sqrt {\sqrt {\sqrt {a}}}}$
$a^{\frac {1}{2^{n}}}={\sqrt {a}}$ taken $n$ times.
We will look at the expression ${\frac {a^{\Delta x}1}{\Delta x}}$ for different values of $a$
with $\Delta x={\frac {1}{2^{70}}}=8.5e22$ (approx) in which case the expression becomes
$(a^{1/2^{70}}1)*(2^{70})$ where $a^{1/2^{70}}$ is ${\sqrt {a}}$ taken
$70$ times.
>>> # python code
>>> N=Decimal(2)
>>> v2 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][1] 1 )*(2**70) ; v2
Decimal('0.69314718055994530941743560122437474084363865015406919942144')
>>>
>>> N=Decimal(8)
>>> v8 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][1] 1 )*(2**70) ; v8
Decimal('2.07944154167983592825352768227031325913255072732801782513664')
>>>
>>> N=Decimal(32)
>>> v32 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][1] 1 )*(2**70) ; v32
Decimal('3.46573590279972654709124760144583715956091114572543812435968')
>>>
>>> N=Decimal(128)
>>> v128 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][1] 1 )*(2**70) ; v128
Decimal('4.85203026391961716593059535875094644210510807293198187102208')
>>>
Compare the values v8, v32, v128 with v2 :
>>> v8/v2; v32/v2; v128/v2
Decimal('3.00000000000000000000176135549769209744528640235368520610520')
Decimal('5.00000000000000000000587118499230699148996545343403093128046')
Decimal('7.00000000000000000001232948848384468209997247971055570994695')
>>>
We know that $8=2^{3};\ 32=2^{5};\ 128=2^{7}$. The values v2, v8, v32, v128 are behaving like logarithms.
In fact $\lim _{\Delta x\rightarrow 0}{\frac {a^{\Delta x}1}{\Delta x}}$ is the natural logarithm of $a$
written as $\ln(a).$
The correct value of $\ln(2)$ is:
>>> Decimal(2).ln()
Decimal('0.693147180559945309417232121458176568075500134360255254120680')
>>>
Our calculation produced:
Decimal('0.69314718055994530941743560122437474084363865015406919942144')
accurate to 21 places of decimals, not bad for one line of simple python code.
When $y=a^{x},{\frac {dy}{dx}}=a^{x}\ln(a).$
The base of natural logarithms is the value of $a$ that gives
$\lim _{\Delta x\rightarrow 0}{\frac {a^{\Delta x}1}{\Delta x}}=1.$
This value of $a$, usually called $e,=2.718281828459045235360287471352662497757247093699959574.....$
>>> # python code
>>> N=e=Decimal(1).exp();N
Decimal('2.71828182845904523536028747135266249775724709369995957496697')
>>> ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][1] 1 )*(2**70)
Decimal('1.0000_0000_0000_0000_0000_0423_51647362715016770651530003719651328')
>>> # ln(e) = 1. Our calculation of ln(e) is accurate to 21 places of decimals.
When $a=e,{\frac {d(e^{x})}{dx}}=e^{x}$⋅$\ln(e)=e^{x}$⋅$1=e^{x}.$

$y=ln(x)$
$x=e^{y}$
${\frac {dx}{dy}}=e^{y}$
${\frac {dy}{dx}}={\frac {1}{e^{y}}}={\frac {1}{x}}$
$y=\ln(ax)$
${\frac {dy}{dx}}={\frac {d}{dx}}\ln(ax)={\frac {d}{dx}}(\ln(a)+\ln(x))={\frac {d}{dx}}\ln(a)+{\frac {d}{dx}}\ln(x)={\frac {1}{x}}$

$y=\ln(x^{a})$
${\frac {dy}{dx}}={\frac {d}{dx}}\ln(x^{a})={\frac {d}{dx}}(a\cdot \ln(x))=a\cdot {\frac {d}{dx}}\ln(x)={\frac {a}{x}}$

$y=x^{\frac {m}{n}}$ Calculate ${\frac {dy}{dx}}$
$y^{n}=x^{m}$
$n\cdot \ln(y)=m\cdot \ln(x)$
$n\cdot {\frac {1}{y}}\cdot {\frac {dy}{dx}}=m\cdot {\frac {1}{x}}$
${\frac {dy}{dx}}=m\cdot {\frac {1}{x}}\cdot {\frac {y}{n}}$
$={\frac {m}{n}}\cdot {\frac {x^{\frac {m}{n}}}{x}}$
$={\frac {m}{n}}\cdot x^{{\frac {m}{n}}1}$
Careful manipulation of logarithms converts exponents into simple constants.

Used where $y=G(H(I(x)))$
$y=\cos(2x)$
Let $y=\cos(u)$ where $u=2x$.
 ${\begin{aligned}{\frac {dy}{dx}}=&{\frac {dy}{du}}\cdot {\frac {du}{dx}}\\=&\sin(u)\cdot 2\\=&2\sin(2x)\\\end{aligned}}$

$y=\sin ^{2}(\ln(5x))$
Let $y=u^{2}$ where $u=\sin(v);\ v=\ln(w);\ w=5x$.
 ${\begin{aligned}{\frac {dy}{dx}}=&{\frac {dy}{du}}\cdot {\frac {du}{dv}}\cdot {\frac {dv}{dw}}\cdot {\frac {dw}{dx}}\\=&2u\cdot \cos(v)\cdot {\frac {1}{w}}\cdot 5\\=&2\sin(v)\cdot \cos(\ln(w))\cdot {\frac {1}{5x}}\cdot 5\\=&2\sin(\ln(w))\cdot \cos(\ln(5x))\cdot {\frac {1}{x}}\\=&2\sin(\ln(5x))\cdot \cos(\ln(5x))\cdot {\frac {1}{x}}\\\end{aligned}}$

Applications of the Derivative[edit  edit source]
The first derivative of $f(x)=y'$ or $f'(x).$
As shown above, $f'(x)$ at any point $x_{1}$ gives the slope of $f(x)$
at point $x_{1}.$
$f'(x_{1})$ is the slope of $f(x)$ when $x=x_{1}.$
Figure 1: Diagram illustrating relationship between $f(x)=x^{2}x2$and $f'(x)=2x1.$When $x=0.5,$ both $f'(x)$ and slope of $f(x)=0.$When $x=0,$ both $f'(x)$ and slope of $f(x)=1.$When $x=1,$ both $f'(x)$ and slope of $f(x)=1.$Point $(0.5,2.25)$ is absolute minimum.
In the example to the right, $y=f(x)=x^{2}x2$ and $y'=f'(x)=2x1.$
Of special interest is the point at which $f'(x)$ or slope of $f(x)=0.$
When $f'(x)=0,\ x=0.5$ and $f(x)=0.5^{2}0.52=2.25.$
The point $(0.5,2.25)$ is called a critical point or stationary point of $f(x).$
Because $y'$ has exactly one solution for $y'=0,\ f(x)$ has exactly one critical point.
The value of $y$ at point $(0.5,2.25)$ is less than $y$ at both
$(0,2),\ (1,2).$ Therefore the critical point $(0.5,2.25)$ is a minimum of $f(x).$
In this curve $y=x^{2}x2,$ the point $(0.5,2.25)$ is both local minimum and absolute minimum.

Figure 1: Diagram illustrating relationship between $f(x)={\frac {2x^{3}+3x^{2}12x8}{8}}$ and $f'(x)={\frac {6x^{2}+6x12}{8}}.$ When $x=2$ or $x=1,$ both $f'(x)$ and slope of $f(x)=0.$ When $x=3,$ both $f'(x)$ and slope of $f(x)=3.$ When $x=1,$ both $f'(x)$ and slope of $f(x)=1.5.$ When $x=2,$ both $f'(x)$ and slope of $f(x)=3.$ Point $(2,1.5)$ is local maximum. Point $(1,1{\frac {7}{8}})$ is local minimum.
In the example to the right, $y=f(x)={\frac {2x^{3}+3x^{2}12x8}{8}}$ and $y'=f'(x)={\frac {6x^{2}+6x12}{8}}.$
Of special interest are the points at which $f'(x)$ or slope of $f(x)=0.$
When $f'(x)=0,\ x=2$ and $f(x)=1.5$ or
When $f'(x)=0,\ x=1$ and $f(x)=1{\frac {7}{8}}.$
The points $(2,1.5),\ (1,1{\frac {7}{8}})$ are critical or stationary points of $f(x).$
Because $y'$ has exactly two real solutions for $y'=0,\ f(x)$ has exactly two critical points.
Slope of $f(x)$ to the left of $(2,1.5)$ is positive and
adjacent slope of $f(x)$ to the right of $(2,1.5)$ is negative.
Therefore point $(2,1.5)$ is local maximum. Point $(2,1.5)$ is not absolute maximum.
Adjacent slope of $f(x)$ to the left of $(1,1{\frac {7}{8}})$ is negative and
slope of $f(x)$ to the right of $(1,1{\frac {7}{8}})$ is positive.
Therefore point $(1,1{\frac {7}{8}})$ is local minimum. Point $(1,1{\frac {7}{8}})$ is not absolute minimum.

A cylindrical water heater is standing on its base on a hard rubber pad that is a perfect thermal insulator.
The vertical curved surface and the top are exposed to the free air. The design of the cylinder requires that the volume of the cylinder
should be maximum for a given surface area exposed to the free air. What is the shape of the cylinder?
Let the height of the cylinder be $h$ and let $h=Kr$ where $r$
is the radius and $K$ is a constant.
Surface of cylinder $=S=\pi r^{2}+2\pi rh=\pi r^{2}+2\pi r(Kr)=\pi r^{2}+2\pi r^{2}K$
Volume of cylinder $=V=\pi r^{2}h=\pi r^{2}(Kr)=\pi r^{3}K$
$K={\frac {S\pi r^{2}}{2\pi r^{2}}}$
$V=\pi r^{3}\cdot {\frac {S\pi r^{2}}{2\pi r^{2}}}={\frac {r(S\pi r^{2})}{2}}={\frac {rS\pi r^{3}}{2}}$
${\frac {dV}{dr}}={\frac {S3\pi r^{2}}{2}}$
For maximum volume, ${\frac {dV}{dr}}=0$
Therefore $S3\pi r^{2}=0$
$S=3\pi r^{2};\ \pi r^{2}(1+2K)=3\pi r^{2};\ 1+2K=3;\ K=1.$
The height of the cylinder equals the radius.

Figure 1(c): Plan of county road between Town A and Town B to be constructed so that cost is minimum.
Town B is 40 miles East and 50 miles North of Town A. The county is going to construct a road from Town A to Town B.
Adjacent to Town A the cost to build a road is $500k/mile.
Adjacent to Town B the cost to build a road is $200k/mile.
The dividing line runs EastWest 30 miles North of Town A.
Calculate the position of point C so that the cost of the road from Town A to Town B is minimum.
Let point $C=(x,30).$
Then distance from Town A to point $C={\sqrt {x^{2}+30^{2}}}={\sqrt {x^{2}+900}}.$
Distance from Town B to point $C={\sqrt {(40x)^{2}+20^{2}}}$
$={\sqrt {160080x+x^{2}+400}}$
$={\sqrt {200080x+x^{2}}}.$

Figure 1(d): Graphs showing cost of county road $(f(x))$ and $f'(x).$ Curve showing $(f(x))$ is actually ${\frac {f(x)}{10}}$. Cost is minimum where $x=10.523\dots$
Cost $=5{\sqrt {x^{2}+900}}+2{\sqrt {200080x+x^{2}}}$ in units of $100k.
For minimum cost $f'(x)=0.$
$5\cdot {\frac {1}{2}}\cdot {\frac {2x}{\sqrt {x^{2}+900}}}+2\cdot {\frac {1}{2}}\cdot {\frac {80+2x}{\sqrt {200080x+x^{2}}}}=0$
${\frac {5x}{\sqrt {x^{2}+900}}}+{\frac {80+2x}{\sqrt {200080x+x^{2}}}}=0$
$5x{\sqrt {200080x+x^{2}}}+(80+2x){\sqrt {x^{2}+900}}=0$

$x=10.52322823517\dots$

Figure 1(e): Sheet of cardboard to be cut and folded to make box of maximum possible volume. Cut on purple lines, fold on red lines. Design of box includes top.
A piece of cardboard of length $4\ ft$ and width $3\ ft$
will be used to make a box with a top. Some waste will be cut out of the piece of cardboard
and the remaining cardboard will be folded to make a box so that the volume of the box is maximum.
What is the height of the box?

$2h+l=3$
$2w+2h=4;\ w+h=2$
$V=lwh=(32h)(2h)h=2h^{3}7h^{2}+6h$
For maximum volume ${\frac {dV}{dh}}=6h^{2}14h+6=0.$
$3h^{2}7h+3=0$
$h={\frac {7{\sqrt {13}}}{6}}=6.788\dots$ inches.


Figure 3: Curves and values associated with car jack. When $x=1,\ {\frac {dy}{dx}}=0.1\dots$ When $\theta =45^{\circ },\ {\frac {dy}{dx}}=1$ When $x=9,\ {\frac {dy}{dx}}=2.06\dots$
At what rate is point $A$ moving upwards:
(a) when $x=9$?
(b) when $x=1$?
(c) when $\theta =45^{\circ }$?
We have to calculate ${\frac {dy}{dt}}$ when ${\frac {dx}{dt}}$ is given.
${\frac {dy}{dt}}={\frac {dy}{dx}}\cdot {\frac {dx}{dt}}$
$x^{2}+y^{2}=10^{2}$ (equation of circle)
$y={\sqrt {100x^{2}}}$
$y^{2}=100x^{2}$
$2y\cdot {\frac {dy}{dx}}=2x$
${\frac {dy}{dx}}={\frac {2x}{2y}}={\frac {x}{\sqrt {100x^{2}}}}$
For convenience we'll use the negative value of the square root and say that ${\frac {dy}{dx}}={\frac {x}{\sqrt {100x^{2}}}}.$
Relative to line $BC:$
When $x=9,\ {\frac {dy}{dx}}=2.06,\ {\frac {dy}{dt}}=2.06\cdot 5=10.3$ inches$/$minute.
When $x=1,\ {\frac {dy}{dx}}=0.1,\ {\frac {dy}{dt}}=0.1\cdot 5=0.5$ inches$/$minute.
When $\theta =45^{\circ },x=10\cdot \cos 45^{\circ }=7.071$ and
${\frac {dy}{dt}}=1\cdot 5=5$ inches$/$minute.
This example highlights the mechanical advantage of this simple but effective tool. When the top of the jack is low, it moves quickly.
As the jack takes more and more weight, the top of the jack moves more slowly.


Figure 5: Image of analog clock showing minute and hour hands at $3$ o'clock.
An old fashion analog clock with American style face (12 hours) keeps accurate time.
The length of the minute hand is $4$ inches and the length of the hour hand is $3$ inches.
At what rate is the tip of the minute hand approaching the tip of the hour hand at 3 o'clock?
Let $a$ be distance between the two tips.
The task is to calculate ${\frac {da}{dt}}.$
${\frac {da}{dt}}={\frac {da}{d\theta }}\cdot {\frac {d\theta }{dt}}$ where $\theta$ is
angle subtended by side $a$ at center of clock.
Calculating ${\frac {d\theta }{dt}}:$
Angular velocity of minute hand $={\frac {2\pi }{1}}$ radians/hour.
Angular velocity of hour hand $={\frac {2\pi }{12}}={\frac {\pi }{6}}$ radians/hour.
${\frac {d\theta }{dt}}=$ angular velocity of minute hand relative to hour hand $=2\pi {\frac {\pi }{6}}={\frac {11\pi }{6}}$ radians/hour.

Calculating ${\frac {da}{d\theta }}:$
$a^{2}=3^{2}+4^{2}2\cdot 3\cdot 4\cdot \cos \theta =2524\cos \theta .$
$2a\cdot {\frac {da}{d\theta }}=24\sin \theta .$
${\frac {da}{d\theta }}={\frac {24\sin \theta }{2a}}={\frac {24\sin 90^{\circ }}{2\cdot 5}}={\frac {24}{10}}=2.4.$

${\frac {da}{dt}}=2.4\cdot {\frac {11\pi }{6}}=4.4\pi$ inches/hour.

Figure 6: Multilane highway oriented EastWest. $AB=c=200$ feet. $BC=a=50$ feet. $AC=b$. ${\frac {dc}{dt}}=60$ mph.
A multilane highway is oriented EastWest. A vehicle is moving in the inside lane from West to East.
A lawenforcement officer with a radar gun is in position 50 feet South of the center of the inside lane.
When the vehicle is 200 feet from the radar gun, it shows the vehicle's speed to be 60 mph.
What is the actual speed of the vehicle?
Let length $AC=b.$
${\frac {db}{dt}}={\frac {db}{dc}}\cdot {\frac {dc}{dt}}$ where ${\frac {dc}{dt}}=60$ mph.
The derivative ${\frac {db}{dc}}:$
 ${\begin{aligned}\ \ \ \ &b^{2}=c^{2}a^{2};\ b={\sqrt {c^{2}a^{2}}}\\&2b\cdot {\frac {db}{dc}}=2c\\&{\frac {db}{dc}}={\frac {2c}{2b}}={\frac {c}{\sqrt {c^{2}a^{2}}}}\end{aligned}}$
${\frac {db}{dt}}={\frac {200}{\sqrt {200^{2}50^{2}}}}\cdot 60=61.967\dots$ mph.

Figure 2: Diagram showing position of piston as a function of rotation of crankshaft in reciprocating engine. Piston moves up and down between $8$ and $18$ inches. $18\geq y\geq 8$
$a^{2}=y^{2}+c^{2}2yc\cos(x)$
$y^{2}2c\cos(x)y+c^{2}a^{2}=0$
$y^{2}2(5)\cos(x)y+(5)^{2}(13)^{2}=0$
$y^{2}10\cos(x)y144=0$
$y={\frac {10\cos(x)+{\sqrt {(10\cos(x))^{2}4(144)}}}{2}}$
$y={\frac {10\cos(x)+{\sqrt {100(\cos(x))^{2}+576}}}{2}}$
$y=5\cos(x)+{\sqrt {25(\cos(x))^{2}+144}}$
Code supplied to grapher (without white space) is:
(5)(cos(x)) + ( ((25)((cos(x))^2) + 144 )^(0.5) )
When expressed in this way, it's easy to convert the code to python code:
(5)*(cos(x)) + ( ((25)*((cos(x))**2) + 144 )**(0.5) )
Positions of interest:
Graph and diagram of piston at top dead center.
Graph and diagram of piston at bottom dead center.
Graph and diagram of piston halfway between TDC and BDC.
Graph and diagram of crank halfway between TDC and BDC.
Graph and diagram of connecting rod tangential to crank.


Figure 3: Diagram showing velocity of piston as a function of position of piston in reciprocating engine. Strictly speaking, velocity $={\frac {dy}{dt}}={\frac {dy}{dx}}\cdot {\frac {dx}{dt}}.$ At constant RPM, ${\frac {dx}{dt}}$ is constant. Therefore ${\frac {dy}{dx}}$ is used to illustrate velocity.
Calculation of ${\frac {dy}{dx}}$ by implicit differentiation.
$y^{2}10\cos(x)y144=0$
$2y\cdot y'10(\cos(x)y'+y(\sin(x)))=0$
$2y\cdot y'10\cos(x)y'+10\sin(x)y=0$
$y\cdot y'5\cos(x)y'=5\sin(x)y$
$y'(y5\cos(x))=5\sin(x)y$
$y'={\frac {5\sin(x)y}{5\cos(x)y}}$

Figure 4a: Diagram showing acceleration of piston in reciprocating engine. Negative acceleration has a greater absolute value than the positive, but it does not last as long.
Acceleration introduces the second derivative. While velocity was the first derivative of position with respect to time,
acceleration is the first derivative of velocity or the second derivative of position.
From velocity above $yy'5\cos(x)y'+5\sin(x)y=0$
By implicit differentation:
$yy''+y'y'5(\cos(x)y''+y'(\sin(x)))+5(\sin(x)y'+y\cos(x))=0$
$yy''+y'y'5\cos(x)y''+5y'\sin(x)+5\sin(x)y'+5y\cos(x)=0$
$yy''5\cos(x)y''=(y'y'+5y'\sin(x)+5\sin(x)y'+5y\cos(x))$
$y''(y5\cos(x))=(y'y'+10\sin(x)y'+5y\cos(x))$
$y''={\frac {y'y'+10\sin(x)y'+5y\cos(x)}{5\cos(x)y}}$
Substitute for $y$ and $y'$ as defined above, and you see the code input to grapher
at top of diagram to right.
Figure 4b: Diagram showing "irregularities" in the curve of velocity while velocity is increasing. $y$ axis compressed to illustrate shape of curves.
"Kinks" in the curve:
It is not obvious by looking at the curve of velocity that there are slight irregularities in the curve when velocity is increasing.
However, the irregularities are obvious in the curve of acceleration.
During one revolution of the crankshaft there is less time allocated for negative acceleration than for positive acceleration.
Therefore, the maximum absolute value of negative acceleration is greater than the maximum value of positive acceleration.


Minimum and maximum velocity[edit  edit source]
Figure 5: Diagram showing positions of maximum velocity of piston in reciprocating engine. In the first quadrant, from $x=0^{\circ }$ to $x=90^{\circ },$ the piston moves through $6$ inches. In the second quadrant, from $x=90^{\circ }$ to $x=180^{\circ },$ the piston moves through $4$ inches. Therefore, in the first quadrant, acceleration must be greater than in the second quadrant.
Velocity is rate of change of position. See also Figure 3 above.
Minimum velocity:
Velocity is zero when slope of curve of position is zero.
This occurs at top dead center and at bottom dead center, ie, when
$x=0$ and $x=\pi .$
Maximum velocity:
Intuition suggests that the position of maximum velocity might be the point at which the connecting rod is tangent
to the circle of the crankshaft. In other words:
$x=\arctan({\frac {13}{5}})=68.96\dots ^{\circ }$
or, that the position of maximum velocity might be the point at which the piston is halfway between top dead center and bottom dead center.
In other words:
$x=\arccos({\frac {2.5}{13}})=78.9\dots ^{\circ }$
However, velocity is maximum when acceleration is $0,$
which occurs when $x=\pm 71.26\dots ^{\circ }.$
Suppose that the engine is rotating at $100$ radians/second or approx. $955$ RPM.
$v_{max}=y'{\frac {inches}{radian}}\cdot 100{\frac {radians}{second}}$
abs$(v_{max})=5.36(100)$ inches/second or approx. $30.5$ mph.

Minimum and maximum acceleration[edit  edit source]
Figure 6: Diagram showing positions of minimum and maximum acceleration of piston in reciprocating engine.
Acceleration is rate of change of velocity. See also Figures 4a and 4b above.
Minimum acceleration:
Acceleration is zero when slope of curve of velocity is zero. This occurs at maximum velocity or when
$\angle x$ is approx. $\pm 71.3^{\circ }.$
Maximum acceleration:
Acceleration is maximum when slope of curve of velocity is maximum.
Maximum negative acceleration occurs when slope of curve of velocity is maximum negative. This happens at top dead center
when $\angle x=0.$
Maximum positive acceleration occurs when slope of curve of velocity is maximum positive. This happens before and after bottom
dead center when $\angle x$ is approx. $\pm 127^{\circ }.$
Let the engine continue to rotate at $100$ radians/second.
$acc_{max}=y''{\frac {inches}{radian^{2}}}\cdot 100{\frac {radians}{second}}\cdot 100{\frac {radians}{second}}$
abs$(acc_{max})=6.92*100*100$ inches/second$^{2}$ or approx. $180$ times
the acceleration due to terrestrial gravity.
This maximum value of acceleration is maximum negative when $\angle x=0.$
According to Newtonian physics $f=ma$, force = mass*acceleration, and
$w=fs$, work = force*distance. In this engine energy expended in just accelerating piston to maximum velocity
is proportional to rpm$^{2}$.
Perhaps this helps to explain why a big marine diesel engine rotating at low RPM can achieve efficiency of $55\%.$

