Worked solutions - Quiz 2
This page contains sketch notes to some of the quiz questions from Quiz 2. It is not comprehensive. We have tried to include most of the questions where it may not be obvious how to get to the correct answer.
Question 3
Differentiate
\[
\begin{align*}
f(x) = \sqrt{1+x^2}
\end{align*}
\]
\[\begin{split}
\begin{align*}
\frac{d f(x)}{dx} & = \frac{d }{dx} (\sqrt{1+x^2} ) \\
\end{align*}
\end{split}\]
If we let \(u=(1+x^2)\) then \(f(x)=u^{1/2}\).
\[\begin{split}
\begin{align*}
\frac{d f(x)}{dx} & = \frac{df}{du} \frac{du}{dx} \\ & = \frac{d}{du} (u^{1/2}) \times \frac{du}{dx} \\ & = \frac{1}{2} u^{-1/2} \frac{du}{dx}
\end{align*}
\end{split}\]
Now differentiating \(u=(1+x^2)\) with respect to \(x\) gives
\[
\frac{du}{dx} = 2x
\]
Then
\[
\begin{align*}
\frac{d f(x)}{dx} & =\frac{1}{2} (1+x^2)^{-1/2} \times 2x
\end{align*}
\]
which simplifies to give
\[
\begin{align*}
\frac{d f(x)}{dx} & = \frac{x}{\sqrt{1+x^2}}
\end{align*}
\]
Question 4
Differentiate
\[
\begin{align*}
f(x) = \frac{1}{log_e(x)}
\end{align*}
\]
Let \(u=log_e(x)\). Then \(f(x) = u^{-1}\)
\[\begin{split}
\begin{align*}
\frac{d f(x)}{dx} & = \frac{df}{du} \frac{du}{dx} \\ & = \frac{d}{du} (u^{-1}) \times \frac{du}{dx} \\ & = - u^{-2} \frac{du}{dx}
\end{align*}
\end{split}\]
Now differentiating \(u=log_e(x)\) with respect to \(x\) gives
\[
\frac{du}{dx} = \frac{1}{x}
\]
Then
\[\begin{split}
\begin{align*}
\frac{d f(x)}{dx} & = - (log_e(x))^{-2} \frac{1}{x} \\ & = \frac{-1}{x (log_e(x))^2}
\end{align*}
\end{split}\]
Question 6
Differentiate
\[
\begin{align*}
f(x) = \frac{(1+x)}{x^2}
\end{align*}
\]
You can use the quotient rule. I tend to use the product rule. It comes to the same thing.
Let \(F(x) = 1+x\) and \(L(x) = \frac{1}{x^2}\). Then \(f(x) = F(x) \times L(x)\). So we have
\[\begin{split}
\begin{align*}
\frac{df(x)}{dx} & = \frac{d }{dx} (F(x) \times L(x)) \\ &= L(x) \frac{d }{dx} F(x) + F(x) \frac{d }{dx} L(x)
\end{align*}
\end{split}\]
Now
\[
\begin{align*}
\frac{d}{dx} F(x) & = \frac{d}{dx} (1+x) = 1
\end{align*}
\]
\[
\begin{align*}
\frac{d}{dx} L(x) & = \frac{d}{dx} \frac{1}{x^2} = \frac{-2}{x^3}
\end{align*}
\]
Then
\[\begin{split}
\begin{align*}
\frac{df(x)}{dx} & = \frac{1}{x^2} \times 1 + (1+x) \times \frac{-2}{x^3} \\ & = \frac{1}{x^2} \left( 1 - \frac{2(1+x)}{x}\right) \\ & = \frac{1}{x^2} \left(\frac{1}{x} (x - 2 - 2x) \right) \\ & = \frac{-(2 + x)}{x^3}
\end{align*}
\end{split}\]
Question 8
\[
\begin{align*}
L = -\frac{(x-\mu)^2}{s} - log(s)
\end{align*}
\]
Differentiating \(L\) with respect to \(\mu\) gives
\[\begin{split}
\begin{align*}
\frac{dL}{d\mu} & = \frac{d}{d\mu} \left( -\frac{(x-\mu)^2}{s} - log(s) \right) \\ & = \frac{d}{d\mu} - \frac{(x-\mu)^2}{s} - \frac{d}{d\mu} log(s) \\ & = - \frac{1}{s} \frac{d}{d\mu} (x-\mu)^2 - 0 \\& - \frac{1}{s} \times 2(x-\mu) \times -1 \\ & = \frac{2 (x-\mu)}{s}
\end{align*}
\end{split}\]
Differentiating \(L\) with respect to \(s\) gives
\[\begin{split}
\begin{align*}
\frac{dL}{ds} & = \frac{d}{ds} \left( -\frac{(x-\mu)^2}{s} - log(s) \right) \\ & = \frac{d}{ds} - \frac{(x-\mu)^2}{s} - \frac{d}{ds} log(s) \\ & = - (x-\mu)^2 \frac{d}{ds} \frac{1}{s} - \frac{1}{s} \\ & = - (x-\mu)^2 \times \frac{-1}{s^2} - \frac{1}{s} \\ & = \frac{(x-\mu)^2}{s^2} - \frac{1}{s}
\end{align*}
\end{split}\]
To get the second derivatives, we differentiate again. For example,
\[\begin{split}
\begin{align*}
\frac{d^2L}{d\mu^2} & = \frac{d}{d\mu} \left\{ \frac{d L}{d\mu} \right\} \\ & = \frac{d}{d\mu} \frac{2 (x-\mu)}{s} \\ & = \frac{-2}{s}
\end{align*}
\end{split}\]
And
\[\begin{split}
\begin{align*}
\frac{d^2L}{ds^2} & = \frac{d}{ds} \left\{ \frac{d L}{ds} \right\} \\ & = \frac{d}{ds} \left\{ \frac{(x-\mu)^2}{s^2} - \frac{1}{s}\right\} \\ & = (x-\mu)^2 \frac{d}{ds} \frac{1}{s^2} - \frac{d}{ds} \frac{1}{s} \\ & = (x-\mu)^2 \times \frac{-2}{s^3} - \frac{-1}{s^2} \\ & = \frac{-2 (x-\mu)^2}{s^3} + \frac{1}{s^2}
\end{align*}
\end{split}\]
Finally,
\[\begin{split}
\begin{align*}
\frac{d^2L}{d\mu ds^2} & = \frac{d}{ds} \left\{ \frac{d L}{d \mu} \right\} \\ & = \frac{d}{ds} \frac{2 (x-\mu)}{s} \\ & = 2 (x-\mu) \frac{d}{ds} \frac{1 }{s} \\ & = 2 (x-\mu) \times \frac{-1}{s^2} \\ & = \frac{-2 (x-\mu)}{s^2}
\end{align*}
\end{split}\]
You can also do the other way round (differentiate first with respect to \(s\) and then with respect to \(\mu\), but you come to the same answer).
Question 11
\[
\begin{align*}
\int \frac{x}{x^2 - 4} dx
\end{align*}
\]
We notice that if we differentiate the denominator, we get \(2x\), which is proportional to the numerator. Remember the rule
\[
\int \frac{F'(x)}{F(x)} dx = log_e(F(x))
\]
So if we let \(F(x) = x^2 - 4\) then
\[
\begin{align*}
\int \frac{2 x}{x^2 - 4} dx = log_e(x^2 - 4)
\end{align*}
\]
which tells us that
\[
\begin{align*}
\int \frac{x}{x^2 - 4} dx = \frac{1}{2} log_e(x^2 - 4)
\end{align*}
\]
We can express this in various ways,
\[\begin{split}
\begin{align*}
\int \frac{x}{x^2 - 4} dx & = \frac{1}{2} log_e(x^2 - 4) \\ & = log_e( \sqrt{x^2 - 4}) \\ & = \frac{1}{2} log_e((x-2)(x+2))
\end{align*}
\end{split}\]
The easiest way to tackle this question, however, is to differentiate the potential solutions and see which gives the correct answer!
Question 12
(a) Area under curve \(y=x^2\) between \(x=0\) and \(x=3\).
This is
\[\begin{split}
\begin{align*}
\int_0^3 x^2 dx & = \left[ \frac{x^3}{3} \right]_0^3 \\ & = \frac{3^3}{3} - \frac{0^3}{3} \\ & = 9 - 0 = 9
\end{align*}
\end{split}\]
(b) Area under curve \(y=x^2\) between \(x=-0\) and \(x=-3\).
This is
\[\begin{split}
\begin{align*}
\int_{-3}^0 x^2 dx & = \left[ \frac{x^3}{3} \right]_{-3}^0 \\ & = \frac{0^3}{3} - \frac{(-3)^3}{3} \\ & = 0 - (-9) = 9
\end{align*}
\end{split}\]
Question 13
(a) Area under curve \(y=x^3 - 3x\) between \(x=0\) and \(x=3\).
This is
\[\begin{split}
\begin{align*}
\int_0^3 (x^3 - 3x) dx & = \left[ \frac{x^4}{4} - \frac{3 x^2}{2} \right]_0^3 \\ & = \frac{3^4}{4} - \frac{3 . 3^2}{2} - \frac{0^4}{4} + \frac{3 . 0^2}{2} \\ & = \frac{3^3}{2} \left( \frac{3}{2} - 1\right) \\ & = \frac{3^3}{4} = 6.75
\end{align*}
\end{split}\]
(b) Area under curve \(y=x^3 - 3x\) between \(x=-2\) and \(x=2\).
This is
\[\begin{split}
\begin{align*}
\int_{-2}^2 (x^3 - 3x) dx & = \left[ \frac{x^4}{4} - \frac{3 x^2}{2} \right]_{-2}^2 \\ & = \left(\frac{2^4}{4} - \frac{3 . 2^2}{2}\right) - \left(\frac{(-2)^4}{4} - \frac{3 . (-2)^2}{2}\right) = 0
\end{align*}
\end{split}\]