BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Problem Set 4: iPod sales by least squares, the largest triangle in a circle and polar derivatives

Three problems on maxima, minima and the chain rule. You write the least-squares equations as one matrix equation and fit a straight line and an exponential to five years of iPod sales, find the triangle of largest area inscribed in the unit circle and confirm it with the second derivative test, and use the chain rule to turn the partial derivatives of a function from rectangular into polar coordinates and back.

You need this first

Full reading path (11 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. Parametric equations of lines and the cycloid (18.02)
  7. Velocity, acceleration and Kepler's second law (18.02)
  8. Functions of two variables and partial derivatives (18.02)
  9. Tangent planes, critical points and least squares (18.02)
  10. The second derivative test (18.02)
  11. Differentials and the chain rule (18.02)
On this page · 5 sections
  1. How to answer
  2. Problem 1
  3. Problem 2
  4. Problem 3
  5. More practice: MIT's own solved exercises

This set practises three lessons: tangent planes, critical points and least squares, the second derivative test and differentials and the chain rule. Problems 1 and 3 also use the matrix products and inverse matrices of the lesson on matrices. The page follows MIT's Problem Set 4, in our own words.

MIT's set has two parts. Part B holds MIT's three longer problems (25 points), for which OpenCourseWare has no solutions. All three are written out below, with hints and solutions of our own. Part A is a list of short exercises, most of them from MIT's own Supplementary Notes, which also hold their solutions. Those are not rewritten here: the last section of this page lists them and links to MIT's exercises and solutions.

MIT's sheet numbers the lectures by the calendar of its term, which also counts the day of the first exam. So its numbers are one higher than this site's: the sheet's Lectures 10, 11 and 12 are Lectures 9, 10 and 11 here (and in MIT's own lecture summaries). Problem 1 belongs to Lecture 9 (least squares), Problem 2 to Lecture 10 (the second derivative test) and Problem 3 to Lecture 11 (the chain rule).

How to answer#

Work each problem on paper first. Then type your result in the answer box and press Check. A formula box takes plain typing, for example r*cos(theta), and accepts every correct way of writing the answer. Type theta for θ\theta, and t1 and t2 for the angles θ1\theta_1 and θ2\theta_2 of Problem 2. A number box wants a decimal number, not a fraction or a square root, and its question says how exact your value must be: keep all the digits your calculator shows while you work, and round only at the end. Unless a box asks for more digits, give 3 significant figures in the box; an answer with only 2 significant figures may or may not be accepted. Angles are in radians. The points, and their split over the parts of a problem, are MIT's. If you are stuck, open the hints one at a time. Each part ends with its full solution. Try before you open it: an answer given after its solution was opened earns no points. Parts that ask you to show or draw something have no answer box: compare your work with the solution and mark it yourself. Your score is kept in this browser only.

Problem 1 needs a tool that can add and multiply lists of five numbers. MIT's students used MATLAB. Use anything you like: a calculator, a spreadsheet, Python or another free program. Every sum in it has only five terms, so it can also be done by hand.

Problem 1#

Problem

Least squares and five years of iPod sales

11 points

The lesson finds the line y=ax+by = ax + b that best fits nn data points (xi,yi)(x_i, y_i): the numbers aa and bb make the total square deviation as small as possible, and they solve two linear equations. This problem writes those equations with matrices, and then uses them on real data.

MIT asks its students to do parts (b) to (f) with MATLAB, or with other software or a calculator, on one condition that holds here too: carry out the calculation with your own formulas of part (a), and do not press a ready-made button for a best-fitting line (except to check your result).

(a)2 points

Put the data in three row vectors with nn entries each: x=[x1 x2 … xn]\mathbf{x} = [x_1\ x_2\ \dots\ x_n], y=[y1 y2 … yn]\mathbf{y} = [y_1\ y_2\ \dots\ y_n], and u=[1 1 … 1]\mathbf{u} = [1\ 1\ \dots\ 1], a row of nn ones. The lesson's two least-squares equations (equations (4) of MIT's Notes LS) are

The least-squares equations
(∑xi2)a+(∑xi)b=∑xiyi,(∑xi)a+n b=∑yi\Big(\sum x_i^2\Big)a + \Big(\sum x_i\Big)b = \sum x_iy_i, \qquad \Big(\sum x_i\Big)a + n\,b = \sum y_i
In words

( the sum of x sub i squared )a plus ( the sum of x sub i )b equals the sum of x sub i y initial, ( the sum of x sub i )a plus n b equals the sum of y initial

Source: 18.02 Supplementary Notes, LS: Least Squares Interpolation (MIT OpenCourseWare), Section 1, equations (2) to (4), pp. 1–2, equations (4), p. 2

Write them as one matrix equation

The matrix form asked for
A z=r,z=[ab]A\,\mathbf{z} = \mathbf{r}, \qquad \mathbf{z} = \begin{bmatrix} a \\ b \end{bmatrix}
In words

capital A z equals r, z equals a; b

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(a), p. 1

where AA is a 2 × 2 matrix and r\mathbf{r} a column with two entries. Write the entries of AA and r\mathbf{r} the way MATLAB wants them, without summation signs. In MATLAB, * is the matrix product and an apostrophe makes the transpose, so u' is the column of nn ones, and x*u' is the sum ∑xi\sum x_i. Inside square brackets, a space separates the entries of a row and a semicolon starts a new row.

Hint

A row with nn entries times a column with nn entries is one number: the sum of the products of their entries. Which row and which column give ∑xi2\sum x_i^2?

Hint

The number nn is a sum too: it is 1+1+⋯+11 + 1 + \dots + 1, with nn terms.

Solution

The idea. Every sum in the two equations is a sum of products of entries of two of the three rows. Such a sum is the first row times the transpose of the second.

The sums as products

Each sum as a row times a column
∑xi2=x xT,∑xi=x uT,n=u uT,∑xiyi=x yT,∑yi=u yT\sum x_i^2 = \mathbf{x}\,\mathbf{x}^T, \qquad \sum x_i = \mathbf{x}\,\mathbf{u}^T, \qquad n = \mathbf{u}\,\mathbf{u}^T, \qquad \sum x_iy_i = \mathbf{x}\,\mathbf{y}^T, \qquad \sum y_i = \mathbf{u}\,\mathbf{y}^T
In words

the sum of x sub i squared equals x x ^ capital T, the sum of x sub i equals x u ^ capital T, n equals u u ^ capital T, the sum of x sub i y initial equals x y ^ capital T, the sum of y initial equals u y ^ capital T

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(a) (our own solution)

Here xT\mathbf{x}^T is the transpose of x\mathbf{x}: the same numbers written as a column.

The matrix equation

The first equation is the first row of AA times the column z\mathbf{z}, and the second equation is the second row:

The least-squares equations in matrix form
[x xTx uTx uTu uT][ab]=[x yTu yT]\begin{bmatrix} \mathbf{x}\,\mathbf{x}^T & \mathbf{x}\,\mathbf{u}^T \\ \mathbf{x}\,\mathbf{u}^T & \mathbf{u}\,\mathbf{u}^T \end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} \mathbf{x}\,\mathbf{y}^T \\ \mathbf{u}\,\mathbf{y}^T \end{bmatrix}
In words

x x ^ capital T x u ^ capital T; x u ^ capital T u u ^ capital T a; b equals x y ^ capital T; u y ^ capital T

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(a) (our own solution)

In MATLAB: A = [x*x' x*u'; x*u' u*u'] and r = [x*y'; u*y']. The solution is then z=A−1r\mathbf{z} = A^{-1}\mathbf{r}, the lesson's way of solving a square system, typed as z = inv(A)*r.

Check the result

The order of the factors matters. A row times a column, x*x', is one number. A column times a row, x'*x, is a matrix with nn rows and nn columns, which is not what the equations need. The order of the unknowns matters too: the first column of AA multiplies aa, so it must hold the coefficients of aa, which are ∑xi2\sum x_i^2 and ∑xi\sum x_i. Part (c) tests the formulas on numbers.

(b)0 points

MIT's sheet gives the number of iPods sold in the whole world in each year from 2001 to 2005, in millions (it names Wikipedia and Apple's quarterly reports as its sources):

Year20012002200320042005
xix_i12345
Sales yiy_i (millions)0.1250.4701.4518.26331.960

To keep the numbers small, xx is the year minus 2000, so xix_i runs from 1 to 5.

Make a scatter plot of the five data points: one mark for each point (xi,yi)(x_i, y_i), not joined by lines. This part earns no points at MIT, and the plot comes back in part (e).

Solution

The idea. Look at the data before fitting anything to them.

What the plot shows

The first three marks lie almost on the xx-axis, at heights 0.1250.125, 0.4700.470 and 1.4511.451. The fourth is at 8.2638.263 and the fifth far above it at 31.96031.960. The points do not lie near a straight line: they bend upwards more and more steeply. The plot in the solution of part (e) shows them.

(c)3 points

Use the data of part (b) and your formulas of part (a) to find the best-fitting line y=ax+by = ax + b. Then compute, for each of the five years, the error: the actual value yiy_i minus the value axi+bax_i + b that the line predicts. Report aa, bb and the worst case, the error of largest size.

Give aa and bb to three decimal places, and the size of the largest error in millions of iPods, to two decimal places.

MIT recommends a check for those who use MATLAB: polyfit(x,y,1) returns the coefficients [a,b][a, b] of the best line. Any ready-made line fit of your own tool does the same. Use it only as a check.

Hint

You need four sums: ∑xi\sum x_i, ∑xi2\sum x_i^2, ∑yi\sum y_i and ∑xiyi\sum x_iy_i. The number of points is n=5n = 5.

Hint

Two equations in two unknowns: solve them with the inverse of the 2 × 2 matrix, or take a multiple of the second equation away from the first so that bb drops out.

Solution

The idea. Compute the four sums, fill in the matrix equation of part (a), and solve it.

The sums

∑xi=1+2+3+4+5=15\sum x_i = 1 + 2 + 3 + 4 + 5 = 15 and ∑xi2=1+4+9+16+25=55\sum x_i^2 = 1 + 4 + 9 + 16 + 25 = 55. From the table, ∑yi=42.269\sum y_i = 42.269, and

The sum of the products
∑xiyi=1(0.125)+2(0.470)+3(1.451)+4(8.263)+5(31.960)=198.27\sum x_iy_i = 1(0.125) + 2(0.470) + 3(1.451) + 4(8.263) + 5(31.960) = 198.27
In words

the sum of x sub i y initial equals 1(0.125) plus 2(0.470) plus 3(1.451) plus 4(8.263) plus 5(31.960) equals 198.27

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(c) (our own solution)

Solve the system

The system for the iPod data
[5515155][ab]=[198.2742.269]\begin{bmatrix} 55 & 15 \\ 15 & 5 \end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} 198.27 \\ 42.269 \end{bmatrix}
In words

55 15; 15 5 a; b equals 198.27; 42.269

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(c) (our own solution)

The determinant of the matrix is 55⋅5−15⋅15=5055 \cdot 5 - 15 \cdot 15 = 50. Three times the second equation, taken away from the first, leaves 10a=198.27−126.807=71.46310a = 198.27 - 126.807 = 71.463. Then the second equation gives bb:

The best-fitting line
a=7.1463,b=42.269−15a5=−12.9851,y=7.1463 x−12.9851a = 7.1463, \qquad b = \frac{42.269 - 15a}{5} = -12.9851, \qquad y = 7.1463\,x - 12.9851
In words

a equals 7.1463, b equals the quantity 42.269 minus 15 a, all over 5 equals minus 12.9851, y equals 7.1463 x minus 12.9851

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(c) (our own solution)

The errors

Year20012002200320042005
Actual yiy_i0.1250.4701.4518.26331.960
Line axi+bax_i + b−5.83881.30758.453815.600122.7464
Error5.9638−0.8375−7.0028−7.33719.2136

The worst case is 2005: the line is 9.219.21 million too low. The error of 2004 is nearly as large, 7.347.34 million the other way.

Check the result

The second least-squares equation, divided by nn, says that the line passes through the point of the averages, (3,8.4538)(3, 8.4538): indeed 7.1463×3−12.9851=8.45387.1463 \times 3 - 12.9851 = 8.4538. The same equation says that the five errors add up to zero, and they do: 5.9638−0.8375−7.0028−7.3371+9.2136=0.00005.9638 - 0.8375 - 7.0028 - 7.3371 + 9.2136 = 0.0000. The fit is poor all the same. The errors are as large as the sales themselves, and the line predicts that minus 5.85.8 million iPods were sold in 2001.

(d)2 points

In the first years after a new product comes on the market, its sales tend to grow exponentially and not along a line. The lesson's method for an exponential law is to take logarithms: find the best fit of the form

A line for the logarithm
ln⁡y=a1x+b1\ln y = a_1x + b_1
In words

log y equals a one x plus b one

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(d), p. 2

to the same data. (In MATLAB and in most programs the natural logarithm is typed log.) Report a1a_1 and b1b_1, to three decimal places. Taking the exponential of both sides gives

The exponential law
y=eb1 ea1xy = e^{b_1}\,e^{a_1x}
In words

y equals e to the power b one e to the power a one x

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(d), p. 2

Compute the errors, the actual yiy_i minus the value of this formula, and report the size of the largest one in millions of iPods, to two decimal places. Use all the digits of a1a_1 and b1b_1: the exponential is sensitive to rounding.

Hint

The data points are now (xi,ln⁡yi)(x_i, \ln y_i). The matrix AA of part (c) stays the same, because the xix_i are the same. Only the right-hand side changes.

Hint

The errors asked for are differences of yy values, in millions of iPods, not differences of logarithms.

Solution

The idea. Replace each yiy_i by ln⁡yi\ln y_i and repeat part (c).

The logarithms and their sums

xix_i12345
ln⁡yi\ln y_i−2.0794−0.75500.37232.11183.4645

Their sum is ∑ln⁡yi=3.1141\sum \ln y_i = 3.1141, and ∑xiln⁡yi=23.2968\sum x_i\ln y_i = 23.2968.

Solve the system

The matrix is the one of part (c). Three times the second equation, taken away from the first, leaves 10a1=23.2968−3×3.1141=13.954710a_1 = 23.2968 - 3 \times 3.1141 = 13.9547 (with all digits kept), so

The best fit for the logarithm
a1=1.3955,b1=3.1141−15a15=−3.5636a_1 = 1.3955, \qquad b_1 = \frac{3.1141 - 15a_1}{5} = -3.5636
In words

a one equals 1.3955, b one equals the quantity 3.1141 minus 15 a one, all over 5 equals minus 3.5636

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(d) (our own solution)

The errors

Year20012002200320042005
Actual yiy_i0.1250.4701.4518.26331.960
Exponential law0.1140.4621.8647.52530.379
Error0.0110.008−0.4130.7381.581

The worst case is again 2005, but now the law is only 1.581.58 million too low, against 9.219.21 million for the line.

Check the result

The law reads y=0.02834×4.037 xy = 0.02834 \times 4.037^{\,x}, because eb1=0.02834e^{b_1} = 0.02834 and ea1=4.037e^{a_1} = 4.037: the fitted sales grow by a factor of about 44 every year. The data agree: the sales of each year divided by those of the year before are 3.763.76, 3.093.09, 5.695.69 and 3.873.87. One remark of our own: this fit makes the square deviations of ln⁡y\ln y as small as possible, not those of yy itself, so it is the best line for the logarithms and not exactly the best exponential for the sales.

(e)3 points

Show on one plot: the five data points as separate marks, the best-fitting line of part (c) as a dashed line, and the exponential law of part (d) as a solid curve. (MIT's students joined the five values of the law by straight segments. A smooth curve is fine.)

This part has no answer box: compare your plot with the one in the solution and mark it yourself.

Hint

For the line, two points are enough, for example at x=1x = 1 and x=5x = 5. For the curve, use the five values of the law that you found in part (d), or let your tool draw eb1ea1xe^{b_1}e^{a_1x}.

Solution

The idea. Draw both fits over the data and compare them by eye.

The plot

The five yearly sales of iPods (dots), the least-squares line of part (c) (dashed) and the exponential law of part (d) (solid). Both curves are computed from their formulas.

What it shows

The dashed line misses the bend of the data: it runs below the first and the last point and above the three in between, and it is below zero until x=1.82x = 1.82. The solid curve passes close to all five points. It is a little too high at x=3x = 3 and a little too low at x=4x = 4 and x=5x = 5, as the errors of part (d) say.

Check your plot

Three things to look for in your own plot. The line crosses the xx-axis between 2001 and 2002, at x=12.9851/7.1463=1.82x = 12.9851/7.1463 = 1.82. Line and curve cross twice, near x=1.9x = 1.9 and x=4.7x = 4.7: between those two the line is the higher one. And at x=5x = 5 the curve (30.3830.38) is far above the line (22.7522.75) and just below the data point (31.9631.96).

(f)1 point

According to the exponential law of part (d), how many iPods were sold in 2006, and how many would be sold in 2015? Compare the second number with the world population, which MIT's sheet (written in 2007) puts at about 6.6 billion.

Give the number for 2006 in millions, to the nearest million, and the number for 2015 in billions (thousands of millions), within 2%.

Hint

The year 2006 is x=6x = 6. The law gives millions of iPods, and a billion is a thousand millions.

Solution

The idea. Put x=6x = 6 and x=15x = 15 into the exponential law. This uses the fit outside the years it was made from.

The two predictions

The exponential law in 2006 and in 2015
eb1e6a1=122.6 million,eb1e15a1=3.49×107 million=3.49×1013e^{b_1}e^{6a_1} = 122.6 \text{ million}, \qquad e^{b_1}e^{15a_1} = 3.49 \times 10^{7} \text{ million} = 3.49 \times 10^{13}
In words

e to the power b one e to the power 6 a one equals 122.6 million, e to the power b one e to the power 15 a one equals 3.49 times 10 to the power 7 million equals 3.49 times 10 to the power 13

Source: MIT 18.02 Problem Set 4, Part B, Problem 1(f) (our own solution)

For 2015 that is about 34 90034\,900 billion iPods, or 35 million million.

Compare with the world

Divided by 6.6 billion people, the number for 2015 is about 53005300 iPods for every person on Earth, in one year. That cannot happen: no market keeps growing by a factor of 4 a year. MIT's sheet adds that the growth had already slowed in 2006, when 46.4 million iPods were sold, far fewer than the 122.6 million of the law.

Check the result

From 2005 to 2006 the law multiplies its value by ea1=4.037e^{a_1} = 4.037: 30.379×4.037=122.630.379 \times 4.037 = 122.6. The best-fitting line of part (c) gives 7.1463×6−12.9851=29.97.1463 \times 6 - 12.9851 = 29.9 million for 2006, too low this time: less than the 31.96 million of 2005. The lesson to take away is that a fit describes the data it was made from, and says little about years far outside them.

After: MIT 18.02 Problem Set 4, Part B, Problem 1

Problem 2#

Problem

The largest triangle inscribed in the unit circle

8 points

A triangle is inscribed in the unit circle of the plane: its three vertices lie on the circle of radius 11 about the origin. One vertex is the point (1,0)(1, 0). The other two are the points of the circle at the polar angles θ1\theta_1 and θ2\theta_2, and going round the circle counterclockwise from (1,0)(1, 0) you meet the vertex at θ1\theta_1 first and the vertex at θ2\theta_2 second.

(a)2 points

Express the area AA of the triangle in terms of θ1\theta_1 and θ2\theta_2. What is the set of possible values of θ1\theta_1 and θ2\theta_2?

In the box, type t1 for θ1\theta_1 and t2 for θ2\theta_2.

Hint

The vertices are (1,0)(1, 0), (cos⁡θ1,sin⁡θ1)(\cos\theta_1, \sin\theta_1) and (cos⁡θ2,sin⁡θ2)(\cos\theta_2, \sin\theta_2). Take the two vectors from the first vertex to the other two.

Hint

The lesson on determinants gives the area of the parallelogram with two given sides in the plane as a 2 × 2 determinant, up to its sign. A triangle is half a parallelogram.

Solution

The idea. Half the determinant of two sides of a triangle is its area, with a plus sign when the second side lies counterclockwise from the first.

Two sides as vectors

Call the vertices P0=(1,0)P_0 = (1, 0), P1=(cos⁡θ1,sin⁡θ1)P_1 = (\cos\theta_1, \sin\theta_1) and P2=(cos⁡θ2,sin⁡θ2)P_2 = (\cos\theta_2, \sin\theta_2) (the names are ours). Then

Two sides of the inscribed triangle
P0P1⃗=⟨cos⁡θ1−1, sin⁡θ1⟩,P0P2⃗=⟨cos⁡θ2−1, sin⁡θ2⟩\vec{P_0P_1} = \langle \cos\theta_1 - 1,\ \sin\theta_1\rangle, \qquad \vec{P_0P_2} = \langle \cos\theta_2 - 1,\ \sin\theta_2\rangle
In words

vector P nought P one equals the average of cos theta one minus 1, sine theta one, vector P nought P two equals the average of cos theta two minus 1, sine theta two

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(a) (our own solution)

The determinant

The vertices P0P_0, P1P_1, P2P_2 follow each other counterclockwise, so the determinant of the two sides, in this order, is positive and equal to the area of their parallelogram:

Area of the inscribed triangle
A=12((cos⁡θ1−1)sin⁡θ2−sin⁡θ1(cos⁡θ2−1))=12(sin⁡θ1+sin⁡(θ2−θ1)−sin⁡θ2)A = \tfrac12\big((\cos\theta_1 - 1)\sin\theta_2 - \sin\theta_1(\cos\theta_2 - 1)\big) = \tfrac12\big(\sin\theta_1 + \sin(\theta_2 - \theta_1) - \sin\theta_2\big)
In words

capital A equals one half the quantity the quantity cos theta one minus 1, sine theta two minus sine theta one the quantity cos theta two minus 1, equals one half the quantity sine theta one plus sine of the quantity theta two minus theta one, minus sine theta two

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(a) (our own solution)

The last step uses sin⁡θ2cos⁡θ1−cos⁡θ2sin⁡θ1=sin⁡(θ2−θ1)\sin\theta_2\cos\theta_1 - \cos\theta_2\sin\theta_1 = \sin(\theta_2 - \theta_1).

The possible values

Measure both angles from the vertex (1,0)(1, 0), counterclockwise, between 00 and 2π2\pi. The vertex at θ1\theta_1 comes first and the three vertices are different points, so

The region of the two angles
0<θ1<θ2<2π0 < \theta_1 < \theta_2 < 2\pi
In words

0 less than theta one less than theta two less than 2 pi

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(a) (our own solution)

In a plane with θ1\theta_1 along one axis and θ2\theta_2 along the other, this region is the inside of a triangle with corners (0,0)(0, 0), (0,2π)(0, 2\pi) and (2π,2π)(2\pi, 2\pi). On its three sides, θ1=0\theta_1 = 0, θ2=2π\theta_2 = 2\pi and θ1=θ2\theta_1 = \theta_2, two vertices of the inscribed triangle fall together and it flattens to a line segment.

Check the result

Take θ1=π/2\theta_1 = \pi/2 and θ2=π\theta_2 = \pi: the vertices are (1,0)(1, 0), (0,1)(0, 1) and (−1,0)(-1, 0), a triangle with base 22 and height 11, so area 11. The formula gives 12(1+1−0)=1\tfrac12(1 + 1 - 0) = 1. A second check: the three terms are the areas, with signs, of the three triangles that join the origin to each side. The side from P0P_0 to P1P_1 gives 12sin⁡θ1\tfrac12\sin\theta_1, the side from P1P_1 to P2P_2 gives 12sin⁡(θ2−θ1)\tfrac12\sin(\theta_2 - \theta_1), and the side from P2P_2 back to P0P_0 gives 12sin⁡(2π−θ2)=−12sin⁡θ2\tfrac12\sin(2\pi - \theta_2) = -\tfrac12\sin\theta_2.

(b)2 points

Find the critical points of the function A(θ1,θ2)A(\theta_1, \theta_2) in this region. Give the two angles of a critical point in radians, to three decimal places.

Hint

Set both partial derivatives of AA equal to zero. Each equation says that two cosines are equal.

Hint

Between 00 and 2π2\pi, two different angles have the same cosine only when they add up to 2π2\pi. Use that for θ1\theta_1 and θ2\theta_2, and then the double-angle formula cos⁡2θ=2cos⁡2θ−1\cos 2\theta = 2\cos^2\theta - 1.

Solution

The idea. A critical point is a point where both partial derivatives are zero.

The partial derivatives

The first derivatives of the area
∂A∂θ1=12(cos⁡θ1−cos⁡(θ2−θ1)),∂A∂θ2=12(cos⁡(θ2−θ1)−cos⁡θ2)\frac{\partial A}{\partial\theta_1} = \tfrac12\big(\cos\theta_1 - \cos(\theta_2 - \theta_1)\big), \qquad \frac{\partial A}{\partial\theta_2} = \tfrac12\big(\cos(\theta_2 - \theta_1) - \cos\theta_2\big)
In words

partial capital A over partial theta one equals one half the quantity cos theta one minus cos of the quantity theta two minus theta one, partial capital A over partial theta two equals one half the quantity cos of the quantity theta two minus theta one, minus cos theta two

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(b) (our own solution)

Both are zero exactly when the three cosines are equal:

The condition for a critical point
cos⁡θ1=cos⁡(θ2−θ1)=cos⁡θ2\cos\theta_1 = \cos(\theta_2 - \theta_1) = \cos\theta_2
In words

cos theta one equals cos of the quantity theta two minus theta one, equals cos theta two

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(b) (our own solution)

The two angles add up to a full turn

On the way from 00 to 2π2\pi the cosine falls from 11 to −1-1 and climbs back, so two different angles in that range have the same cosine only when they lie mirrored about π\pi. Since θ1<θ2\theta_1 < \theta_2, the equation cos⁡θ1=cos⁡θ2\cos\theta_1 = \cos\theta_2 gives θ2=2π−θ1\theta_2 = 2\pi - \theta_1, with θ1<π\theta_1 < \pi.

The middle cosine

Then θ2−θ1=2π−2θ1\theta_2 - \theta_1 = 2\pi - 2\theta_1, and cos⁡(2π−2θ1)=cos⁡2θ1=2cos⁡2θ1−1\cos(2\pi - 2\theta_1) = \cos 2\theta_1 = 2\cos^2\theta_1 - 1. The condition becomes

An equation for the first cosine
2cos⁡2θ1−cos⁡θ1−1=(2cos⁡θ1+1)(cos⁡θ1−1)=02\cos^2\theta_1 - \cos\theta_1 - 1 = (2\cos\theta_1 + 1)(\cos\theta_1 - 1) = 0
In words

2 cos squared theta one minus cos theta one minus 1 equals the quantity 2 cos theta one plus 1, the quantity cos theta one minus 1, equals 0

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(b) (our own solution)

cos⁡θ1=1\cos\theta_1 = 1 would mean θ1=0\theta_1 = 0, which is not in the region. So cos⁡θ1=−12\cos\theta_1 = -\tfrac12, and with θ1<π\theta_1 < \pi:

The critical point of the area
θ1=2π3=2.094,θ2=4π3=4.189\theta_1 = \frac{2\pi}{3} = 2.094, \qquad \theta_2 = \frac{4\pi}{3} = 4.189
In words

theta one equals 2 pi over 3 equals 2.094, theta two equals 4 pi over 3 equals 4.189

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(b) (our own solution)

It is the only critical point in the region.

Check the result

At this point θ2−θ1=2π/3\theta_2 - \theta_1 = 2\pi/3 as well, and the three cosines are cos⁡(2π/3)=−12\cos(2\pi/3) = -\tfrac12, −12-\tfrac12 and cos⁡(4π/3)=−12\cos(4\pi/3) = -\tfrac12. The solution cos⁡θ1=1\cos\theta_1 = 1 that was thrown out is not meaningless: at the three corners of the region, (0,0)(0, 0), (0,2π)(0, 2\pi) and (2π,2π)(2\pi, 2\pi), all three cosines are 11 and both derivatives are zero. But those points are on the boundary, where the triangle has shrunk to a single point.

(c)2 points

Find the maximum and the minimum of AA, from the values of AA at the critical points and its behaviour on the boundary of the region. Justify your answer, and describe the shapes of the triangles in the two cases.

Give the maximum as a decimal, to three decimal places.

Hint

The lesson's warning: the largest and smallest values of a function are found at a critical point or on the boundary of the region. What is AA when θ1=0\theta_1 = 0, when θ2=2π\theta_2 = 2\pi and when θ1=θ2\theta_1 = \theta_2?

Hint

At the critical point the three vertices divide the circle into three equal arcs.

Solution

The idea. Compare the value of AA at the one critical point with its values on the boundary.

The value at the critical point

At θ1=2π/3\theta_1 = 2\pi/3, θ2=4π/3\theta_2 = 4\pi/3: sin⁡θ1=32\sin\theta_1 = \tfrac{\sqrt 3}{2}, sin⁡(θ2−θ1)=32\sin(\theta_2 - \theta_1) = \tfrac{\sqrt 3}{2} and sin⁡θ2=−32\sin\theta_2 = -\tfrac{\sqrt 3}{2}, so

The area at the critical point
A=12(32+32+32)=334=1.299A = \tfrac12\left(\tfrac{\sqrt 3}{2} + \tfrac{\sqrt 3}{2} + \tfrac{\sqrt 3}{2}\right) = \frac{3\sqrt 3}{4} = 1.299
In words

capital A equals one half the quantity the square root of 3 over 2 plus the square root of 3 over 2 plus the square root of 3 over 2, equals 3 the square root of 3 over 4 equals 1.299

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(c) (our own solution)

The boundary

On the side θ1=0\theta_1 = 0: A=12(0+sin⁡θ2−sin⁡θ2)=0A = \tfrac12(0 + \sin\theta_2 - \sin\theta_2) = 0. On the side θ1=θ2\theta_1 = \theta_2: A=12(sin⁡θ1+0−sin⁡θ1)=0A = \tfrac12(\sin\theta_1 + 0 - \sin\theta_1) = 0. On the side θ2=2π\theta_2 = 2\pi: A=12(sin⁡θ1+sin⁡(2π−θ1)−0)=0A = \tfrac12(\sin\theta_1 + \sin(2\pi - \theta_1) - 0) = 0. So A=0A = 0 on the whole boundary, as it must be for a triangle that has flattened to a line segment.

The maximum

Inside the region AA is the area of a real triangle, so A>0A > 0. Add the boundary to the region: AA is a continuous function on this closed and bounded triangle of the (θ1,θ2)(\theta_1, \theta_2) plane, so it has a largest value there. That value is not on the boundary, where A=0A = 0, so it is reached inside, at a critical point. There is only one. So the maximum is 33/4=1.2993\sqrt 3/4 = 1.299, at θ1=2π/3\theta_1 = 2\pi/3, θ2=4π/3\theta_2 = 4\pi/3. The three vertices are a third of a turn apart: the triangle is equilateral.

The minimum

The smallest value is 00, and it is found on the boundary only: two (or all three) vertices fall together and the triangle is a line segment (or a point). Such a figure is not a real triangle. Among real triangles, with 0<θ1<θ2<2π0 < \theta_1 < \theta_2 < 2\pi, there is no smallest area: AA can be made as small as you like by moving two vertices close together, but it is never 00.

Check the result

An equilateral triangle in the unit circle has sides of length 3=1.732\sqrt 3 = 1.732 (the distance from (1,0)(1, 0) to (−12,32)(-\tfrac12, \tfrac{\sqrt 3}{2})), and the area of an equilateral triangle with side ss is 34s2=34⋅3=1.299\tfrac{\sqrt 3}{4}s^2 = \tfrac{\sqrt 3}{4} \cdot 3 = 1.299. The right-angled triangle of part (a) has area 11, which is less. For comparison, the circle itself has area π=3.142\pi = 3.142.

(d)2 points

Use the second derivative test to confirm the nature of the critical point of part (b).

The lesson calls the three second derivatives at the critical point AA, BB and CC. Here the letter AA is already the area, so write them out as ∂2A/∂θ12\partial^2A/\partial\theta_1^2, ∂2A/∂θ1∂θ2\partial^2A/\partial\theta_1\partial\theta_2 and ∂2A/∂θ22\partial^2A/\partial\theta_2^2. The quantity the test looks at (the lesson's AC−B2AC - B^2) is then

The quantity of the second derivative test
D=∂2A∂θ12 ∂2A∂θ22−(∂2A∂θ1 ∂θ2)2D = \frac{\partial^2A}{\partial\theta_1^2}\,\frac{\partial^2A}{\partial\theta_2^2} - \left(\frac{\partial^2A}{\partial\theta_1\,\partial\theta_2}\right)^2
In words

D equals partial squared capital A over partial theta one squared, times partial squared capital A over partial theta two squared minus ( partial squared capital A over the quantity partial theta one partial theta two, ) squared

Source: 18.02 lecture summaries, Week 4 (Prof. Auroux), Lectures 9 and 10, pp. 1–3, Lecture 10, p. 2

(The name DD is ours.) Give both numbers at the critical point, as decimals to three decimal places.

Hint

Differentiate the two first derivatives of part (b) once more, and put in θ1=2π/3\theta_1 = 2\pi/3, θ2=4π/3\theta_2 = 4\pi/3.

Hint

The lesson's rule: if D>0D > 0 the point is a local minimum or a local maximum, and the sign of ∂2A/∂θ12\partial^2A/\partial\theta_1^2 tells which. If D<0D < 0 it is a saddle.

Solution

The idea. Compute the three second derivatives at the critical point and apply the lesson's test.

The second derivatives

The second derivatives of the area
∂2A∂θ12=−12(sin⁡θ1+sin⁡(θ2−θ1)),∂2A∂θ1 ∂θ2=12sin⁡(θ2−θ1),∂2A∂θ22=12(sin⁡θ2−sin⁡(θ2−θ1))\frac{\partial^2A}{\partial\theta_1^2} = -\tfrac12\big(\sin\theta_1 + \sin(\theta_2 - \theta_1)\big), \qquad \frac{\partial^2A}{\partial\theta_1\,\partial\theta_2} = \tfrac12\sin(\theta_2 - \theta_1), \qquad \frac{\partial^2A}{\partial\theta_2^2} = \tfrac12\big(\sin\theta_2 - \sin(\theta_2 - \theta_1)\big)
In words

partial squared capital A over partial theta one squared equals minus one half the quantity sine theta one plus sine of the quantity theta two minus theta one, partial squared capital A over the quantity partial theta one partial theta two, equals one half sine of the quantity theta two minus theta one, partial squared capital A over partial theta two squared equals one half the quantity sine theta two minus sine of the quantity theta two minus theta one

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(d) (our own solution)

At the critical point

With sin⁡θ1=sin⁡(θ2−θ1)=32\sin\theta_1 = \sin(\theta_2 - \theta_1) = \tfrac{\sqrt 3}{2} and sin⁡θ2=−32\sin\theta_2 = -\tfrac{\sqrt 3}{2}:

The second derivatives at the critical point
∂2A∂θ12=−32=−0.866,∂2A∂θ1 ∂θ2=34=0.433,∂2A∂θ22=−32=−0.866\frac{\partial^2A}{\partial\theta_1^2} = -\frac{\sqrt 3}{2} = -0.866, \qquad \frac{\partial^2A}{\partial\theta_1\,\partial\theta_2} = \frac{\sqrt 3}{4} = 0.433, \qquad \frac{\partial^2A}{\partial\theta_2^2} = -\frac{\sqrt 3}{2} = -0.866
In words

partial squared capital A over partial theta one squared equals minus the square root of 3 over 2 equals minus 0.866, partial squared capital A over the quantity partial theta one partial theta two, equals the square root of 3 over 4 equals 0.433, partial squared capital A over partial theta two squared equals minus the square root of 3 over 2 equals minus 0.866

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(d) (our own solution)

The test

The test at the critical point
D=(−32)(−32)−(34)2=34−316=916=0.5625D = \left(-\frac{\sqrt 3}{2}\right)\left(-\frac{\sqrt 3}{2}\right) - \left(\frac{\sqrt 3}{4}\right)^2 = \frac34 - \frac{3}{16} = \frac{9}{16} = 0.5625
In words

D equals (- the square root of 3 over 2 ) (- the square root of 3 over 2 ) minus ( the square root of 3 over 4 ) squared equals three quarters minus 3 over 16 equals 9 over 16 equals 0.5625

Source: MIT 18.02 Problem Set 4, Part B, Problem 2(d) (our own solution)

D>0D > 0, so the point is a local minimum or a local maximum, and ∂2A/∂θ12<0\partial^2A/\partial\theta_1^2 < 0, so it is a local maximum. That agrees with part (c), which showed more: it is the maximum over the whole region.

Check the result

Move one vertex a little and look at the area directly. With θ2=4π/3\theta_2 = 4\pi/3 kept and θ1=2π/3+0.1\theta_1 = 2\pi/3 + 0.1, the formula of part (a) gives A=1.2947A = 1.2947, which is 0.00430.0043 less than 1.29901.2990. The second derivative predicts a change of 12×(−0.866)×0.12=−0.0043\tfrac12 \times (-0.866) \times 0.1^2 = -0.0043.

After: MIT 18.02 Problem Set 4, Part B, Problem 2

Problem 3#

Problem

Partial derivatives in polar coordinates

6 points

Let w=f(x,y)w = f(x, y) be a function of the rectangular coordinates, and change to polar coordinates:

Polar coordinates
x=rcos⁡θ,y=rsin⁡θx = r\cos\theta, \qquad y = r\sin\theta
In words

x equals r cos theta, y equals r sine theta

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(a), p. 3

Then ww is also a function of rr and θ\theta. Write wxw_x, wyw_y, wrw_r and wθw_\theta for its partial derivatives. (MIT points to exercise 2E-5 of its Notes, which starts from the same formulas.)

(a)1 point

Use the chain rule to derive the change of variables formula in matrix form,

From rectangular to polar derivatives
[wrwθ]=A[wxwy]\begin{bmatrix} w_r \\ w_\theta \end{bmatrix} = A\begin{bmatrix} w_x \\ w_y \end{bmatrix}
In words

w sub r; w sub theta equals capital A w sub x; w sub y

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(a), p. 3

and write the four entries of the 2 × 2 matrix AA as functions of rr and θ\theta. The box asks for the bottom left entry.

Hint

The lesson's chain rule with new variables: wr=wx xr+wy yrw_r = w_x\,x_r + w_y\,y_r, where xrx_r is the partial derivative of x=rcos⁡θx = r\cos\theta with respect to rr. Write the same for wθw_\theta.

Solution

The idea. The chain rule gives each new derivative as a combination of wxw_x and wyw_y. The coefficients are the entries of AA.

The chain rule

Chain rule in two new variables
wr=wx xr+wy yr,wθ=wx xθ+wy yθw_r = w_x\,x_r + w_y\,y_r, \qquad w_\theta = w_x\,x_\theta + w_y\,y_\theta
In words

w sub r equals w sub x x sub r plus w sub y y sub r, w sub theta equals w sub x x sub theta plus w sub y y sub theta

Source: 18.02 lecture summaries, Week 5 (Prof. Auroux), Lecture 11, p. 1, Lecture 11, p. 1

From x=rcos⁡θx = r\cos\theta and y=rsin⁡θy = r\sin\theta: xr=cos⁡θx_r = \cos\theta, yr=sin⁡θy_r = \sin\theta, xθ=−rsin⁡θx_\theta = -r\sin\theta and yθ=rcos⁡θy_\theta = r\cos\theta.

The matrix

The matrix from rectangular to polar derivatives
A=[xryrxθyθ]=[cos⁡θsin⁡θ−rsin⁡θrcos⁡θ]A = \begin{bmatrix} x_r & y_r \\ x_\theta & y_\theta \end{bmatrix} = \begin{bmatrix} \cos\theta & \sin\theta \\ -r\sin\theta & r\cos\theta \end{bmatrix}
In words

capital A equals x sub r y sub r; x sub theta y sub theta equals cos theta sine theta; minus r sine theta r cos theta

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(a) (our own solution)

Its first row is the lesson's formula wr=cos⁡θ wx+sin⁡θ wyw_r = \cos\theta\,w_x + \sin\theta\,w_y.

Check the result

Our own example: w=xw = x. Then wx=1w_x = 1 and wy=0w_y = 0, and the formula gives wr=cos⁡θw_r = \cos\theta and wθ=−rsin⁡θw_\theta = -r\sin\theta. Directly: w=rcos⁡θw = r\cos\theta has exactly these derivatives. The units fit as well: with xx, yy and rr in metres, wθw_\theta is a change of ww per radian, and it is rr metres per radian times a change of ww per metre.

(b)2 points

Now go the other way. Use the formulas

Polar coordinates from rectangular ones
r=x2+y2,θ=tan⁡−1yxr = \sqrt{x^2 + y^2}, \qquad \theta = \tan^{-1}\frac{y}{x}
In words

r equals the square root of x squared plus y squared, end of root, theta equals inverse tan y over x

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(b), p. 3

to derive, in the same way, the converse formula

From polar to rectangular derivatives
[wxwy]=B[wrwθ]\begin{bmatrix} w_x \\ w_y \end{bmatrix} = B\begin{bmatrix} w_r \\ w_\theta \end{bmatrix}
In words

w sub x; w sub y equals capital B w sub r; w sub theta

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(b), p. 3

and write the entries of the matrix BB as functions of xx and yy. The box asks for the top right entry.

Hint

Now rr and θ\theta are the old variables and xx and yy the new ones: wx=wr rx+wθ θxw_x = w_r\,r_x + w_\theta\,\theta_x.

Hint

The derivative of tan⁡−1u\tan^{-1}u with respect to uu is 1/(1+u2)1/(1 + u^2). Use the one-variable chain rule with u=y/xu = y/x, and tidy up the result.

Solution

The idea. The same chain rule with the roles exchanged: now xx and yy are the variables we differentiate with respect to.

The chain rule

Chain rule back to rectangular coordinates
wx=wr rx+wθ θx,wy=wr ry+wθ θyw_x = w_r\,r_x + w_\theta\,\theta_x, \qquad w_y = w_r\,r_y + w_\theta\,\theta_y
In words

w sub x equals w sub r r sub x plus w sub theta theta sub x, w sub y equals w sub r r sub y plus w sub theta theta sub y

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(b) (our own solution)

The four derivatives

From r=(x2+y2)1/2r = (x^2 + y^2)^{1/2}: rx=12(x2+y2)−1/2⋅2x=x/x2+y2r_x = \tfrac12(x^2 + y^2)^{-1/2} \cdot 2x = x/\sqrt{x^2 + y^2}, and in the same way ry=y/x2+y2r_y = y/\sqrt{x^2 + y^2}. From θ=tan⁡−1(y/x)\theta = \tan^{-1}(y/x):

The derivatives of the polar angle
θx=11+(y/x)2⋅(−yx2)=−yx2+y2,θy=11+(y/x)2⋅1x=xx2+y2\theta_x = \frac{1}{1 + (y/x)^2}\cdot\left(-\frac{y}{x^2}\right) = \frac{-y}{x^2 + y^2}, \qquad \theta_y = \frac{1}{1 + (y/x)^2}\cdot\frac{1}{x} = \frac{x}{x^2 + y^2}
In words

theta sub x equals 1 over the quantity 1 plus the quantity y over x, all squared, times (- y over x squared ) equals minus y over the quantity x squared plus y squared, theta sub y equals 1 over the quantity 1 plus the quantity y over x, all squared, times 1 over x equals x over the quantity x squared plus y squared

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(b) (our own solution)

The matrix

The matrix from polar to rectangular derivatives
B=[rxθxryθy]=[xx2+y2−yx2+y2yx2+y2xx2+y2]B = \begin{bmatrix} r_x & \theta_x \\ r_y & \theta_y \end{bmatrix} = \begin{bmatrix} \dfrac{x}{\sqrt{x^2 + y^2}} & \dfrac{-y}{x^2 + y^2} \\[2ex] \dfrac{y}{\sqrt{x^2 + y^2}} & \dfrac{x}{x^2 + y^2} \end{bmatrix}
In words

capital B equals r sub x theta sub x; r sub y theta sub y equals x over the square root of x squared plus y squared, end of root, minus y over the quantity x squared plus y squared; y over the square root of x squared plus y squared, end of root, x over the quantity x squared plus y squared

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(b) (our own solution)

Check the result

Our own example: w=θw = \theta, so wr=0w_r = 0 and wθ=1w_\theta = 1. The formula gives wx=−y/(x2+y2)w_x = -y/(x^2 + y^2). At the point (1,1)(1, 1) that is −0.5-0.5. Directly: tan⁡−1(1/1.01)−tan⁡−1(1)=−0.00498\tan^{-1}(1/1.01) - \tan^{-1}(1) = -0.00498 for a step of 0.010.01 in xx, a rate of −0.498-0.498. A remark of our own: θ=tan⁡−1(y/x)\theta = \tan^{-1}(y/x) gives the polar angle only in the half plane x>0x > 0. On the yy-axis the formula has no meaning, and for x<0x < 0 it is off by π\pi. The entries of BB hold all the same at every point except the origin: for y>0y > 0, for example, θ=π/2−tan⁡−1(x/y)\theta = \pi/2 - \tan^{-1}(x/y), and differentiating that gives the same θx\theta_x and θy\theta_y.

(c)2 points

Check that B=A−1B = A^{-1} by computing the product ABAB and changing variables, so that both matrices are written with the same pair of coordinates. This part has no answer box: compare your work with the solution and mark it yourself.

Hint

Write BB with rr and θ\theta: put x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta and x2+y2=r2x^2 + y^2 = r^2 into its entries.

Hint

By the lesson on matrices, BB is the inverse of AA when the product is the identity matrix II.

Solution

The idea. Write both matrices in polar coordinates and multiply.

B in polar coordinates

With x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta and x2+y2=r\sqrt{x^2 + y^2} = r:

The matrix B in polar coordinates
B=[cos⁡θ−sin⁡θrsin⁡θcos⁡θr]B = \begin{bmatrix} \cos\theta & -\dfrac{\sin\theta}{r} \\[2ex] \sin\theta & \dfrac{\cos\theta}{r} \end{bmatrix}
In words

capital B equals cos theta minus sine theta over r; sine theta cos theta over r

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(c) (our own solution)

The product

Each entry is a row of AA times a column of BB:

The product AB
AB=[cos⁡θsin⁡θ−rsin⁡θrcos⁡θ][cos⁡θ−sin⁡θrsin⁡θcos⁡θr]=[cos⁡2θ+sin⁡2θ−cos⁡θsin⁡θ+sin⁡θcos⁡θr−rsin⁡θcos⁡θ+rcos⁡θsin⁡θsin⁡2θ+cos⁡2θ]=[1001]AB = \begin{bmatrix} \cos\theta & \sin\theta \\ -r\sin\theta & r\cos\theta \end{bmatrix}\begin{bmatrix} \cos\theta & -\dfrac{\sin\theta}{r} \\[2ex] \sin\theta & \dfrac{\cos\theta}{r} \end{bmatrix} = \begin{bmatrix} \cos^2\theta + \sin^2\theta & \dfrac{-\cos\theta\sin\theta + \sin\theta\cos\theta}{r} \\[2ex] -r\sin\theta\cos\theta + r\cos\theta\sin\theta & \sin^2\theta + \cos^2\theta \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
In words

capital A capital B equals cos theta sine theta; minus r sine theta r cos theta cos theta minus sine theta over r; sine theta cos theta over r equals cos squared theta plus sine squared theta the quantity minus cos theta sine theta plus sine theta cos theta, all over r; minus r sine theta cos theta plus r cos theta sine theta sine squared theta plus cos squared theta equals 1 0; 0 1

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(c) (our own solution)

So AB=IAB = I, and B=A−1B = A^{-1}.

Why it had to be so

Applying AA turns the pair wxw_x, wyw_y into wrw_r, wθw_\theta, and applying BB turns that pair back. Doing one after the other must give back what you started with, for every function ww, and that is what BA=IBA = I and AB=IAB = I say.

Check the result

The lesson's cofactor method for the inverse gives the same. The determinant of AA is rcos⁡2θ+rsin⁡2θ=rr\cos^2\theta + r\sin^2\theta = r. For a 2 × 2 matrix the method comes down to exchanging the two diagonal entries, changing the sign of the other two and dividing by the determinant, and that turns AA into the matrix BB above. With numbers, at r=2r = 2, θ=π/6\theta = \pi/6: the bottom left entry of ABAB is −2×0.5×0.8660+2×0.8660×0.5=0-2 \times 0.5 \times 0.8660 + 2 \times 0.8660 \times 0.5 = 0 and the bottom right entry is 0.25+0.75=10.25 + 0.75 = 1.

(d)1 point

At the point with polar coordinates r=5r = 5, θ=π/2\theta = \pi/2, the derivatives of a function are wr=2w_r = 2 and wθ=10w_\theta = 10. Compute wxw_x and wyw_y at that point.

Hint

Which point is it in rectangular coordinates? Then use the matrix BB of part (b).

Solution

The idea. Find the point, fill in the matrix BB, and multiply.

The point and the matrix

x=5cos⁡(π/2)=0x = 5\cos(\pi/2) = 0 and y=5sin⁡(π/2)=5y = 5\sin(\pi/2) = 5: the point is (0,5)(0, 5), on the positive yy-axis, with x2+y2=25x^2 + y^2 = 25. The entries of BB there are 00 and −5/25=−0.2-5/25 = -0.2 in the first row, and 5/5=15/5 = 1 and 00 in the second.

Multiply

The rectangular derivatives at the point
[wxwy]=[0−0.210][210]=[−22]\begin{bmatrix} w_x \\ w_y \end{bmatrix} = \begin{bmatrix} 0 & -0.2 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 2 \\ 10 \end{bmatrix} = \begin{bmatrix} -2 \\ 2 \end{bmatrix}
In words

w sub x; w sub y equals 0 minus 0.2; 1 0 2; 10 equals minus 2; 2

Source: MIT 18.02 Problem Set 4, Part B, Problem 3(d) (our own solution)

So wx=−2w_x = -2 and wy=2w_y = 2.

Check the result

Put the answer into the formula of part (a). At θ=π/2\theta = \pi/2 the matrix AA has first row 0,10, 1 and second row −5,0-5, 0, so wr=wy=2w_r = w_y = 2 and wθ=−5wx=10w_\theta = -5w_x = 10, as given. The picture agrees. At the point (0,5)(0, 5), moving outwards along rr is moving up, so wr=wyw_r = w_y. Turning counterclockwise moves the point to the left, in the direction of −x-x, by 55 units of length for each radian, so wθ=−5 wxw_\theta = -5\,w_x. (This point is on the yy-axis, where the formula tan⁡−1(y/x)\tan^{-1}(y/x) of part (b) has no meaning. The entries of BB still hold there, as the check of part (b) explains.)

After: MIT 18.02 Problem Set 4, Part B, Problem 3

More practice: MIT's own solved exercises#

Part A of MIT's Problem Set 4 (15 points at MIT, not scored here) is a list of short exercises. Most come from the problems section of MIT's "18.02 Supplementary Notes and Problems", which is on MIT OpenCourseWare under the same licence as the rest of the course, with solutions to the exercises and parts that are not marked with a star. They are not rewritten here: open the exercises (section 2, Partial differentiation), try them, then compare with MIT's solutions.

An exercise number such as 2H-3 means section 2, group H, exercise 3; the letters after it are its parts. MIT assigned these, day by day:

ForExercises in section 2 of the Notes
Lecture 9 (MIT's sheet: Lecture 10): maxima, minima and least squares2F-1a, b, 2F-2; 2G-1a, b, 2G-4
Lecture 10 (MIT's sheet: Lecture 11): the second derivative test, boundaries and infinity2H-1a, c, 2H-3, 2H-4, 2H-6
Lecture 11 (MIT's sheet: Lecture 12): differentials and the chain rule2C-1a, b, c, d, 2C-2, 2C-3, 2C-5a, b; 2E-1a, b, c, 2E-2b, c, 2E-5, 2E-8a, b

Parts a and b of exercise 2G-1 are marked with a star in the Notes, so MIT's solutions work only its part c, which goes the same way. Part b of exercise 2E-8 is starred as well, so MIT's solutions work only its part a. Some of the exercises in groups 2C and 2E use the gradient ∇w=⟨wx,wy⟩\nabla w = \langle w_x, w_y\rangle, the vector of the partial derivatives, which is the subject of the next lesson. MIT's sheet tells its students to look that definition up before starting them.

The theory behind Problems 1 and 2 is in two short chapters of the same Notes: LS, Least Squares Interpolation and SD, Second Derivative Test.

MIT's list also has one exercise from the course textbook (Edwards and Penney, Multivariable Calculus, 6th edition), and sections of that book to read. The textbook is not openly licensed and is not used on this site, so they are not part of this page. MIT's sheet ends with a page of directions for starting MATLAB on MIT's own computers in 2007, which is left out as well.

Symbols on this page

Show the 57 symbols used here
θ\theta theta.
An angle. Say it: “theta” (sounds like “thay-ta or thee-ta”).
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
⟨\langle angle brackets.
The average (mean value) of what is inside, ⟨…⟩. Say it: “the average of”.
∂\partial partial.
Partial derivative: the rate of change with one variable, holding the others fixed. Say it: “partial”.
∇\nabla nabla (del).
Del: ∇f is the gradient, ∇·v the divergence, ∇×v the curl, ∇² the Laplacian. Say it: “del”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
sin⁡\sin sine.
Sine of an angle. Say it: “sine”.
cos⁡\cos cosine.
Cosine of an angle. Say it: “cos”.
tan⁡\tan tangent.
Tangent of an angle, sin/cos. Say it: “tan”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
v⃗\vec v vector arrow.
A vector: a quantity with a size and a direction. Say it: “vector”.
aa a.
In Problem 1, the slope of the best-fitting line y = ax + b. Say it: “a”.
TT T.
As a superscript: the transpose, the same numbers with the row written as a column. Say it: “capital T”.
xx x.
In Problem 1, the year minus 2000 (in bold, the row of all the x_i). In Problem 3, the x coordinate. Say it: “x”.
yy y.
In Problem 1, the yearly sales in millions (in bold, the row of all the data values y_i). In Problem 3, the y coordinate. Say it: “y”.
nn n.
The number of data points (5 for the iPod data). Say it: “n”.
ee e.
The base of natural logarithms, about 2.718. Say it: “e”.
ff f.
A function of two variables, f(x, y). Say it: “f”.
rr r.
In Problem 1 (in bold), the right-hand column of the matrix equation Az = r. In Problem 3, the polar distance from the origin. Say it: “r”.
DD D.
Our name for the quantity of the second derivative test (the lesson's AC − B²), for the area of the triangle. Say it: “D”.
AA A.
In Problems 1 and 3, a 2 × 2 matrix. In Problem 2, the area of the inscribed triangle (in the lesson's second derivative test, A is the second derivative f_xx at the critical point). Say it: “capital A”.
BB B.
In Problem 3, the 2 × 2 matrix that turns w_r and w_θ into w_x and w_y (in the lesson's second derivative test, B is the mixed second derivative f_xy). Say it: “capital B”.
CC C.
In the lesson's second derivative test, the second derivative f_yy at the critical point. Say it: “C”.
bb b.
In Problem 1, the intercept of the best-fitting line y = ax + b. Say it: “b”.
ss s.
The side of an equilateral triangle. Say it: “s”.
a1a_{1} a one.
The slope of the best line for the logarithms, ln y = a₁x + b₁: the growth rate of the exponential law. Say it: “a one”.
uu u.
In Problem 1 (in bold), the row of n ones. In a hint of Problem 3, short for y/x. Say it: “u”.
ww w.
The value of the function, w = f(x, y), also seen as a function of r and θ. Say it: “w”.
x1x_{1} x 1.
The x value of the first data point. Say it: “x one”.
x2x_{2} x 2.
The x value of the second data point. Say it: “x two”.
y1y_{1} y 1.
The y value of the first data point. Say it: “y one”.
y2y_{2} y 2.
The y value of the second data point. Say it: “y two”.
P0P_{0} processed power spectrum.
The fixed vertex (1, 0) of the inscribed triangle (our name). Say it: “P nought”.
xnx_{n} x n.
The x value of the last data point. Say it: “x sub n”.
II I.
The identity matrix: ones on the diagonal, zeros elsewhere. Say it: “capital I”.
xix_{i} x i.
The x value of the i-th data point: its year minus 2000. Say it: “x sub i”.
yiy_{i} y i.
The y value of the i-th data point: the iPods sold in that year, in millions. Say it: “y initial”.
θ1\theta_{1} theta one.
The polar angle of the second vertex of the inscribed triangle, counted counterclockwise from the vertex (1, 0). Unit: rad. Say it: “theta one”.
yny_{n} y n.
The y value of the last data point. Say it: “y sub n”.
θ2\theta_{2} theta 2.
The polar angle of the third vertex of the inscribed triangle, counted counterclockwise from the vertex (1, 0). Unit: rad. Say it: “theta two”.
b1b_{1} b 1.
The intercept of the best line for the logarithms, ln y = a₁x + b₁. Say it: “b one”.
P1P_{1} P 1.
The vertex of the inscribed triangle at the polar angle θ₁ (our name). Say it: “P one”.
P2P_{2} P 2.
The vertex of the inscribed triangle at the polar angle θ₂ (our name). Say it: “P two”.
wxw_{x} w sub x.
The partial derivative ∂w/∂x, with y held fixed. Say it: “w sub x”.
wyw_{y} w sub y.
The partial derivative ∂w/∂y, with x held fixed. Say it: “w sub y”.
xrx_{r} x sub r.
The partial derivative ∂x/∂r = cos θ. Say it: “x sub r”.
yry_{r} y sub r.
The partial derivative ∂y/∂r = sin θ. Say it: “y sub r”.
wθw_{\theta} w theta.
The partial derivative ∂w/∂θ, with r held fixed. Say it: “w sub theta”.
wrw_{r} w r.
The partial derivative ∂w/∂r, with θ held fixed. Say it: “w sub r”.
xθx_{\theta} x sub theta.
The partial derivative ∂x/∂θ = −r sin θ. Say it: “x sub theta”.
yθy_{\theta} y sub theta.
The partial derivative ∂y/∂θ = r cos θ. Say it: “y sub theta”.
rxr_{x} r sub x.
The partial derivative ∂r/∂x = x/√(x² + y²). Say it: “r sub x”.
ryr_{y} r sub y.
The partial derivative ∂r/∂y = y/√(x² + y²). Say it: “r sub y”.
θx\theta_{x} theta sub x.
The partial derivative ∂θ/∂x = −y/(x² + y²). Say it: “theta sub x”.
θy\theta_{y} theta sub y.
The partial derivative ∂θ/∂y = x/(x² + y²). Say it: “theta sub y”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 45 words used here

Also used

tangent plane.
The flat plane that just touches a surface at a point and tilts the same way as the surface there. Explained in Tangent planes, critical points and least squares.
critical point.
A point where a function's derivative is zero, so its graph is level there; maxima and minima are found among such points. Explained in Curve sketching with the first and second derivative.
least squares.
A way to fit a line or curve to data: choose it to make the sum of the squared misses between data and prediction smallest. Explained in Tangent planes, critical points and least squares.
second derivative test.
A rule that uses second derivatives at a critical point to tell whether it is a minimum, a maximum or a saddle. Explained in The second derivative test.
differential.
A tiny change in a variable, such as dx, or the matching change in a function along its tangent line, dy = f′(x) dx. Explained in Differentials and antiderivatives.
chain rule.
The rule for the derivative of a function of a function: multiply the derivative of the outer one by that of the inner one. Explained in Circular motion: polar coordinates, position and velocity.
matrix.
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
inverse.
The thing that undoes another: a matrix times its inverse gives the identity matrix, as a function followed by its inverse gives back the start. Explained in Planes through three points, and matrices.
radian.
The natural unit of angle: the angle whose arc on a circle is as long as the radius. A full turn is 2π radians. Explained in Angles, radians and trigonometry.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
MIT.
Massachusetts Institute of Technology: the university in Cambridge, USA, whose free courses this site rewrites.
vector.
A quantity with both a size and a direction, such as a velocity or a force, drawn as an arrow. Explained in Vectors.
transpose.
The matrix made by writing the rows of a matrix as columns, flipping it across its main diagonal. Explained in Planes through three points, and matrices.
scatter.
Of light or particles: to be knocked off their path into new directions by something they meet, such as an electron, atom or nucleus. Explained in Electric and magnetic dipole radiation.
determinant.
A single number worked out from a square array of numbers (a matrix), which measures how the matrix stretches areas or volumes. Explained in Determinants and the cross product.
logarithm.
The power to which a fixed base must be raised to give a number: log₁₀ 1000 = 3 because 10³ = 1000. Explained in Exponentials and logarithms.
natural logarithm.
The logarithm to base e, about 2.718, written ln x: the power to which e must be raised to give x. Explained in Exponentials and logarithms.
unit circle.
The circle of radius 1 centred at the origin; the point at angle θ on it is (cos θ, sin θ). Explained in Angles, radians and trigonometry.
partial derivative.
The rate of change of a function of several variables with respect to one of them, while all the others are held fixed. Explained in Functions of two variables and partial derivatives.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
continuous.
Without breaks, gaps or jumps: a continuous graph can be drawn without lifting the pen; a continuous quantity can take every value in a range. Explained in The rocket equation.
second derivative.
The derivative of a derivative: how fast a rate of change itself is changing. Explained in Acceleration in one dimension.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
local minimum.
A point where a function is smaller than at every nearby point, though it may be larger than somewhere farther away. Explained in Tangent planes, critical points and least squares.
local maximum.
A point where a function is larger than at every nearby point, though it may be smaller than somewhere farther away. Explained in Tangent planes, critical points and least squares.
saddle point.
A point where a surface rises in some directions and falls in others, like the middle of a horse's saddle or a mountain pass. Explained in Functions of two variables and partial derivatives.
polar coordinates.
Coordinates in a flat plane that give a point's distance r from the origin and its angle θ from a fixed direction. Explained in Vectors.
change of variables.
Rewriting a problem in new variables suited to it; in an integral this needs a factor, the Jacobian, for how areas or volumes stretch. Explained in Change of variables in double integrals.
with respect to.
Taking that variable as the one that changes: a derivative with respect to t measures change as t changes, others held fixed. Explained in Average value, weighted averages and probability.
identity matrix.
The square matrix with ones down its main diagonal and zeros elsewhere; it leaves every vector unchanged. Explained in Planes through three points, and matrices.
cofactor.
A minor of a matrix with a plus or minus sign attached, following a checkerboard of signs that starts with plus in the top-left corner. Explained in Planes through three points, and matrices.
gradient.
The vector of a function's partial derivatives; it points the way the function increases fastest, and its length is that fastest rate. Explained in Graphs, straight lines and slope.

Academic

problem set.
A weekly sheet of exercises that students work through and hand in, to practise what the lectures taught.
on paper.
In theory or in a calculation, as opposed to in a real experiment or in reality.
significant.
Large enough to matter or to be noticed; in statistics, too large to put down to chance.
by hand.
Worked out with pen and paper, without a computer; or put in deliberately rather than following from the theory.
error.
The difference between a measured or computed value and the true one; often how large that difference may be.
drops out.
Disappears from an equation, usually because it cancels or appears on both sides.
by a factor of.
Multiplied or divided by the stated number.
by eye.
Judged just by looking, without measuring or calculating.
derive.
To obtain a result by reasoning or calculation from other known results.
converse.
The statement made by swapping the 'if' and 'then' parts of another statement.
comes down to.
Is, in the end, simply a matter of.
theory.
An organised body of ideas, laws and methods about a subject: a tested explanation of nature, or a branch or method of mathematics.
interpolate.
To estimate a value between two known values.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).