# Transformation Functions

This unit covers the following ideas. In preparation for the quiz and exam, make sure you have a lesson plan containing examples that explain and illustrate the following concepts.
1. Be able to use cylindrical and spherical coordinates to describe points, surfaces, and solid regions in $\RR^3$.
2. Be able to use cylindrical and spherical transformation to find parametric equations of surfaces
3. Be able to convert between rectangular and polar coordinates in 2D, and cylindrical and spherical coordinates and rectangular coordinates in 3D.
4. Graph polar functions in the plane. Find intersections of polar equations, and illustrate that not every intersection can be obtained algebraically (you may have to graph the curves).
5. Find derivatives and tangent lines to curves expressed in polar coordinates, like $r=f(\theta)$.
You'll have a chance to teach your examples to your peers prior to the exam.

# Transformations of $\RR^2$

Coordinate transformations let us view or discuss the plane or space in a different way. A 2d transformation $\vec T(u,v)=(x,y)$ tells us how to transform a $(u,v)$ axes into an $(x,y)$ axes—the two outputs of $\vec T$ are considered the $x$ and $y$ coordinates corresponding to the inputs $u$ and $v$.

For this problem, you are just drawing many parametric curves.
See Larson 10.4.

Consider the coordinate transformation $$\vec T(r,\theta) = (r\cos\theta,r\sin\theta).$$ In other words, according to $\vec T$, $x=r\cos\theta$ and $y=r\sin\theta$. This is called the polar coordinate transformation.

1. Draw two 2D axes, one having horizontal axis $r$ and vertical axis $\theta$, and the other axes having horizontal axis $x$ and vertical axis $y$. In the next few parts, we'll see how $\vec T$ will tell us how points on the $(r,\theta)$ axes transform to points on the $(x,y)$ axes.
2. Plot the point $(r,\theta)=(1,\pi/2)$ on the $(r,\theta)$ axes. According to $\vec T$, this point is transformed to what $(x,y)$ point? Plot this corresponding point on the $(x,y)$ axes.
Plot the line segment $r=3$ (for $\theta\in [0,2\pi]$) on the $(r,\theta)$ axes. Plot the corresponding points on the $(x,y)$ axes by letting $r=3$ in $\vec T$ and graphing $\vec T(3,\theta)=(3\cos\theta,3\sin\theta)$ for $\theta\in[0,2\pi]$ (hint: this is just a parametric curve, like we've been plotting).
4. See Sage. Notice that you can add two plots together to draw them both.
Plot the line segment $\theta=\pi/4$ (for $r\in[0,5]$) on the $(r,\theta)$ axes. Plot the corresponding points on the $(x,y)$ axes by letting $\theta=\frac{\pi}{4}$ and then, on the same axes as above, add the graph of $\vec T\left(r,\frac{\pi}{4}\right)=\left(r\frac{\sqrt 2}{2},r \frac{\sqrt 2}{2}\right)$ for $r\in[0,5]$.
5. Use Sage to check your answer. Add to the $(r,\theta)$ axes the plots of $r=1$, $r=2$, $r=3$, and $r=4$ for $\theta\in [0,2\pi]$ and the plots of $\theta=0$, $\theta=\pi/2$, $\theta=3\pi/4$, and $\theta=\pi$ for $r\in[0,5]$. Add the corresponding plots to the $(x,y)$ axes.

In the previous problem, you saw how we can think of 2D transformations as mapping the points of one plane onto another. Another way of thinking about transformations is to view them as giving additional coordinates to points on the plane, i.e., if $\vec T(u,v)=(x,y)$, then the point $(x,y)$ also can be called the point $(u,v)$ in the coordinate system associated with $\vec T$. The next problem investigates this way of thinking about transformations.

See Larson 10.4.
The transformation $\vec T(r,\theta) = (r\cos\theta,r\sin\theta)$ is called the polar coordinate transformation. We will use this transformation to answer the following questions.
1. $\vec T(2,\pi/6)=(a,b)$. What is $(a,b)$? Draw the vector $(a,b)$ on the $(x,y)$ axes, starting at the origin.
2. Show that the length of the vector $(a,b)$ is 2. This is the “radius” of the point $(a,b)$.
3. Show that the angle between the positive $x$-axis and the vector $(a,b)$ is $\pi/6$. This angle is called the azimuth angle.
4. Show that if $\vec T(r,\theta)=(x,y)$, then the “radius” of the point $(x,y)$ is $r$.
5. Show that if $\vec T(r,\theta)=(x,y)$, then the azimuth angle of the vector $(x,y)$ is $\theta$.
Sometimes a transformation may associate multiple coordinates with the same $(x,y)$ point on the plane. In this problem, again use the polar coordinate transform $\vec T(r,\theta) = (r\cos\theta,r\sin\theta)$. Find 5 different $(r,\theta)$ so that $\vec T(r,\theta)=(\sqrt{3},1)$ (each of these is a different set of polar coordinates for the same point $(x,y)=(\sqrt{3},1)$). Make at least one of your $(r,\theta)$ coordinates have a negative $r$, and at least one have a negative $\theta$.
Consider the coordinate transformation $$\vec T(a,\omega)=(a\cos\omega,a^2\sin \omega).$$
1. See Sage.
Let $a=3$; graph the curve $\vec T(3,\omega)=(3\cos\omega,9\sin\omega)$ for $\omega\in[0,2\pi]$.
Let $\omega =\frac{\pi}{4}$ and then, on the same axes as above, add the graph of $\vec T\left(a,\frac{\pi}{4}\right)=\left(a\frac{\sqrt 2}{2},a^2 \frac{\sqrt 2}{2}\right)$ for $a\in[0,4]$.
To the same axes as above, add the graphs of $\vec T(1,\omega), \vec T(2,\omega), \vec T(4,\omega)$ for $\omega\in[0,2\pi]$ and $\vec T(a,0), \vec T(a,\pi/2), \vec T(a,-\pi/6)$ for $a\in[0,4]$.
[Hint: when you're done, you should have a bunch of parabolas and ellipses.]

# Transformations of $\RR^3$

In 3 dimensions, the most common coordinate systems are cylindrical and spherical. The equations for these coordinate systems are:
• Cylindrical Coordinates: $x=r\cos\theta,\, y=r\sin\theta,\, z=z$
• Spherical Coordinates: $x=\rho\sin\phi\cos\theta,\, y=\rho\sin\phi\sin\theta,\, z=\rho\cos\phi$
\marginparbmw{See page 893.} See Larson 11.7.
Let $P=(x,y,z)$ be a point in space. This point lies on a cylinder of radius $r$, where the cylinder has the $z$ axis as its axis of symmetry. The height of the point is $z$ units up from the $xy$ plane. The point casts a shadow in the $xy$ plane at $Q=(x,y,0)$. The angle between the ray $\vec{OQ}$ and the $x$-axis is $\theta$. 1. Explain why $x=r\cos\theta$, $y=r\sin\theta$, and $z=z$.
2. What are bounds on $r$, $\theta$, and $z$ that will give all points on the surface of a cylinder of radius 1 wrapped around the $z$ axis between the $xy$ plane and $z=1$? [Hint: the bounds on $r$ are $r=1$.]
3. What are bounds on $r$, $\theta$, and $z$ that will give all points inside a solid cylinder of radius 2 wrapped around the $z$-axis extending from 1 unit below the $xy$ plane to 1 unit above the $xy$ plane?
\marginparbmw{See page 897.}
See Larson 11.7.
Let $P=(x,y,z)$ be a point in space. This point lies on a sphere of radius $\rho$ (“rho”), where the sphere's center is at the origin $O=(0,0,0)$. The point casts a shadow in the $xy$ plane at $Q=(x,y,0)$. The angle between the ray $\vec{OQ}$ and the $x$-axis is $\theta$, and is called the azimuth angle. The angle between the ray $\vec{OP}$ and the $z$ axis is $\phi$ ("phi"), and is called the inclination angle, polar angle, or zenith angle. 1. Explain why $x=\rho\sin\phi\cos\theta$, $y=\rho\sin\phi\sin\theta$, and $z=\rho\cos\phi$.
2. What are bounds for $\rho$, $\theta$, and $\phi$ that will give all the points on the surface a sphere of radius 1? [Hint: the bounds for $\rho$ are $\rho=1$.]
3. What are bounds on $\rho$, $\theta$, and $\phi$ that will give all the points on or above the $xy$ plane inside a solid sphere of radius 1?
4. What are bounds on $\rho$, $\theta$, and $\phi$ that will give all the points on the surface of a sphere of radius 2 above the plane $z=1$ and where the $y$ coordinates are positive?
See the Wikipedia or MathWorld for a discussion of conventions in different disciplines.

There is some disagreement between different fields about the notation for spherical coordinates. In some fields (like physics), $\phi$ represents the azimuth angle and $\theta$ represents the inclination angle. In some fields, like geography, instead of the inclination angle, the elevation angle is given—the angle from the $xy$-plane (for example, lines of lattitude are from the elevation angle). Additionally, sometimes the coordinates are written in a different order. You should always check the notation for spherical coordinates before communicating using them.

See Larson 11.7:89–94, 111–114.
Consider the spherical coordinates transformation $$\vec T(\rho,\phi,\theta)=(\rho\sin\phi\cos\theta,\rho\sin\phi\sin\theta,\rho\cos\phi),$$ $$\vec T(\rho,\theta,\phi)=(\rho\sin\phi\cos\theta,\rho\sin\phi\sin\theta,\rho\cos\phi),$$ Graphing this transformation requires $3+3=6$ dimensions. In this problem we'll construct parts of this graph by graphing various surfaces. We did something similar for the polar coordinate transformation already in this problem.
1. Graph the surface $T(2,\theta,\phi)$ (in other words, the surface $\rho=2$) where $\theta\in [0,2\pi]$, $\phi\in [0,\pi]$.
2. Graph $T(\rho,\theta,\pi/4)$ for $\rho\geq 0$, $\theta\in [0,2\pi]$ (in other words, all points where $\phi=\pi/4$). What happens if $\rho$ can be negative (i.e., $\rho\in\mathbb{R}$)?
3. Graph $T(\rho, \theta, \pi/2)$ for $\rho\in\mathbb{R}$, $\theta\in [0,2\pi]$ (in other words, all points where $\phi=\pi/2$).
4. Graph $T(\rho,\pi/4, \phi)$ for $\rho\geq 0$, $\phi\in [0,\pi]$ (in other words, all points where $\theta=\pi/4$).

# Transformation Functions and Parametric Surfaces

We saw in this problem that if we make one of the input variables a constant in a transformation function, we get a surface. We can use this idea to find parametric equations for a given surface.

For example, in a problem above, $T$ was the spherical coordinate transformation, and we set $\rho=2$: $T(2, \theta, \phi)=(2\sin\phi\cos\theta,\,2\sin\phi\sin\theta,\,2\cos\phi)$ to get a sphere of radius 2. Since we were eliminating one of the input variables by setting it to be a number, we could have written this same function as $\vec q(\theta,\phi)=(2\sin\phi\cos\theta,\,2\sin\phi\sin\theta,\,2\cos\phi)$. This function $\vec q\colon \RR^2\to\RR^3$ is then a parametric equation for a sphere of radius 2.

We did very similar things in this problem.
See 16.5: 1-16 for more practice. See Larson 15.5:1–10
Recall the spherical coordinate transformation $$\vec T(\rho,\phi,\theta) = (\rho\sin\phi\cos \theta, \rho\sin\phi\sin \theta,\rho \cos \phi).$$ $$\vec T(\rho,\theta, \phi) = (\rho\sin\phi\cos \theta, \rho\sin\phi\sin \theta,\rho \cos \phi).$$ This is a function of the form $\vec T\colon \mathbb{R}^3\to\mathbb{R}^3$. If we eliminate one of the inputs (for example, if we hold it constant), then we have a function of the form $\vec q\colon \mathbb{R}^2\to\mathbb{R}^3$, which is a parametric surface.
1. Use Sage or Wolfram Alpha to plot each parametrization.
Give a parametrization of the sphere of radius 4, $\vec q(\theta,\phi)=(?,?,?)$. Make sure your bounds on $\phi$ and $\theta$ hit every point on the sphere.
2. Give a parameterization of the part of the sphere of radius 4 that is above the plane $z=2$. [Hint: the only thing that changes from the previous part is the bounds on $\phi$ and $\theta$.]
Use Sage or Wolfram Alpha to plot your parametrization with your bounds. See 16.5: 1-16 for more practice. See Larson 15.5:1–10
Consider the surface $z=9-x^2-y^2$.
1. Using cylindrical coordinates, $\vec T(r,\theta,z) = (r\cos \theta, r\sin\theta, z)$, obtain a parametrization $\vec q(r,\theta)=(?,?,?)$ of the surface using the input variables $r$ and $\theta$. [Hint: we already know $x=r\cos\theta$ and $y=r\sin\theta$; just write $z=9-x^2-y^2$ in terms of $r$ and $\theta$.]
2. What bounds must you place on $r$ and $\theta$ to obtain the portion of the surface above the plane $z=0$?

Wikipedia lists many common coordinate systems.
Sometimes you'll have to invent your own coordinate system when constructing parametric equations for a surface. If you notice that there are lots of circles parallel to one of the coordinate planes, try using a modified version of cylindrical coordinates. For example, instead of circles in the $xy$ plane ($x=r\cos\theta,y=r\sin\theta,z=z$), maybe you need circles in the $yz$-plane ($x=x,y=r\cos\theta,z=r\sin\theta$).

See Larson 15.5:21–30.
Find a parametric equation $\vec q(?,?)=(?,?,?)$ for the surface $x^2+z^2=9$. [Hint: read the paragraph above.]
1. Use Sage or Wolfram Alpha to plot your parametrization.
What bounds on the inputs should you use to obtain the portion of the surface between $y=-2$ and $y=3$?
2. What bounds on the inputs should you use to obtain the portion of the surface above $z=0$?
3. What bounds on the inputs should you use to obtain the portion of the surface with $x\geq 0$ and $y\in[2,5]$?
Construct a graph of the surface $z = x^2-y^2$. Do so in 2 ways. (1) Construct a 3D surface plot. (2) Construct a contour plot, which is a graph with several level curves. Which level curve passes through the point $(3,4)$? Use Wolfram Alpha to know if you're right. Just type “plot z=x\^2-y\^2.”
Construct a plot of the vector field $$\vec F(x,y) = (x+y, -x+1)$$ by graphing the field at many integer points around the origin (I generally like to get the 8 integer points around the origin, and then a few more). Then explain how to modify your graph to obtain a plot of the vector field $$\hat F(x,y) = \frac{(x+y, -x+1)}{\sqrt{(x+y)^2+(1-x)^2}}.$$

# Polar Coordinates

See Larson section 10.4 and 10.5 for more reference material on the things we cover in this section.

In this section, we'll explore polar coordinates a bit more. One of the things to take away from this section is that using a natural coordinate system for your problem can make the problem much simpler.

To construct a graph of a polar curve, just create an $r,\theta$ table. Choose values for $\theta$ that will make it easy to compute any trig functions involved. Then connect the points in a smooth manner, making sure that your radius grows or shrinks appropriately as your angle increases.

See Sage. Use Sage to check your answers in the other graphing problems too. See 11.4: 1-20.
Graph the polar curve $r=2+2\cos\theta$. This curve is called a cardiod (see also here). The Cartesian equation for this curve is $(x^2+y^2-2x)^2=4(x^2+y^2)$. Which is simpler, the polar equation or the Cartesian equation?
Graph the polar curve $r=3\sin 2\theta$ and identify which points on the curve came from negative $r$ values and which came from positive $r$ values. This curve is called a rose (see also here). The Cartesian equation for this curve is $(x^2+y^2)^3=36x^2y^2$. Which equation is simpler?
Graph the polar curve $r=2\cos 3\theta$ and identify which points on the curve came from negative $r$ values and which came from positive $r$ values. This curve is also called a rose. The Cartesian equation for this curve is $(x^2+y^2)^2=2(x^3-3xy^2)$. Which equation is simpler?
See Larson 10.5:17–26
Find the points of intersection of $r=3-3\cos\theta$ and $r=3\cos\theta$. (If you don't graph the curves, you'll probably miss a few points of intersection.)
See 11.3: 53-66.
Each of the following equations is written in the Cartesian (rectangular) coordinate system. Convert each to an equation in polar coordinates, and then solve for $r$ so that the equation is in the form $r=f(\theta)$. Judge which equation is simpler, Cartesian or polar.
1. $x^2+y^2=7$
2. $2x+3y=5$
3. $x^2=y$
See 11.3: 27-52. I strongly suggest that you do many of these as practice.
Each of the following equations is written in the polar coordinate system. Convert each to an equation in the Cartesian coordinates. Judge which equation is simpler, Cartesian or polar.
1. $r=9\cos\theta$ [Hint: multiply both sides by $r$.]
2. $\ds r=\frac{4}{2\cos\theta+3\sin\theta}$
3. $\theta = 3\pi/4$
Recall that for parametric curves $\vec q(t) = (x(t),y(t))$, to find the slope of the curve we just compute $$\frac{dy}{dx}=\frac{dy/dt}{dx/dt}.$$ A polar curve of the form $r=f(\theta)$ can be thought of as just the parametric curve $\vec q(\theta) = (f(\theta)\cos\theta,f(\theta)\sin\theta)$. So you can find the slope by computing $$\frac{dy}{dx}=\frac{dy/d\theta}{dx/d\theta}.$$
See 11.2: 1-14.
Consider the polar curve $r=1+2\cos \theta$.
1. Sketch the curve.
2. Compute both $dx/d\theta$ and $dy/d\theta$.
3. Find the slope $dy/dx$ of the curve at $\theta=\pi/2$.
4. Give both a vector equation of the tangent line, and a Cartesian equation of the tangent line at $\theta=\pi/2$.