# The chain rule

## When are two lines perpendicular?

- Suppose given two lines \(L_1:(y-y_1)=m_1(x-x_1)\), \(L_2:(y-y_2)=m_2(x-x_2)\).
- As we have seen, the slopes give the average rate of change: \(m_1=\frac{\Delta y_1}{\Delta x_1}\).
- Therefore, if a right triangle has legs of (signed) length \(\Delta y_1\) and \(\Delta x_1\), and the angle agains the side of length \(\Delta y_1\) is \(\theta_1\), then we have \(m_1=\tan\theta_1\).
- Similarly, we get \(m_2=\tan\theta_2\).
- Note that \(\cot\theta_1=\frac{1}{\tan\theta_1}=\frac{1}{m_1}\) and \(\cot\theta_2=\frac{1}{m_2}\).
- The two lines are perpendicular, if the difference of the two angles is \(\frac{\pi}{2}\). That is, we need \[
\theta_1-\theta_2=\pm\frac{\pi}{2}.
\]
- Let's take cotangents on both sides. \[
\frac{\cot\theta_1\cot\theta_2+1}{\cot\theta_2-\cot\theta_1}=\frac{\cos\theta_1\cos\theta_2+\sin\theta_1\sin\theta_2}{\sin\theta_1\cos\theta_2-\cos\theta_1\sin\theta_2}=\cot(\theta_1-\theta_2)=\cot(\pm\frac{\pi}{2})=0.
\]
- That is, we need \[
m_1^{-1}m_2^{-1}=\cot\theta_1\cot\theta_2=-1,
\] that is \(m_2=-m_1^{-1}\).

## 3.4.60

- At what point on the curve \(C:y=\sqrt{1+2x}\) is the tangent line perpendicular to the line \(L:6x+2y=1\)?
- Last time we saw that we can rearrange the equation of the line \(L\) to \(y-\frac12=-3x\), so in particular the slope of \(L\) is \(m_L=-3\).
- We also calculated the slope of the tangent line at \(x=x_0\) to \(C\): \(f'(x=x_0)=(1+2x_0)^{-1/2}\).
- Now we can answer the original question: for the tangent line at \(x=x_0\) of \(C\) to be perpendicular to \(L\), we need \(3=\sqrt{1+2x_0}\), that is \(x_0=4\).
- Exercises. 3.4: 86, 96, 99