Finding parametric expression for epicycloid This is a question that comes from Shifrin's Multivariable Mathematics [Edited after being put in place by the author :)]
A circle of radius $b$ rolls without slipping outside a circle of radius $a > b$. Give the parametric equations of a point $P$ on the circumference of the rolling circle (in terms of the angle $\theta$ of the line joining the centers of the two circles). Attached is a figure of the question:

In the text a method to approach this question is by connecting vectors and the idea of associating polar coordinates to the usual $x,y$ values if a cartesian system was used. Using these ideas along with
right triangles I was able to get the first part of the idea being captured:
$$\begin{bmatrix}
(a+b)\cos\theta \\
(a+b)\sin\theta \\
\end{bmatrix}
$$
Fortunately there is a solution to the question. After looking at it I'm stuck trying to understand how the full solution cam about which is the following:
$$\begin{bmatrix}
(a+b)\cos\theta - b\cos((a+b)\theta/b) \\
(a+b)\sin\theta - b\sin((a+b)\theta/b) \\
\end{bmatrix}
$$
So how do we reason the subtraction portions of these expressions? From what I understand I know there is the notion of using the arc length and equating it to a distance of one of the sides, but I couldn't see what side that may be, the other thing that is troubling me is the trig expression $\frac{((a+b)\theta)}{b}$. What is the trig relationship between the triangles I'm missing to use in this situation?
 A: Here's a picture with some more annotations:

I've highlighted, in blue, an arc $c$ of the larger circle and, in red, an arc $d$ of the smaller circle, as well as drawn, in green, an arrow from the center of the smaller circle $B$ to $P$. The part of the expression you understand is essentially the position of $B$, so let's look at how to determine the vector from $B$ to $P$.
The first thing to observe is that the arcs $c$ and $d$ must have the same length, since they are rolling on one another. Let $\alpha$ be the angle $\angle ABP$. The length of $c$ is $\theta a$ and the length of $d$ is $\alpha b$, since arc length is just angle times radius. Thus $\alpha = \frac{a}b\cdot \theta$.
To figure out the vector for the green arrow, however, we really want the angle between $BP$ and a horizontal reference line - the same way that we figured out the vector from $A$ to $B$. Suppose that the angle of $BP$ counterclockwise from horizontal is $\kappa$, the same way that $\theta$ is the angle of $AB$ counterclockwise from horizontal. We can determine $\kappa$ by extending the horizontal line through $A$ and also extending the line $BP$. These extended lines intersect at some point $I$. The triangle $ABI$ has angles $\theta$ and $\alpha$ and $-\kappa$ - the negative sign being since the angle measured at $\angle BIA$ is actually how far clockwise of horizontal the vector $BP$ is from horizontal where we really wanted to know a counterclockwise angle for consistency.  Thus, since the sum of the angles of a triangle is $\pi$, we get $$\kappa = -\pi + \alpha + \theta = -\pi + \frac{a}b \theta + \theta = -\pi + \frac{a+b}b \theta$$
This gives that the displacement of the vector $BP$ is
$$\begin{bmatrix}b\cos\left(-\pi+\frac{a+b}b\theta\right)\\b\sin\left(-\pi+\frac{a+b}b\theta\right)\end{bmatrix}$$
which, since $\sin(x+\pi)=-\sin(x)$ and $\cos(x+\pi)=-\cos(x)$,
$$\begin{bmatrix}-b\cos\left(\frac{a+b}b\theta\right)\\-b\sin\left(\frac{a+b}b\theta\right)\end{bmatrix}.$$
Summing this to the center of the smaller circle gives the answer.

You could also get this by imagining that instead of the smaller circle rolling on the larger one, they are both keeping their centers constant and spinning without slipping (like gears). Then, the calculation of $\alpha$ would tell you that the smaller circle is spinning at a ratio of $\frac{a}b$ times the speed of the larger one. In this view, a point on the smaller circle is just tracing the circumference of the smaller circle at a fixed rate - which is easy enough to describe in cartesian coordinates.
If you then imagined that you were an observer standing on and rotating with the larger circle, you would realize that, from your point of view, the smaller circle was revolving around you and moving without slipping - as in the original problem. You could thus also get the answer by starting with the "both circles spin in place" case and shifting reference frames appropriately - essentially by rotating all of space over time. This is definitely not easier algebraically, but it might be helpful conceptually. (Or might not - it's at least a fun way to look at it)
