Appendix A — Homework 0

Unless indicated otherwise, you should solve problems by hand and (optionally) use Sage to check your work. As we will see throughout this course, having tools to visualize the underlying mathematics is hugeful valuable!

Also include approximately how long the assignment took for you to complete.

Exercise 36

We’ll differentiate at \((x,y) = (0,-2)\), first the left hand side and then the right: \[ \begin{gathered} \left. \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} ( y^2 (y^2-4) ) \right|_{(0,-2)} = \left. \left( 2y \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} (y^2-4) + y^2 (2y) \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} \right) \right|_{(0,-2)} = \left. -16 \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} \right|_{(0,-2)} \\ \left. \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} ( x^2 (x^2-5) ) \right|_{(0,-2)} = \left. \left( 2x (x^2-5) + x^2 (2x) \right) \right|_{(0,-2)} = 0 \end{gathered} \] We conclude \(\left.\frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} \right|_{(0,-2)} = 0\): the tangent line should be simply \(y = -2\). We can also use Sage!

var('x y')

curve = implicit_plot(
    y^2*(y^2 - 4) == x^2*(x^2 - 5), 
    (x, -4, 4), (y, -4, 4), 
    color='purple'
)
tangent = plot(-2, (x, -4, 4), color='blue')
pt = point([0, -2], color='black', size=50)

show(curve + tangent + pt)

Exercise 46

For part (a), we can plot the bouncing wagon using SageMath:

var('x y')
curve = implicit_plot(
    2*y^3 + y^2 - y^5 == x^4 - 2*x^3 + x^2,
    (x, -1.5, 2.5),
    (y, -1.75, 2.25)
)
show(curve)

For part (b), we use function() to compute implicit differentiation. We can use the code

var('x')
y = function('y')(x)
diff(2*y^3 + y^2 - y^5 == x^4 - 2*x^3 + x^2, x)

to confirm that differentiating \(2y^3 + y^2 - y^5 == x^4 - 2x^3 + x^2\) yields \[ 6y^2\ y' + 2y\ y' - 5y^4\ y' = 4x^3 - 6x^2 + 2x. \] We want to find horizontal tangents, i.e., when \(y' = 0\). Thus we use

var('x')
solve(4*x^3 - 6*x^2 + 2*x == 0, x)

in order to see that horizontal tangents occur at \(x=0, \frac{1}{2}, 1\).

Putting it all together, we can solve a system of equations (the original equation defining the curve together with the equation in terms of \(x\) that we just studied) to find the points of tangency:

var('x y')
solutions = solve([
            4*x^3 - 6*x^2 + 2*x == 0, 
            2*y^3 + y^2 - y^5 == x^4 - 2*x^3 + x^2
    ], [x, y])

real_solutions = [sol for sol in solutions if all(eq.rhs() in RR for eq in sol)]

pts = point([
  (x.subs(sol), y.subs(sol)) for sol in real_solutions], 
  color='red', size=50, zorder=2
)

show(curve + pts)

Section 3.6

Exercise 1

The question asks us to compare \(\ln(x)\) with \(\log_b(x)\) (where \(b\) is any positive number not equal to \(1\)). Consider instead their respective inverse functions: \(e^x\) and \(b^x\). We know from Calculus 1 that \(\frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} e^x = e^x\). On the other hand, it is more difficult to differentiate \(b^x\); we need to use properties of logs to write \(b = e^{\ln b}\), then substitute and apply the chain rule: \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} b^x = \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} e^{(\ln b) x} = (\ln b) e^{(\ln b) x} = (\ln b) b^x. \] In some sense, the math is trying to tell us that \(b=e\) is the preferred base for differentiating an exponential; any other choice of \(b\) leads us to acquire this unslightly extra constant. Using principles of implicit differentiation, setting \(y = \log_b(x)\) so that \(b^y = x\), we have \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} b^y = \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} x \quad \Longrightarrow \quad (\ln b) b^y\ \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = 1 \quad \Longrightarrow \quad \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = \frac{1}{(\ln b)\ b^y} = \frac{1}{(\ln b)\ x}. \] Hence \(\frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} \log_b(x) = \frac{1}{(\ln b) x}\) also picks up this disagreeable constant, whereas we have the tidy identity \(\frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} \ln(x) = \frac{1}{x}\). In this sense, calculus is much more amenable to so-called “natural” logarithms.

Exercise 2

We can use implicit differentiation or directly apply the chain rule. For practice, let’s do the former. Since \(g(t) = \ln(3+t^2)\), we know that \(e^{g(t)} = 3+t^2\). We differentiate: \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}t} e^{g(t)} = \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}t} (3+t^2) \quad \Longrightarrow \quad g'(t) e^{g(t)} = 2t \quad \Longrightarrow \quad g'(t) = \frac{2t}{e^{g(t)}} = \frac{2t}{3+t^2}. \]

Exercise 4

This one is an old favorite of mine. We’ll use the product rule: \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} (x \ln x - x) = \ln x + x \cdot \frac{1}{x} - 1 = \ln x, \] where the cancellation \(x \cdot \frac{1}{x} = 1\) is safe because \(x=0\) is not in the domain of this function.

Exercise 5

More chain rules! \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} \sin( \ln x ) = \frac{1}{x} \cos( \ln x ). \]

Exercise 15

And once more: \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}s} \ln( \ln s ) = \frac{1}{s} \frac{1}{\ln s}. \]

Exercise 63

We know that \(\sin( f(x) ) = 5x\), so differentiating gives \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} \sin( f(x) ) = \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} (5x) \quad \Longrightarrow \quad \cos( f(x) ) f'(x) = 5 \quad \Longrightarrow \quad f'(x) = \frac{5}{\cos( f(x) )}. \] We can simplify this further by using our handy trigonometric properties: since \((\sin \theta)^2 + (\cos \theta)^2 = 1\), we know that \[ \cos( f(x) ) = \pm \sqrt{1 - ( \sin( f(x) ) )^2 } = \pm \sqrt{1 - 25 x^2}. \] But do we want the positive or negative choice of square root here? There are several ways to figure out which is appropriate—recall that \(\sin^{-1}(x)\) is an increasing function—but let’s use SageMath to produce a visualization:

plot( arcsin(5*x), (x, -0.2, 0.2) )

Indeed, this function is strictly increasing, and so we conclude that \(f'(x) = \frac{5}{\sqrt{1 - 25 x^2}}\).

Exercise 66

We proceed as before: differentiating \(\tan(y) = x^2\) yields \[ \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} \tan(y) = \frac{\mathop{}\!\mathrm{d}}{\mathop{}\!\mathrm{d}x} (x^2) \quad \Longrightarrow \quad \sec(y)^2 \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = 2x \quad \Longrightarrow \quad \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = 2x \cos(y)^2. \] Since \(\tan y\) corresponds to the ratio of opposite over adjacent side lengths of a right triangle measured from a corner with angle \(y\), we can suppose that the triangle in question has an opposite side with length \(x^2\) and adjacent side with length \(1.\) By the Pythagorean theorem, this means the hypotenuse has length \(1+x^2,\) and so \(\cos y = \frac{1}{1+x^2}.\) We conclude that \[ \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = \frac{2x}{(1+x^2)^2}. \]

Exercise 81

Setting \(\cos y = x\), we differentiate to get \(\frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} \sin y = 1\) and hence \(\frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = \frac{1}{\sin y}\). Since \(\sin y = \pm \sqrt{1 - (\cos y)^2 }\), we know that \[ \frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = \pm \frac{1}{\sqrt{1-x^2}}. \] In this case, because \(y = \cos^{-1} x\) is a decreasing function—plot it!—we conclude \(\frac{\mathop{}\!\mathrm{d}y}{\mathop{}\!\mathrm{d}x} = - \frac{1}{\sqrt{1-x^2}}\).


  1. To recieve full credit, you should use SageMath to solve this problem—don’t do algebra by hand! Use functions like diff, solve, and implicit_plot. For a bonus point, include a Sage-generated plot of the curve with all the points with horizontal tangents marked.↩︎