Inverse Functions: Logarithms and Complex Numbers (Part 30)

Ordinarily, there are no great difficulties with logarithms as we’ve seen with the inverse trigonometric functions. That’s because the graph of y = a^x satisfies the horizontal line test for any 0 < a < 1 or a > 1. For example,

e^x = 5 \Longrightarrow x = \ln 5,

and we don’t have to worry about “other” solutions.

However, this goes out the window if we consider logarithms with complex numbers. Recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. This is analogous to converting from rectangular coordinates to polar coordinates.

Over the past few posts, we developed the following theorem for computing e^z in the case that z is a complex number.

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

Of course, this looks like what the definition ought to be if one formally applies the Laws of Logarithms to r e^{i \theta}. However, this complex logarithm doesn’t always work the way you’d think it work. For example,

\log \left(e^{2 \pi i} \right) = \log (\cos 2\pi + i \sin 2\pi) = \log 1 = \ln 1 = 0 \ne 2\pi i.

This is analogous to another situation when an inverse function is defined using a restricted domain, like

\sqrt{ (-3)^2 } = \sqrt{9} = 3 \ne -3

or

\sin^{-1} (\sin \pi) = \sin^{-1} 0 = 0 \ne \pi.

The Laws of Logarithms also may not work when nonpositive numbers are used. For example,

\log \left[ (-1) \cdot (-1) \right] = \log 1 = 0,

but

\log(-1) + \log(-1) = \log \left( e^{\pi i} \right) + \log \left( e^{\pi i} \right) = \pi i + \pi i = 2\pi i.

green line

This material appeared in my previous series concerning calculators and complex numbers: http://meangreenmath.com/2014/07/09/calculators-and-complex-numbers-part-21/

 

 

 

Inverse Functions: Arcsecant (Part 29)

We now turn to a little-taught and perhaps controversial inverse function: arcsecant. As we’ve seen throughout this series, the domain of this inverse function must be chosen so that the graph of y = \sec x satisfies the horizontal line test. It turns out that the choice of domain has surprising consequences that are almost unforeseeable using only the tools of Precalculus.

The standard definition of y = \sec^{-1} x uses the interval [0,\pi] — or, more precisely, [0,\pi/2) \cup (\pi/2, \pi] to avoid the vertical asymptote at x = \pi/2 — in order to approximately match the range of \cos^{-1} x. However, when I was a student, I distinctly remember that my textbook chose [0,\pi/2) \cup [\pi,3\pi/2) as the range for \sec^{-1} x.

I believe that this definition has fallen out of favor today. However, for the purpose of today’s post, let’s just run with this definition and see what happens. This portion of the graph of y = \sec x is perhaps unorthodox, but it satisfies the horizontal line test so that the inverse function can be defined.

arcsec3

Let’s fast-forward a couple of semesters and use implicit differentiation (see also http://meangreenmath.com/2014/08/08/different-definitions-of-logarithm-part-8/ for how this same logic is used for other inverse functions) to find the derivative of y = \sec^{-1} x:

x = \sec y

\displaystyle \frac{d}{dx} (x) = \displaystyle \frac{d}{dx} (\sec y)

1 = \sec y \tan y \displaystyle \frac{dy}{dx}

\displaystyle \frac{1}{\sec y \tan y} = \displaystyle \frac{dy}{dx}

 At this point, the object is to convert the left-hand side to something involving only x. Clearly, we can replace \sec y with x. As it turns out, the replacement of \tan y is a lot simpler than we saw in yesterday’s post. Once again, we begin with one of the Pythagorean identities:

1 + \tan^2 y = \sec^2 y

\tan^2 y = \sec^2 y - 1

\tan^2 y = x^2 - 1

\tan y = \sqrt{x^2 - 1} \qquad \hbox{or} \tan y = -\sqrt{x^2 - 1}

So which is it, the positive answer or the negative answer? In yesterday’s post, the answer depended on whether x was positive or negative. However, with the current definition of \sec^{-1} x, we know for certain that the answer is the positive one! How can we be certain? The angle y must lie in either the interval [0,\pi/2) or else the interval [\pi,3\pi/2). In either interval, \tan y is positive. So, using this definition of \sec^{-1} x, we can simply say that

\displaystyle \frac{d}{dx} \sec^{-1} x = \displaystyle \frac{1}{x \sqrt{x^2-1}},

and we don’t have to worry about |x| that appeared in yesterday’s post.

green line

arcsec2Turning to integration, we now have the simple formula

\displaystyle \int \frac{dx}{x \sqrt{x^2 -1}} = \sec^{-1} x + C

that works whether x is positive or negative. For example, the orange area can now be calculated correctly:

\displaystyle \int_{-2}^{-2\sqrt{3}/3} \frac{dx}{x \sqrt{x^2 -1}} = \sec^{-1} \left( - \displaystyle \frac{2\sqrt{3}}{3} \right) - \sec^{-1} (-2)

= \displaystyle \frac{7\pi}{6} - \frac{4\pi}{3}

= \displaystyle -\frac{\pi}{6}

So, unlike yesterday’s post, this definition of \sec^{-1} x produces a simple integration formula.

green line

So why isn’t this the standard definition for \sec^{-1} x? I’m afraid the answer is simple: with this definition, the equation

\sec^{-1} x = \cos^{-1} \left( \displaystyle \frac{1}{x} \right)

is no longer correct if x < -1. Indeed, I distinctly remember thinking, back when I was a student taking trigonometry, that the definition of \sec^{-1} x seemed really odd, and it seemed to me that it would be better if it matched that of \cos^{-1} x. Of course, at that time in my mathematical development, it would have been almost hopeless to explain that the range [0,\pi/2) \cup [\pi,3\pi/2) had been chosen to simplify certain integrals from calculus.

So I suppose that The Powers That Be have decided that it’s more important for this identity to hold than to have a simple integration formula for \displaystyle \int \frac{dx}{x \sqrt{x^2 -1}}

Inverse Functions: Arcsecant (Part 28)

We now turn to a little-taught and perhaps controversial inverse function: arcsecant. As we’ve seen throughout this series, the domain of this inverse function must be chosen so that the graph of y = \sec x satisfies the horizontal line test. It turns out that the choice of domain has surprising consequences that are almost unforeseeable using only the tools of Precalculus.

The standard definition of y = \sec^{-1} x uses the interval [0,\pi], so that

\sec^{-1} x = \cos^{-1} \left( \displaystyle \frac{1}{x} \right)

Why would this be controversial? Yesterday, we saw that \tan x is both positive and negative on the interval [0,\pi], and so great care has to be used to calculate the integral:

\displaystyle \int \frac{dx}{x \sqrt{x^2 -1}}

Here’s another example: let’s use trigonometric substitution to calculate

\displaystyle \int_{-6}^{-3} \frac{ \sqrt{x^2-9} }{x} dx

The standard trick is to use the substitution x = 3 \sec \theta. With this substitution:

  • x^2 - 9 = 9 \sec^2 \theta - 9 = 9 \tan^2 \theta, and
  • dx = 3 \sec \theta \tan \theta \, d\theta
  • x = -3 \quad \Longrightarrow \quad \sec \theta = -1 \quad \Longrightarrow \quad \theta = \sec^{-1} (-1) = \pi
  • x = -6 \quad \Longrightarrow \quad \sec \theta = -2 \quad \Longrightarrow \quad \theta = \sec^{-1} (-2) = \displaystyle \frac{2\pi}{3}

Therefore,

\displaystyle \int_{-6}^{-3} \frac{ \sqrt{x^2-9} }{x} dx = \displaystyle \int_{2\pi/3}^{\pi} \frac{ \sqrt{9 \tan^2 \theta}} { 3 \sec \theta} 3 \sec \theta \tan \theta \, d\theta

At this point, the common mistake would be to replace \sqrt{9 \tan^2 \theta} with 3 \tan \theta. This is a mistake because

\sqrt{9 \tan^2 \theta} = |3 \tan \theta|

Furthermore, for this particular problem, \tan \theta is negative on the interval [2\pi/3,\pi]. Therefore, for this problem, we should replace \sqrt{9 \tan^2 \theta} with -3 \tan \theta.

Continuing the calculation,

\displaystyle \int_{-6}^{-3} \frac{ \sqrt{x^2-9} }{x} dx = \displaystyle \int_{2\pi/3}^{\pi} \frac{ -3 \tan \theta} { 3 \sec \theta} 3 \sec \theta \tan \theta

= \displaystyle \int_{2\pi/3}^{\pi} -3\tan^2 \theta \, d\theta

= \displaystyle \int_{2\pi/3}^{\pi} -3(\sec^2 \theta-1) \, d\theta

= \displaystyle \int_{2\pi/3}^{\pi} (3-3 \sec^2 \theta) \, d\theta

= \displaystyle \bigg[ 3 \theta - 3 \tan \theta \bigg]_{2\pi/3}^{\pi}

= \displaystyle \left[ 3 \pi - 3 \tan \pi \right] - \left[ 3 \left( \frac{2\pi}{3} \right) - 3 \tan \left( \frac{2\pi}{3} \right) \right]

= \displaystyle 3\pi - 0 - 2\pi + 3(-\sqrt{3})

= \pi - 3\sqrt{3}

So if great care wasn’t used to correctly simplify \sqrt{9 \tan^2 \theta}, one would instead obtain the incorrect answer 3\sqrt{3} - \pi.

Inverse Functions: Arcsecant (Part 27)

We now turn to a little-taught and perhaps controversial inverse function: arcsecant. As we’ve seen throughout this series, the domain of this inverse function must be chosen so that the graph of y = \sec x satisfies the horizontal line test. It turns out that the choice of domain has surprising consequences that are almost unforeseeable using only the tools of Precalculus.

The standard definition of y = \sec^{-1} x uses the interval [0,\pi], so that

\sec^{-1} x = \cos^{-1} \left( \displaystyle \frac{1}{x} \right)

Why would this be controversial? Let’s fast-forward a couple of semesters and use implicit differentiation (see also http://meangreenmath.com/2014/08/08/different-definitions-of-logarithm-part-8/ for how this same logic is used for other inverse functions) to find the derivative of y = \sec^{-1} x:

x = \sec y

\displaystyle \frac{d}{dx} (x) = \displaystyle \frac{d}{dx} (\sec y)

1 = \sec y \tan y \displaystyle \frac{dy}{dx}

\displaystyle \frac{1}{\sec y \tan y} = \displaystyle \frac{dy}{dx}

 At this point, the object is to convert the left-hand side to something involving only x. Clearly, we can replace \sec y with x. However, doing the same with \tan y is trickier. We begin with one of the Pythagorean identities:

1 + \tan^2 y = \sec^2 y

\tan^2 y = \sec^2 y - 1

\tan^2 y = x^2 - 1

\tan y = \sqrt{x^2 - 1} \qquad \hbox{or} \tan y = -\sqrt{x^2 - 1}

So which is it, the positive answer or the negative answer? The answer is, without additional information, we don’t know!

  • If 0 \le y < \pi/2 (so that x = \sec y \ge 1), then \tan y is positive, and so \tan y = \sqrt{\sec^2 y - 1}.
  • If \pi/2 < y \le \pi (so that x = \sec y \le 1), then \tan y is negative, and so \tan y = -\sqrt{\sec^2 y - 1}.

We therefore have two formulas for the derivative of y = \sec^{-1} x:

\displaystyle \frac{d}{dx} sec^{-1} x = \displaystyle \frac{1}{x \sqrt{x^2-1}} \qquad \hbox{if} \qquad x > 1

\displaystyle \frac{d}{dx} sec^{-1} x = \displaystyle -\frac{1}{x \sqrt{x^2-1}} \qquad \hbox{if} \qquad x < 1

These may then be combined into the single formula

\displaystyle \frac{d}{dx} sec^{-1} x = \displaystyle \frac{1}{|x| \sqrt{x^2-1}}

green lineIt gets better. Let’s now find the integral

\displaystyle \int \frac{dx}{x \sqrt{x^2 -1}}

arcsec2

Several calculus textbooks that I’ve seen will lazily give the answer

\displaystyle \int \frac{dx}{x \sqrt{x^2 -1}} = \sec^{-1} x + C

This answer works as long as x > 1, so that |x| reduces to simply x. For example, the red signed area in the above picture on the interval [2\sqrt{3}/3,2] may be correctly computed as

\displaystyle \int_{2\sqrt{3}/3}^2 \frac{dx}{x \sqrt{x^2 -1}} = \sec^{-1} 2 - \sec^{-1} \displaystyle \frac{2\sqrt{3}}{3}

= \cos^{-1} \left( \displaystyle \frac{1}{2} \right) - \cos^{-1} \left( \displaystyle \frac{\sqrt{3}}{2} \right)

= \displaystyle \frac{\pi}{3} - \frac{\pi}{6}

= \displaystyle \frac{\pi}{6}

However, the orange signed area on the interval [-2,-2\sqrt{3}/3]  is incorrectly computed using this formula!

\displaystyle \int_{-2}^{-2\sqrt{3}/3} \frac{dx}{x \sqrt{x^2 -1}} = \sec^{-1} \left( - \displaystyle \frac{2\sqrt{3}}{3} \right) - \sec^{-1} (-2)

= \cos^{-1} \left( -\displaystyle \frac{\sqrt{3}}{2} \right) -\cos^{-1} \left( \displaystyle \frac{1}{2} \right)

= \displaystyle \frac{5\pi}{6} - \frac{2\pi}{3}

= \displaystyle \frac{\pi}{6}

This is patently false, as the picture clearly indicates that the above integral has to be negative. For this reason, careful calculus textbooks will often ask students to solve a problem like

\displaystyle \int \frac{dx}{x \sqrt{x^2 -1}}, \qquad x > 1

and the caveat x > 1 is needed to ensure that the correct antiderivative is used. Indeed, a calculus textbook that doesn’t include such caveats are worthy of any scorn that an instructor cares to heap upon it.

Inverse Functions: Arcsecant (Part 26)

We now turn to a little-taught and perhaps controversial inverse function: arcsecant. As we’ve seen throughout this series, the domain of this inverse function must be chosen so that the graph of y = \sec x satisfies the horizontal line test. It turns out that the choice of domain has surprising consequences that are almost unforeseeable using only the tools of Precalculus.

The standard definition of y = \sec^{-1} x uses the interval [0,\pi] — or, more precisely, [0,\pi/2) \cup (\pi/2, \pi] to avoid the vertical asymptote at x = \pi/2. This portion of the graph of y = \sec x satisfies the horizontal line test and, conveniently, matches almost perfectly the domain of y = \cos^{-1} x. This is perhaps not surprising since, when both are defined, \cos x and \sec x are reciprocals.

arcsec1

 

Since this range of \sec^{-1} x matches that of \cos^{-1} x, we have the convenient identity

\sec^{-1} x = \cos^{-1} \left( \displaystyle \frac{1}{x} \right)

To see why this works, let’s examine the right triangle below. Notice that

\cos \theta = \displaystyle \frac{x}{1} \qquad \Longrightarrow \qquad \theta = \cos^{-1} x.

Also,

\sec\theta = \displaystyle \frac{1}{x} \qquad \Longrightarrow \qquad \theta = \cos^{-1} \left( \displaystyle \frac{1}{x} \right).

This argument provides the justification for 0 < \theta < \pi/2 — that is, for x > 1 — but it still works for x = 1 and x \le -1.

So this seems like the most natural definition in the world for \sec^{-1} x. Unfortunately, there are consequences for this choice in calculus, as we’ll see in tomorrow’s post.

Inverse Functions: Arctangent and Angle Between Two Lines (Part 25)

The smallest angle between the non-perpendicular lines y = m_1 x + b_1 and y = m_1 x + b_2 can be found using the formula

\theta = \displaystyle \tan^{-1} \left( \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| \right).

A generation ago, this formula used to be taught in a typical Precalculus class (or, as it was called back then, analytical geometry). However, I find that analytic geometry has fallen out of favor in modern Precalculus courses.

Why does this formula work? Consider the graphs of y = m_1 x and y = m_1 x + b_1, and let’s measure the angle that the line makes with the positive x-axis.

dotproduct5The lines y = m_1 x + b_1 and y = m_1 x are parallel, and the x-axis is a transversal intersecting these two parallel lines. Therefore, the angles that both lines make with the positive x-axis are congruent. In other words, the + b_1 is entirely superfluous to finding the angle \theta_1. The important thing that matters is the slope of the line, not where the line intersects the y-axis.

The point (1, m_1) lies on the line y = m_1 x, which also passes through the origin. By definition of tangent, \tan \theta_1 can be found by dividing the y- and x-coordinates:

\tan \theta_1 = \displaystyle \frac{m}{1} = m_1.

green linedotproduct6

 

We now turn to the problem of finding the angle between two lines. As noted above, the y-intercepts do not matter, and so we only need to find the smallest angle between the lines y = m_1 x and y = m_2 x.

The angle \theta will either be equal to \theta_1 - \theta_2 or \theta_2 - \theta_1, depending on the values of m_1 and m_2. Let’s now compute both \tan (\theta_1 - \theta_2) and \tan (\theta_2 - \theta_1) using the formula for the difference of two angles:

\tan (\theta_1 - \theta_2) = \displaystyle \frac{\tan \theta_1 - \tan \theta_2}{1 + \tan \theta_1 \tan \theta_2}

\tan (\theta_2 - \theta_1) = \displaystyle \frac{\tan \theta_2 - \tan \theta_1}{1 + \tan \theta_2 \tan \theta_1}

Since the smallest angle \theta must lie between 0 and \pi/2, the value of \tan \theta must be positive (or undefined if \theta = \pi/2… for now, we’ll ignore this special case). Therefore, whichever of the above two lines holds, it must be that

\tan \theta = \displaystyle \left| \frac{\tan \theta_1 - \tan \theta_2}{1 + \tan \theta_1 \tan \theta_2} \right|

We now use the fact that m_1 = \tan \theta_1 and m_2 = \tan \theta_2:

\tan \theta = \displaystyle \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right|

\theta = \tan^{-1} \left( \displaystyle \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| \right)

green line

The above formula only applies to non-perpendicular lines. However, the perpendicular case may be remembered as almost a special case of the above formula. After all, \tan \theta is undefined at \theta = \pi/2 = 90^\circ, and the right hand side is also undefined if 1 + m_1 m_2 = 0. This matches the theorem that the two lines are perpendicular if and only if m_1 m_2 = -1, or that the slopes of the two lines are negative reciprocals.

Inverse Functions: Arctangent and Angle Between Two Lines (Part 24)

Here’s a straightforward application of arctangent that, a generation ago, used to be taught in a typical Precalculus class (or, as it was called back then, analytical geometry).

Find the smallest angle between the lines y= 3x and y = -x/2.

dotproduct3

This problem is almost equivalent to finding the angle between the vectors \langle 1,3 \rangle and \langle -2,1 \rangle. I use the caveat almost because the angle between two vectors could be between 0 and \pi, while the smallest angle between two lines must lie between 0 and \pi/2.

This smallest angle can be found using the formula

\theta = \displaystyle \tan^{-1} \left( \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| \right),

where m_1 and m_2 are the slopes of the two lines. In the present case,

\theta = \tan^{-1} \left( \left| \displaystyle \frac{ 3 - (-1/2) }{1 + (3)(-1/2)} \right| \right)

\theta = \tan^{-1} \left( \left| \displaystyle \frac{7/2}{-1/2} \right| \right)

\theta = \tan^{-1} 7

\theta \approx 81.87^\circ.

Not surprisingly, we obtain the same answer that we obtained a couple of posts ago using arccosine. The following picture makes clear why \tan^{-1} 7 = \cos^{-1} \displaystyle \frac{1}{\sqrt{50}}.

dotproduct4In tomorrow’s post, I’ll explain why the above formula actually works.

 

Inverse Functions: Arccosine and Dot Products (Part 23)

The Law of Cosines can be applied to find the angle between two vectors {\bf a} and {\bf b}. To begin, we draw the vectors {\bf a} and {\bf b}, as well as the vector {\bf c} (to be determined momentarily) that connects the tips of the vectors {\bf a} and {\bf b}.

dotproduct2Using the usual rules for adding vectors, we see that {\bf a} + {\bf c} = {\bf b}, so that {\bf c} = {\bf b} - {\bf a}

We now apply the Law of Cosines to find \theta:

\parallel \! \! {\bf c} \! \! \parallel^2 = \parallel \! \! {\bf a} \! \! \parallel^2 + \parallel \! \! {\bf b} \! \! \parallel^2 - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

\parallel \! \! {\bf b} - {\bf a} \! \! \parallel^2 = \parallel \! \! {\bf a} \! \! \parallel^2 + \parallel \! \! {\bf b} \! \! \parallel^2 - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

We now apply the rule \parallel \! \! {\bf a} \! \! \parallel^2 = {\bf a} \cdot {\bf a}, convert the square of the norms into dot products. We then use the distributive and commutative properties of dot products to simplify.

( {\bf b} - {\bf a} ) \cdot ({\bf b} - {\bf a}) = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot ({\bf b} - {\bf a}) - {\bf a} \cdot ({\bf b} - {\bf a}) = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot ({\bf b} - {\bf a}) -{\bf a} \cdot ({\bf b} - {\bf a}) = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot {\bf b} - {\bf a} \cdot {\bf b} - {\bf a} \cdot {\bf b} + {\bf a} \cdot {\bf a} = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot {\bf b} - 2 {\bf a} \cdot {\bf b} + {\bf a} \cdot {\bf a} = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

We can now cancel from the left and right sides and solve for \cos \theta:

- 2 {\bf a} \cdot {\bf b} = - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

\displaystyle \frac{ {\bf a} \cdot {\bf b} }{ \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel } = \cos \theta

Finally, we are guaranteed that the angle between two vectors must lie between 0 and \pi (or, in degrees, between 0^\circ and 180^\circ). Since this is the range of arccosine, we are permitted to use this inverse function to solve for \theta:

\cos^{-1} \left( \displaystyle \frac{ {\bf a} \cdot {\bf b} }{ \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel } \right) = \theta

The good news is that there’s nothing special about two dimensions in the above proof, and so this formula may used for vectors in \mathbb{R}^n for any dimension n \ge 2.

In the next post, we’ll consider how this same problem can be solved — but only in two dimensions — using arctangent.

Inverse Functions: Arccosine and Dot Products (Part 22)

Here’s a straightforward application of arccosine, that, as far as I can tell, isn’t taught too often in Precalculus and is not part of the Common Core standards for vectors and matrices.

Find the angle between the vectors \langle 1,3 \rangle and \langle -2,1 \rangle.

dotproductThis problem is equivalent to finding the angle between the lines y = 3x and y = -x/2. The angle \theta is not drawn in standard position, which makes measurement of the angle initial daunting.

Fortunately, there is the straightforward formula for the angle between two vectors {\bf a} and {\bf b}:

\theta = \cos^{-1} \left( \displaystyle \frac{ {\bf a} \cdot {\bf b} }{ \parallel \!\! {\bf a} \!\! \parallel \parallel \!\! {\bf b} \!\! \parallel } \right)

We recall that {\bf a} \cdot {\bf b} is the dot product (or inner product) of the two vectors {\bf a} and {\bf b}, while \parallel \!\! {\bf a} \!\! \parallel = \sqrt{ {\bf a} \cdot {\bf a} } is the norm (or length) of the vector {\bf a}.

 For this particular example,

\theta = \cos^{-1} \left( \displaystyle \frac{\langle 1,3 \rangle \cdot \langle -2,1 \rangle }{ \parallel \!\!\langle 1,3 \rangle \!\! \parallel \parallel \!\!\langle -2,1 \rangle \!\! \parallel } \right)

\theta = \cos^{-1} \left( \displaystyle \frac{ (1)(-2) + (3)(1) }{ \sqrt{ (1)^2 + (3)^2} \sqrt{ (-2)^2 + 1^2 }} \right)

\theta = \cos^{-1} \displaystyle \frac{1}{\sqrt{50}}

\theta \approx 81.87^\circ

In the next post, we’ll discuss why this actually works. And then we’ll consider how the same problem can be solved more directly using arctangent.

Inverse Functions: Arccosine and SSS (Part 21)

Arccosine has an important advantage over arcsine when solving for the parts of a triangle: there is no possibility ambiguity about the angle.

Solve \triangle ABC if a = 16, b = 20, and c = 25.

When solving for the three angles, it’s best to start with the biggest angle (that is, the angle opposite the biggest side). To see why, let’s see what happens if we first use the Law of Cosines to solve for one of the two smaller angles, say \alpha:

a^2 = b^2 + c^2 - 2 b c \cos \alpha

256 = 400 + 625 - 1000 \cos \alpha

-769 = -1000 \cos \alpha

0.769 = \cos \alpha

\alpha \approx 39.746^\circ

So far, so good. Now let’s try using the Law of Sines to solve for \gamma:

\displaystyle \frac{\sin \alpha}{a} = \displaystyle \frac{\sin \gamma}{c}

\displaystyle \frac{\sin 39.746^\circ}{16} \approx \displaystyle \frac{\sin \gamma}{25}

0.99883 \approx \sin \gamma

Uh oh… there are two possible solutions for \gamma since, hypothetically, \gamma could be in either the first or second quadrant! So we have no way of knowing, using only the Law of Sines, whether \gamma \approx 87.223^\circ or if \gamma \approx 180^\circ - 87.223^\circ = 92.777^\circ.

green lineFor this reason, it would have been far better to solve for the biggest angle first. For the present example, the biggest answer is \gamma since that’s the angle opposite the longest side.

c^2 = a^2 + b^2 - 2 a b \cos \gamma

625 = 256 + 400 - 640 \cos \gamma

-31 =-640 \cos \gamma

0.0484375 = \cos \gamma

Using a calculator, we find that \gamma \approx 87.223^\circ.

We now use the Law of Sines to solve for either \alpha or \beta (pretending that we didn’t do the work above). Let’s solve for \alpha:

\displaystyle \frac{\sin \alpha}{a} = \displaystyle \frac{\sin \gamma}{c}

\displaystyle \frac{\sin \alpha}{16} \approx \displaystyle \frac{\sin 87.223}{25}

\sin \alpha \approx 0.63949

This equation also has two solutions in the interval [0^\circ, 180^\circ], namely, \alpha \approx 39.736^\circ and \alpha \approx 180^\circ - 39.736^\circ = 140.264^\circ. However, we know full well that the answer can’t be larger than \gamma since that’s already known to be the largest angle. So there’s no need to overthink the matter — the answer from blindly using arcsine on a calculator is going to be the answer for \alpha.

Naturally, the easiest way of finding \beta is by computing 180^\circ - \alpha - \gamma.

Follow

Get every new post delivered to your Inbox.

Join 150 other followers