Exercise 10 solutions

🔹 must know, 🔸 ideally should know, ⛑ challenging, 🔫 very challenging

🔹 3.2.31


Find \(f'(x)\) and \(f''(x)\) for \(f(x) = x^2 e^x\)

Solution

In this case we know that we should use product rule. More specifically, we can write for the first derivative of f:

\[f'(x) = x^2e^x + 2xe^x\]

And for the second derivative of f, we can write:

\[f''(x) = x^2e^x + 2xe^x + 2xe^x + 2e^x = x^2e^x + 4xe^x + 2e^x\]


🔸 3.4.21


Find the derivative of the function:

\[h(x) = (4x + 5)^3 (x^2 - 2x + 5)^4\]

Solution

In this particular case, we get to combine two different rules, namely product rule and chain rule. We could therefore rewrite h as follows:

\[h(x) = f(x)g(x) \text{ where } f(x) = (4x + 5)^3 \text{ and } g(x) = (x^2 - 2x + 5)^4\]

In addition, we know that the first derivative of h will look as follows:

\[h'(x) = f(x)g'(x) + f'(x)g(x)\]

From this equation, we can simply see that we need to obtain \(f'(x)\) and \(g'(x)\) and then we can plug these values into the above equation. Therefore, let’s start with f:

\[f'(x) = 3(4x + 5)^2 4 = 12(4x + 5)^2\]

Above, I used chain rule. See its definition above. Now, in a similar fashion, I can find first derivative of g:

\[g'(x) = 4(x^2 - 2x + 5)^3 (2x - 2)\]

Finally, we can combine plug these results to the equation for \(h'(x)\):

\[h'(x) = [(4x + 5)^3][4(x^2 - 2x + 5)^3 (2x - 2)] + [12(4x + 5)^2][(x^2 - 2x + 5)^4]\]


🔹 4.3.11


Find the intervals on which f is increasing or decreasing, and find the local maximum and minimum values of f:

\[f(x) = 6x^4 - 16x^3 + 1\]

Solution

We can start by computing a first derivative of f:

\[f'(x) = 24x^3 - 48x^2\]

To find the local maximum and minimum values, we are interested when $f’(x) = 0$, i.e., when the slope of a tangent is equal to zero. Therefore, we solve the following equation:

\[\begin{aligned} 24x^3 - 48x^2 = 0 \\ 24x^2(x - 2) = 0 \\ \Rightarrow x_1 = 0 \text{ and } x_2 = 2 \end{aligned}\]

Now, when we found the critical points, we can do a first derivative test. Before that, we should first define what are the values of \(f'(x)\) within the intervals defined by our critical points. Let’s use python to find this out. We define the \(f'\) as:

f1 = lambda x: 24*x**3 - 48*x**2

Then to find the sign, we choose any value from the interval:

  • I1: \((-inf, 0)\) \(\rightarrow\) value of \(f'(x)\) within I1:
print("Negative") if f1(-1) < 0 else print("Positive")

We should get negative. Similarly for other two intervals:

  • I2: \((0, 2)\) \(\rightarrow\) value of \(f'(x)\) within I2: negative

  • I3: \((2, +\inf)\) \(\rightarrow\) value of \(f'(x)\) within I3: positive

We can conclude that the intervals on which f is decreasing are I1 and I2. The only interval where f is increasing is I3. Finally, we do our first derivative test to determine local max and min:

  • 0: \(f'(x)\) is negative to the left and right of 0, therefore it is neither local maximum nor minimum

  • 2: \(f'(x)\) is negative the left of 2 and positive to the right, thus, we conclude that 2 is local minimum


⛑ 5.5.87


An oil storage tank ruptures at time \(t = 0\) and oil leaks from the tank at a rate of \(r(t) = 100e^{-0.01t}\) liters per minute. How much oil leaks out during the first hour?

Solution

If we assume, that \(t\) is in minutes, then we can compute the total amount of oil leaked as follows:

\[\int_0^{60} r(t) dt = \int_0^{60} 100e^{-0.01t} dt = 100 \int_0^{60} e^{-0.01t} dt\]

To solve this integral, we need to use the substitution rule due to the two nested functions:

  • inner is \(g(t) = -0.01t\)
  • and outer is \(f(t) = e^t\)

The hardest part is to usually find the substitution, one of the ways is to substitute for the inner function, let’s try it: \(u = g(t)\). As a second step we want to compute:

\[\frac{d u}{d t}=g^{\prime}(t)\]

before we compute \(g'(t)\), we re-arrange the terms such that:

\[\frac{d u}{d t}=g^{\prime}(t), \quad d u=g^{\prime}(t) d t, \quad d t=\frac{d u}{g^{\prime}(t)}\]

Finally, we know that \(g'(t) = -\frac{1}{100}\). Now, we can go back to the original integral and replace \(g(t)\) by \(u\) and \(dt\) by \(\quad d t=\frac{d u}{g^{\prime}(t)}\):

\[100 \int_0^{60} -100e^{u} du = -10000\int_0^{60} e^{u} du\]

Very importantly, we must not forget to adjust the limits by plugging the original values to the \(u = g(t)\), so we obtain new limits: 0 and -0.6:

\[-10000\int_0^{-0.6} e^{u} du\]

Now, the integral in this form can be solved easily:

\[-10000[F(-0.6) - F(0)] = -10000[e^{-0.6} - 1]\]

Let’s use python to compute this:

import numpy as np
-10000*(np.e**(-0.6) - 1)

So a result we get that around 4511.88 liters leaked.


🔸 Exercise from the course


Compute the Taylor polynomial of the specified degree at the specified point:

  • Degree 4 at the point \(a = 0\) of the function \(g(x) = sin(x^2)\).

Solution

I will start by declaring the general formula for Taylor polynomial, which is as follows:

\[T_{n, f, a}(x) = \sum_{i=0}^n \frac{f^{(i)}(a)}{i!}(x-a)^i\]

where \(n\) represents the degree of the given Taylor polynomial, \(f^{(i)}\) the i-th derivative of the given function \(f\) and \(a\) the point near which we want to compute the Taylor polynomial.

As a next step, I will compute derivatives for each degree of the Taylor polynomial for the given function and apply it onto the base point 0. Then I can use these results further on in the computation.

\[\begin{aligned} 1. f^{(0)}(a) = sin(a^2), \ f^{(0)}(0) = 0 \\ 2. f^{(1)}(a) = cos(a^2)2a = 2acos(a^2), \ f^{(1)}(0) = 0 \\ 3. f^{(2)}(a) = 2cos(a^2) - 4a^2 sin(a^2), \ f^{(2)}(0) = 2 \\ 4. f^{(3)}(a) = -4asin(a^2) - 8a^3 cos(a^2) - 8asin(a^2), \ f^{(3)}(0) = 0 \\ 5. f^{(4)}(a) = -a^2cos(a^2) - 4sin(a^2) - 8a^3(-sin(a^2)2a) - 24a^2(cos(a^2)) - 8a cos(a^2)2a - 8sin(a^2), \ f^{(4)}(0) = 0 \end{aligned}\]

Finally, I can construct the Taylor polynomial of degree four for the given function \(f\) around base point 0 as follows:

\[T_{4, f, 0}(x) = 0 + 0 + x^2 + 0 + 0 = x^2\]


🔍 About the page


  • Last updated: 25/11/2021
  • Unless othewise stated, exercises come from the book: James Stewart, Daniel K. Clegg and Saleem Watson: Calculus: Early Transcendentals, Metric Edition, 9th edition
  • Purpose: This page was created as part of a preparation for my teaching assistant session in the course Linear algebra and optimization managed by Rasmus Ejlers Møgelberg. Please note that the solutions on this page are my own, thus it should not be considered as official solutions provided as part of the course.