4 Week 4

We complete the content of the last ‘section’ by learning about curve sketching before looking at specific problems from the world of Engineering relating to the computation of Maxima and Minima. Finally we look at implicit differentiation, parametric differentiation and logarithmic differentiation.

4.1 Curve Sketching

Given a function \(y=f(x)\) representing a curve in the plane, we wish to examine the function and its derivative(s) so as to be able to (roughly) sketch the graph of the function.

Example 4.1 Sketch the graph of the function \[ y = x^2+3x-2. \]

We collect the following information

  1. \(x\)-intercepts – when \(y=0\);
  2. \(y\)-intercept – when \(x = 0\);
  3. critical points and their classification – from \(\mathrm{d}y/\mathrm{d} x, \mathrm{d}^2y/\mathrm{d}x^2\);
  4. points of inflection;
  5. asymptotes.

\(x\)-intercepts (of \(y = x^2+3x-2\))

Put \(y=0\) and solve for \(x\).

\[\begin{align*} x^2+3x-2 &= 0\\ x &= \frac{-3\pm\sqrt{3^2-4(-2)}}{2}\\ &=\frac{-3\pm\sqrt{17}}{2} \end{align*}\]

So the curve passes through the points \(((-3-\sqrt{17})/2,0)\) and \(((-3+\sqrt{17})/2,0)\).

So the curve passes through the points:

\(y\)-intercept (of \(y = x^2+3x-2\))

Put \(x=0\) to find \(y(0) = 0^2+3\times0-2 = -2\).

So the curve passes through the point: \((0,-2)\).

Put \(x=0\) to find: So the curve passes through the point:

critical points (of \(y = x^2+3x-2\))

\[\begin{align*} \frac{\mathrm{d} y}{\mathrm{d} x} &= 2x+3 = 0 \Rightarrow x = -\frac{3}{2}\\ y(-\frac32) &= \left(-\frac32\right)^2 +3\left(-\frac 32\right) - 2 = -\frac{17}4\\ \frac{d^2y}{\mathrm{d} x^2} &= 2>0\Rightarrow x=-\frac 32\text{ is a local minimum}. \end{align*}\]

Find zeroes of the derivative… So the curve passes through the point:

where it has a local

points of inflection (of \(y = x^2+3x-2\))

Since \(\mathrm{d}^2y/\mathrm{d}x^2 = 2\ne0\), there are no points of inflection and the curve is always concave up.

Since \(\mathrm{d}^2y/\mathrm{d}x^2 =\)

there are points of inflection, and the curve is:

Sketch on Figure 4.1.

$f(x)=x^2+3x-2$

Figure 4.1: \(f(x)=x^2+3x-2\)

Example 4.2 Sketch the graph of the function \[ y = x^3+2x+3. \]

\(x\)-intercepts (of \(y = x^3+2x+3\))

Put \(y=0\) and solve for \(x\). \[ x^3+2x+3 = 0. \] Notice that when \(x=-1\) then \(y=0\) and so \(x+1\) is a factor of \(y\). We can then find the other factor and see that \[ y = (x+1)(x^2-x+3). \] The second factor \(x^2-x+3\) then has roots \[ x = \frac{1\pm\sqrt{1-4\times3}}{2} \] which is not real and so there are no other \(x\)-intercepts, except \(x=-1\).

Hence the curve passes through \((-1,0)\).

\(y\)-intercept (of \(y = x^3+2x+3\))

Put \(x=0\) to find \(y(0) = 0^3+2\times0+3 = 3\).

So the curve passes through the point \((0,3)\).

critical points (of \(y = x^3+2x+3\))

\[ \frac{\mathrm{d} y}{\mathrm{d} x} = 3x^2+2 = 0 \Rightarrow x^2 = -\frac{2}{3}. \] This has no real solutions and so there are no critical points.

points of inflection (of \(y = x^3+2x+3\))

Since \(\mathrm{d}^2y/\mathrm{d} x^2 = 6x\) then \((0,3)\) is a point of inflection. When \(x < 0\), \(\mathrm{d}^2y/\mathrm{d} x^2<0\) and so the curve is concave down here, while if \(x>0\) then \(\mathrm{d}^2y/\mathrm{d} x^2>0\) and the curve is concave up here.

Sketch on Figure 4.2.

$f(x)=x^3+2x+3$

Figure 4.2: \(f(x)=x^3+2x+3\)

Example 4.3 Sketch the graph of the curve \[ y = \frac{1}{x+1}. \]

\(x\)-intercepts (of \(1/(x+1)\))

Put \(y=1/(x+1) = 0\) we see that there are no solutions and so the curve does not cross the \(x\)-axis.

\(y\)-intercept (of \(1/(x+1)\))

Put \(x=0\) to find \(y(0) = 1/(0+1) = 1\) and so the curve passes through the point \((0,1)\).

critical points (of \(1/(x+1)\))

\[\begin{align*} y&=\frac1{x+1} = (x+1)^{-1}\\ \frac{\mathrm{d} y}{\mathrm{d} x} &= -(x+1)^{-2} = -\frac1{(x+1)^2}. \end{align*}\] This has no real solutions and so there are no critical points.

points of inflection (of \(1/(x+1)\))

\[ \frac{d^2y}{\mathrm{d} x^2} = -(-2)(x+1)^{-3} = \frac2{(x+1)^3}. \] This also has no solutions and so there are no points of inflection. Notice however that for \(x < -1\), \(\mathrm{d}^2y/\mathrm{d} x^2<0\) and so the function is concave down, while if \(x>-1\) then \(\mathrm{d}^2y/\mathrm{d} x^2 >0\) and so the function is concave up.

(note: concave up/down)

asymptotes

An asymptote of a curve is a line such that the distance between the curve and the line approaches zero as one or both of the \(x\) or \(y\) coordinates tends to infinity.

asymptotes (of \(1/(x+1)\))

Notice that the given function is not actually defined at the point \(x=-1\) but that as \(x\to-1\) then \(y\to\pm\infty\). In fact if we approach the value of \(x=-1\)from above” (i.e. we start with \(x > -1\) and reduce its value to approach \(-1\)) then it is always the case that \(y>0\) and so \(y\to+\infty\) in this case. On the other hand if we approach \(x=-1\)from below” (i.e. start with \(x<-1\) and increase its value to approach \(-1\)) then it is always the case that \(y<0\) and so \(y\to-\infty\) in this case.

So the line \(x=-1\) is a vertical asymptote.

There is also a horizontal asymptote. Notice that as \(x\to+\infty\) then \(y\to 0\) (from above), and as \(x\to-\infty\) then \(y\to0\) (from below). So the line \(y=0\) is a horizontal asymptote.

Sketch on Figure 4.3.

$f(x)=1/(x+1)$

Figure 4.3: \(f(x)=1/(x+1)\)

4.2 Engineering Problems with Max/Min

Maxima and minima may be used in engineering to solve problems such as finding the minimum surface area required to make an object with a fixed volume.

All such problems are solved by forming an equation for the quantity to be minimised (or maximised), i.e. the surface area in the example above, and then using the first and second derivatives of the equation to find the minimum (or maximum) values. However, some intuition is often required to decide how the equation should be formed from the available information.

Example 4.4 Metal boxes are to be made from sheets of steel 800 mm long by 400 mm wide, by cutting squares from the corners and bending the sides. Determine the size of the square to be cut from a sheet such that the volume of the box is maximum.

It is usually helpful to begin by drawing a diagram (Figure 4.4).

maximum-volume

Figure 4.4: maximum-volume

Let \(x\) be the length in metres of side of the square to be cut.

The volume of the box \[ V = \text{length}\times\text{breadth}\times\text{depth}\tag{1} \] Equation (1) is the equation we want to maximise, but we need to put the equation in terms of a single variable before we can differentiate.

In terms of \(x\), \[ \text{length} = 0.8 - 2x,\; \text{breadth} = 0.4 - 2x,\;\text{depth} = x \] So \[ V = (0.8 - 2x)(0.4 - 2x)x = (0.32 - 2.4x + 4x^2)x = 4x^3 - 2.4x^2 + 0.32x \] Then \[ \frac{\mathrm{d}V}{\mathrm{d} x} = 12x^2 - 4.8x + 0.32 \] Maximum and minimum values occur when \(\mathrm{d}V/\mathrm{d}x = 0\). That is, when \(12x^2 - 4.8x + 0.32= 0\).

Solving \(12x^2 - 4.8x + 0.32= 0\) for \(x\) using the quadratic formula gives: \[ x \approx 0.316\text{ and }x \approx 0.085\,\,(3\text{ d.p.}). \] Now we need to find which value of \(x\) gives the maximum volume. \[\begin{align*} \frac{\mathrm{d}^2 V}{\mathrm{d} x^2} &= 24x - 4.8\\ \left.\frac{\mathrm{d}^2 V}{\mathrm{d} x^2}\right\vert_{x=0.316} &= 2.784\\ \left.\frac{\mathrm{d}^2 V}{\mathrm{d} x^2}\right\vert_{x=0.085} &= -2.772 \end{align*}\]

So \(x=0.316\) gives a positive value for \(d^2V/dx^2\) and so represents the minimum volume,

and \(x=0.085\) gives a negative value for \(d^2V/dx^2\) and so represents the maximum volume.

For maximum volume, the square to be cut out must have sides of \(0.085 m\), i.e. \(85 mm\).

In terms of \(x\), \[\begin{align*} \text{length} &=\\ \text{breadth} &=\\ \text{depth} &=\phantom{aklsdhflakjshdfklasdf} \end{align*}\] So \(V=\)

Recall: \(V(x)=4x^3 - 2.4x^2 + 0.32x\).

So \(\frac{d\mathrm{V}}{\mathrm{d} x} =\)

Maximum and minimum values occur when \(\mathrm{d}V/\mathrm{d}x = 0\).

Thus:

Now we need to find which value of \(x\) gives the maximum volume. \[\begin{align*} \frac{\mathrm{d}^2 V}{\mathrm{d} x^2} &= \\ \left.\frac{\mathrm{d}^2 V}{\mathrm{d} x^2}\right\vert_{x=0.316} &=\\ \left.\frac{\mathrm{d}^2 V}{\mathrm{d} x^2}\right\vert_{x=0.085} &= \end{align*}\]

So \(x=0.316\) gives

and \(x=0.085\) gives

For maximum volume, the square to be cut out must have sides of:

Example 4.5 A beam which is built into a wall at one end is simply supported by a force of 75 kN at the other end. The beam is loaded as shown below and the mass of the beam produces a force of 30kN/m. The beam is 4 m long, and the bending moment \(M\) at any distance \(x\) from the simply supported end is given by \[ M = 75x-20(x-1.25)-30x\frac{x}{2}. \] Determine the position of the maximum bending moment and its magnitude. (Figure 4.5)

maximum bending moment

Figure 4.5: maximum bending moment

\[\begin{align*} M &= 75x - 20(x-1.25) - 30x\frac{x}{2},\\ \frac{\mathrm{d}M}{\mathrm{d} x} &= 75-20-30x = 55 - 30x. \end{align*}\] For a turning point, \(\mathrm{d}M/\mathrm{d}x=0\), so \(55 - 30x = 0\) and \(x = 1.83 m\).

\(\mathrm{d}^2M/\mathrm{d}x^2 = -30\), which is always negative, so the turning point is a maximum.

The bending moment \(M\) when \(x = 1.83\) is \[ M = 75\times1.83 - 20(1.83 - 1.25) - \frac{30\times1.83^2}{2}, \] or \(M = 75\ kNm\).

The maximum bending moment occurs at \(1.83 m\) from the simply supported end and has a value of \(75\ kNm\).

\[\begin{align*} M &= \phantom{75x - 20(x-1.25) - 30x\frac{x}{2}}\\ \frac{\mathrm{d}M}{\mathrm{d} x} &= \end{align*}\] For a turning point, \(\mathrm{d}M/\mathrm{d}x=0\), so

\(\frac{\mathrm{d}^2M}{\mathrm{d}x^2}\Big|_{x=\phantom{asdfasdf}} =\)

so the turning point is a

The bending moment \(M\) when \(x = 1.83\), is

\(M=\)

Summary: The maximum bending moment occurs at \(1.83m\) from the simply supported end and has a value of:

Example 4.6 Given a cylindical can with surface area \(S=100\ m^2\), height \(h\) and radius \(r\) (see Figure 4.6),

  1. prove that the volume \(V = 50r-\pi r^3\);
  2. find the value of \(r\) that maximises the volume.
maximum volume

Figure 4.6: maximum volume

Let \(A=\pi r^2\) be the surface area of the top of the can.

Notice that \(V = Ah = \pi r^2h\). So \[ \begin{array}{rl} S&=2A + \text{area of sides}\\ &=2\pi r^2 + 2\pi rh = 100\\ \end{array} \] \[ h=\frac{100-2\pi r^2}{2\pi r}=\frac{50-\pi r^2}{\pi r} \] \[ V=\pi r^2\left(\frac{50-\pi r^2}{\pi r}\right) = 50r -\pi r^3 \] We need to find the critical points and so we find \(\mathrm{d}V/\mathrm{d} r\) and equate to 0. \[ \frac{\mathrm{d} V}{\mathrm{d} r} = 50-3\pi r^2 = 0\text{ giving }r = \sqrt{\frac{50}{3\pi}}. \] Now \[ \frac{\mathrm{d}^2 V}{\mathrm{d}r^2} = -6\pi r\;\text{ and so }\;\left.\frac{\mathrm{d}^2 V}{\mathrm{d}r^2}\right\vert_{r=\sqrt{50/3\pi}} = -6\pi\sqrt{\frac{50}{3\pi}}<0. \] By the 2nd derivative test we see that \(r=\sqrt{50/3\pi}\) is a local maximum.

We have: \(A=\) \(100m^2=S=\) \(h=\) \(V=\) Recall \(V=50r-\pi r^3\).

We need to find the critical points and so we find \(\mathrm{d}V/\mathrm{d} r\) and equate to 0.

\(\dfrac{\mathrm{d} V}{\mathrm{d} r} =\)

The critical point is \(r=\)

\(\dfrac{\mathrm{d}^2 V}{\mathrm{d}r^2} =\)

\(\left.\dfrac{\mathrm{d}^2 V}{\mathrm{d}r^2}\right\vert_{r=\phantom{adsfa}} =\)

and thus we have found a

4.3 Further forms of differentiation

4.3.1 Differentiation of implicit functions

An implicit function is one given by an equation (like the one below), rather than in a direct form \(y=\)(some expression with \(x\)). Here we consider \(y\) to depend on \(x\), and \(x\) to be an “independent” variable: \[ y^2 + x^2 + 2xy + 2x = 0. \] Thus the whole expression is a function of \(x\) even though we don’t have a formula for \(y\) in terms of \(x\).

We can still think of \(y=f(x)\), although we don’t have a formula for \(f\). We do not need to “solve the equation for \(y\)” in order to differentiate, we can use the chain rule!

For example, to differentiate \(y^2\) with respect to \(x\) we write \[ \frac{\mathrm{d}}{\mathrm{d} x}(y^2) = \frac{\mathrm{d}}{\mathrm{d} y}(y^2)\times\frac{\mathrm{d} y}{\mathrm{d} x}= 2y\frac{\mathrm{d} y}{\mathrm{d} x}. \] To differentiate \(2xy\) we note that if \(y=f(x)\) was known, this would be a product of two functions of \(x\), so using the product rule \[ \frac{\mathrm{d}}{\mathrm{d} x}(2xy) = 2x\frac{\mathrm{d}}{\mathrm{d} x}(y)+2y\frac{\mathrm{d}}{\mathrm{d} x}(x) = 2x\frac{\mathrm{d} y}{\mathrm{d} x} + 2y. \] Hence if \[ y^2 + x^2 + 2xy + 2x = 0 \] then the derivative with respect to \(x\) is

\[ 2y\frac{\mathrm{d} y}{\mathrm{d} x} + 2x+2x\frac{\mathrm{d} y}{\mathrm{d} x} +2y+2 = 0. \] This may be rearranged so that \[\begin{align*} 2y\frac{\mathrm{d} y}{\mathrm{d} x}+2x\frac{\mathrm{d} y}{\mathrm{d} x} &= -2x-2y-2\\ \frac{\mathrm{d} y}{\mathrm{d} x}(2y+2x) &= -2(x+y+1)\\ \frac{\mathrm{d} y}{\mathrm{d} x} &= \frac{-(x+y+1)}{x+y}. \end{align*}\]

This can be rearranged to get:

Example 4.7 Differentiate with respect to \(x\), \(10x^2 + 12xy + 10y^2 = 1\) where \(y = f(x)\). Hence find the gradient of the tangent(s) to the curve when \(x=0.2\).

ellipse $10x^2 + 12xy + 10y^2 = 1$

Figure 4.7: ellipse \(10x^2 + 12xy + 10y^2 = 1\)

Solution. This is actually the equation of an ellipse (Figure 4.7).

\[\begin{align*} 10x^2 + 12xy + 10y^2 &= 1\\ 20x+12x\frac{\mathrm{d} y}{\mathrm{d} x}+12y+20y\frac{\mathrm{d} y}{\mathrm{d} x} &=0\\ \frac{\mathrm{d} y}{\mathrm{d} x} = \frac{-20x-12y}{12x+20y} &= -\frac{5x+3y}{3x+5y}. \end{align*}\]

When \(x=0.2\) then \[ 10y^2+\frac{12}5y-\frac35=0\text{ and so }y = \frac{-\frac{12}5\pm\sqrt{\left(\frac{12}5\right)^2+4\times10\times\frac35}}{20} = 0.153\text{ and }-0.393 \] So \[ \left.\frac{\mathrm{d} y}{\mathrm{d} x}\right|_{x=0.153} = -\frac{5\times0.2+3\times 0.153}{3\times0.2+5\times0.153} = -1.069 \] and \[ \left.\frac{\mathrm{d} y}{\mathrm{d} x}\right|_{x=-0.393} = -\frac{5\times0.2-3\times 0.393}{3\times0.2-5\times0.393} = -0.091 \]

4.3.2 Differentiation in parameters

If a function is expressed in parametric form it is convenient to be able to differentiate it in this form rather than having to convert to Cartesian form first.

A function expressed in parametric form has a third variable e.g. \[ y = f(t),\; x = g(t) \] where \(t\) is a parameter.

Now using the chain rule again \[ \frac{\mathrm{d} y}{\mathrm{d} t} = \frac{\mathrm{d} y}{\mathrm{d} x}\times\frac{\mathrm{d} x}{\mathrm{d} t}\text{ and so }\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{\mathrm{d} y}{\mathrm{d} t}/\frac{\mathrm{d} x}{\mathrm{d} t}. \] Thus if we can find \(\mathrm{d}y/\mathrm{d} t\) and \(\mathrm{d}x/\mathrm{d} t\) we can establish \(\mathrm{d}y/\mathrm{d} x\).

Example 4.8 A function is expressed in parametric form as \(y = 2t + t^2, x = t^2 - 1\), where \(t\) is a parameter. Find \(\mathrm{d}y/\mathrm{d} x\).

Solution. \[\begin{gather*} \frac{\mathrm{d} y}{\mathrm{d} t} = 2+2t\\ \frac{\mathrm{d} x}{\mathrm{d} t} = 2t\\ \frac{\mathrm{d} y}{\mathrm{d} x} = \frac{\mathrm{d} y}{\mathrm{d} t}/\frac{\mathrm{d} x}{\mathrm{d} t} = \frac{2+2t}{2t} = \frac{1+t}{t}. \end{gather*}\]

4.3.3 Logarithmic differentiation

This is a convenient way to deal with the derivative of a product of quotient with more than two terms.

Consider \[ y = \frac{(x-4)(x+5)}{(x+3)(x-2)} \] Taking logs of both sides gives

\[ \ln(y) = \ln(x-4)+\ln(x+5)-\ln(x+3)-\ln(x-2) \]

\(\ln(y) =\)

Recall: \(\ln(y) = \ln(x-4)+\ln(x+5)-\ln(x+3)-\ln(x-2)\).

Differentiating and treating \(\ln(y)\) as a function of a function gives

\[\begin{align*} \frac 1y\times\frac{\mathrm{d} y}{\mathrm{d} x} &= \frac{1}{x-4}+\frac{1}{x+5}-\frac{1}{x+3}-\frac{1}{x-2}\\ \frac{\mathrm{d} y}{\mathrm{d} x} &= y\times\left(\frac{1}{x-4}+\frac{1}{x+5}-\frac{1}{x+3}-\frac{1}{x-2}\right)\\ &= \left(\frac{1}{x-4}+\frac{1}{x+5}-\frac{1}{x+3}-\frac{1}{x-2}\right)\frac{(x-4)(x+5)}{(x+3)(x-2)}. \end{align*}\]

Example 4.9 Differentiate with respect to \(x\), \(y=x^x\).

Solution. \[\begin{align*} \ln(y) &= x\ln(x)\\ \frac{1}{y}\times\frac{\mathrm{d} y}{\mathrm{d} x} &= \ln(x)+x\times\frac{1}{x} = \ln(x)+1\\ \frac{\mathrm{d} y}{\mathrm{d} x} &= y(\ln(x)+1) = x^x(\ln(x)+1). \end{align*}\]