Engaging students: Graphing Sine and Cosine Functions

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student DeForest Mitchell. His topic, from Precalculus: graphing sine and cosine functions.

green line

C2: How has this topic appeared in high culture (art, classical music, theatre, etc.)?

There are multiple forms of art and music and theater using sine and cosine. I am going to focus on music. Tone and sound in itself is a reverb of sine functions with different wavelengths and amplitude. This is such a great importance not only in knowing sine functions but also being able to create music. Knowing what a tone is and why the sound is becoming higher/lower or quieter/louder. If the amplitude is shorter then the sound itself will be quieter and vise versa with the amplitude growing so will the over all sound. If the period is increasing or becoming longer, the sound will be deeper, while shorter periods will create sharper and higher pitch sounds. Once you combine the amplitude and the period in specific ways that’s how specific notes and tones are made. As shown below, there is a combination of amplitudes and periods to create a sound wave using sine functions. With this in mind mathematically you can predict what a tone or song will sound like just depending on the inflection of amplitude and frequency of the function.

 

green line

B1: How can this topic be used in your students’ future courses in mathematics or science?

One big component to my personal understanding of graphing sine and cosine is seeing a physical model of it. Such as a spring in physics, or the light spectrum. There are websites such as https://www.mathsisfun.com/algebra/trig-sin-cos-tan-graphs.html to be able to represent a sine function being sketched as a weighted spring bounces up and down. There are different slides to adjust the stiffness and dampening of the spring to show the alternate forms of the same graph. Since and cosine are used in many different forms of sciences, such as wavelengths (as shown in the picture below). This is a great way to show the students that there is a reason to learn the subject and that there are practical uses for it in life outside of school. For example, with the wavelength spectrum a teacher can make the correlation that a sine function with a longer period would be like soundwaves that have a longer wavelength, also to show that there are only certain wavelengths that we can see and there can be a correlation to graph the sine period and that if you were to make it into a function that there is only a certain few period lengths for a sine function for humans to be able to see colors.

green line

D1: What interesting things can you say about the people who contributed to the discovery and/or the development of this topic? (You might want to consult Math Through The Ages.)

Circles have been around for millions of years and are to this day one of the simplest shapes. With Circles and by tracking the circumference of the circle you can make sine and cosine graphs. Joseph Fourier (1768 – 1830 A.D.) was a very influential person with the devilment of graphing sine and cosine functions. He was so due to his the foundning of the Fourier series. “Fourier series (thus the Fourier transform and finally the Discrete Fourier Transform) is our ancient desire to express everything in terms of circles or the most exceptionally simple and elegant abstract human construct. Most people prefer to say the same thing in a more ahistorical manner: to break a function into sines and cosines.” The summative way to say saying that Fourier came up with an equation to take any repeating series and be able to turn it into forms of sine and cosine to be able to graph. Which in turn creates a circle to better understand the said repeating series. This was a great mathematical find to show the correlation between any repeating series and the more well-known sine and cosine terms today. As shown below, with the Fourier series they were able to take a repeating series to “convert” them into a circle and then be able to graph the functions in terms of sine and cosine.

Resources:

https://www.gnu.org/software/gnuastro/manual/html_node/Fourier-series-historical-background.html

https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjCt_3VjJXlAhVEQKwKHdm4CmcQjhx6BAgBEAI&url=https%3A%2F%2Fwww.extremetech.com%2Fextreme%2F252295-layered-solar-cell-can-capture-wavelengths-solar-spectrum&psig=AOvVaw1RQwNN_tnNutYxnp_BFrF4&ust=1570913952314160

https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwic7YDjk5XlAhURCawKHU_CCOEQjhx6BAgBEAI&url=https%3A%2F%2Filovefood1234.weebly.com%2Ffrequency-and-amplitude.html&psig=AOvVaw1f48xa071u-Hn-t1TIH4DN&ust=1570915856599588

https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwiL_-yxlZXlAhUKT6wKHUDbBJMQjhx6BAgBEAI&url=https%3A%2F%2Fwww.colourbox.com%2Fvector%2Fmusic-sound-waves-vector-27786168&psig=AOvVaw1YIMBZ1aL5pO2uOkl-ksg2&ust=1570916292788406

Engaging students: Graphing Sine and Cosine Functions

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Christian Oropeza. His topic, from Precalculus: graphing sine and cosine functions.

green line

How could you as a teacher create an activity or project that involves your topic?

An activity for students to understand how to graph sine and cosine could consist the use of website desmos (Reference 1). In this activity students will be in pairs and must complete a worksheet that list different forms of the equation sine and cosine that illustrate some of the transformations for sine and cosine. One student will enter the equation onto desmos and the other student will draw the graph on a separate worksheet. The pair will switch roles after each equation, so both students understand how to interpret and draw a given sine or cosine equation. After all the equations have been graphed and sketched, each pair will move on to the next part of the activity in which they must manipulate the equation asin(bx+c)+d and acos(bx+c)+d on desmos where a,b,c, and d are all  numerical sliders that can be adjusted to help students visually interpret what transformation they represent. Finally, to prove that students understood the material, each pair will come up with a sketch of a transformation of sine or cosine and trade with another pair of students, in which they must figure out the corresponding equation that matches the given graph.

 

green line

How can this topic be used in your students’ future courses in mathematics or science?

This topic comes up any subject that has sinusoidal waves, such as physics, calculus, and some engineering classes. For example, in calculus graphing the derivative of sine gives the graph of cosine. This shows students that the slope at any point on the sine curve is the cosine and the slope of any point on the cosine curve is the negative of the sine. The topic of sine and cosine is a crucial component  in electrical engineering (EE). For EE, there’s a class called, circuit analysis that has a section named “Euler’s Sine Wave” and “Euler’s Cosine Wave”, which incorporates the use of Euler’s formula (Reference 2). Also, in electrical engineering, there’s a machine called a “signal generator”, which sends different types of signals as inputs to circuit. This machine can alter the frequency and amplitude of the signal, where amplitude represents the amount of voltage inputted into the circuit. In math, there’s a topic called “Fourier Series” that also incorporates sine and cosine (Reference 3).

green line

How can technology (YouTube, Khan Academy [khanacademy.org], Vi Hart, Geometers Sketchpad, graphing calculators, etc.) be used to effectively engage students with this topic? Note: It’s not enough to say “such-and-such is a great website”; you need to explain in some detail why it’s a great website.

Desmos (Reference 1), can be used to show students the different transformations of both functions. This way students can visually understand what each component is and how each component affects the functions y=asin(bx+c)+d and y=acos(bx+c)+d, where a is the amplitude, b is the period, c is the phase shift, and d is the vertical shift. Vision learning (Reference 4), is also a great website for students when they are introduced to the topic of sine and cosine. This website goes over the history of sine by relating it to waves and circles. The website first goes over how Hipparchus calculated the trigonometric ratios and how that led to the sine function. This website gives students a background on how the functions sine and cosine came to be over time. Also, this website talks about how when the Unit Circle is placed on a Cartesian graph, this illustrates how sine and cosine take over a periodic trend, so students can see why the graphs of sine and cosine are infinite if the domain is all real numbers.

References:

  1. https://www.desmos.com/calculator
  2. https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/ee-ac-analysis/v/ee-eulers-sine-wave
  3. https://www.mathsisfun.com/calculus/fourier-series.html
  4. https://www.visionlearning.com/en/library/Math-in-Science/62/Wave-Mathematics/131

Engaging students: Graphing Sine and Cosine Functions

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Saundra Francis. Her topic, from Precalculus: graphing sine and cosine functions.

green lineHow has this topic appeared in pop culture (movies, TV, current music, video games, etc.)?

To engage students you can have them record a song using the WavePad app. Have students choose a clip of their favorite song to record. Once they record the song they choose, the app will display the sound waves compiled that are used to create the sounds in the song the song. Students will realize that sound waves are in the form of the sine function. This will engage students since you would have related the topic of graphing sine and cosine functions to their favorite song. You could also have students create their own sounds and record them with the app to see the graph associated with the sound they made. Students can look at their sound and other classmates sounds are recognize differences in the waves, you can relate this to the equation f(x)=asin(bx+c)+d. You can them work with students to discover what the constants terms mean in relation to the parent function of sine.

 

green line

How has this topic appeared in high culture (art, classical music, theater, etc.)?

Sine waves are the basis of sound. Have a piece by Beethoven playing while students are entering the classroom. Tell students that Beethoven was able to create music while he was in the process of becoming deaf. Ask students how they think Beethoven was able to create music in spite of that set back. After you have students share some answers show them the video above which explains how Beethoven’s music (all music) is related to sine waves. The music of his “Moonlight Sonata” is explained using math in the TED-Ed video. While Beethoven did not use this method to create his music he said that he knew what the music looked like. This will show students an example of how sine graphs are used in real life and get them interested in graphing sine and cosine functions.

 

green line

How can technology (YouTube, Khan Academy [khanacademy.org], Vi Hart, Geometers Sketchpad, graphing calculators, etc.) be used to effectively engage students with this topic? Note: It’s not enough to say “such-and-such is a great website”; you need to explain in some detail why it’s a great website.

Students will be given a TI-Nspire calculator in order to discover how changing the amplitude, period, horizontal shift, or vertical shift changes the equation of sine. Students will start with the graph of f(x)=sinx. They will then manipulate the graph on the calculator to change the function. Have them move the function up and down, right and left, and work with the slope of sinx and the slope of the x. Have students write dawn some of their new functions and sketch the graph. They will then compare how changing the graph effects the equation of f(x)=sinx. Introduce f(x)=asin(bx+c)+d . Give students some time to compare the functions that they created to the formula and describe how each constant changes the graph. Students will hopefully discover how the function f(x)=asin(bx+c)+d relates to amplitude, period, horizontal shift, and vertical shift.

References
1. https://education.ti.com/en/timathnspired/us/detail?id=4E9BA7808CA74F6599BD5EA2037C088A&t=C52AEC55A39243D182772F76318B901C
2. https://www.smore.com/gy9h4-sine-waves-and-music
3. https://www.youtube.com/watch?time_continue=16&v=zAxT0mRGuoY

My Favorite One-Liners: Part 100

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them.

Today’s quip is one that I’ll use surprisingly often:

If you ever meet a mathematician at a bar, ask him or her, “What is your favorite application of the Cauchy-Schwartz inequality?”

The point is that the Cauchy-Schwartz inequality arises surprisingly often in the undergraduate mathematics curriculum, and so I make a point to highlight it when I use it. For example, off the top of my head:

1. In trigonometry, the Cauchy-Schwartz inequality states that

|{\bf u} \cdot {\bf v}| \le \; \parallel \!\! {\bf u} \!\! \parallel \cdot \parallel \!\! {\bf v} \!\! \parallel

for all vectors {\bf u} and {\bf v}. Consequently,

-1 \le \displaystyle \frac{ {\bf u} \cdot {\bf v} } {\parallel \!\! {\bf u} \!\! \parallel \cdot \parallel \!\! {\bf v} \!\! \parallel} \le 1,

which means that the angle

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

is defined. This is the measure of the angle between the two vectors {\bf u} and {\bf v}.

2. In probability and statistics, the standard deviation of a random variable X is defined as

\hbox{SD}(X) = \sqrt{E(X^2) - [E(X)]^2}.

The Cauchy-Schwartz inequality assures that the quantity under the square root is nonnegative, so that the standard deviation is actually defined. Also, the Cauchy-Schwartz inequality can be used to show that \hbox{SD}(X) = 0 implies that X is a constant almost surely.

3. Also in probability and statistics, the correlation between two random variables X and Y must satisfy

-1 \le \hbox{Corr}(X,Y) \le 1.

Furthermore, if \hbox{Corr}(X,Y)=1, then Y= aX +b for some constants a and b, where a > 0. On the other hand, if \hbox{Corr}(X,Y)=-1, if \hbox{Corr}(X,Y)=1, then Y= aX +b for some constants a and b, where a < 0.

Since I’m a mathematician, I guess my favorite application of the Cauchy-Schwartz inequality appears in my first professional article, where the inequality was used to confirm some new bounds that I derived with my graduate adviser.

Engaging students: Inverse trigonometric functions

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Joe Wood. His topic, from Precalculus: inverse trigonometric functions.

green line

What are the contributions of various cultures to this topic?

Trig functions have a very long history spanning many countries and cultures. Greek astronomers such as Aristarchus, Claudius, and Ptolemy first used trigonometry; however, according to the University of Connecticut, these Greek astronomers were primarily concerned with “the length of the chord of a circle as a function of the circular arc joining its endpoints.” Many of these astronomers, Ptolemy especially, were concerned with planetary and celestial body’s rotations, so this made sense.

While the Greeks first studied trigonometric concepts, it was the Indian people who really studied sine and cosine functions with the angle as a variable. The information was then brought to the Arabic and Persian cultures. One significant figure, a Persian by the name Abu Rayhan Biruni, used trig to accurately estimate the circumference of Earth and its radius before the end of the 11th century.

Fast-forward about 700 years, a Swiss mathematician, Daniel Bernoulli, used the “A.sin” notation to represent the inverse of sine. Shortly after, another Swiss mathematician used “A t” to represent the inverse of tangent. That man was none other than Leonhard Euler.  It was not until 1813 that the notation sin-1 and tan-1 were introduced by Sir John Fredrick William Herschel, an English mathematician.

As we can see, the development of inverse trigonometric functions took quite the cultural rollercoaster ride before stopping some place we see being familiar. It took many cultures, and even more years to develop this sophisticated branch of mathematics.

 

green line

How could you as a teacher create an activity or project that involves your topic?

Last Semester I taught a lesson on the trigonometric identities. I found this cool cut and paste activity for the students that allowed them to warm up to the trig identities by not having to do the process themselves, but still having to see every step of converting one trig function into another with the identities. Below, you will find the activity, then the instructions, and finally how to modify the activity to fit inverse trig identities specifically.

inversetrig

Directions:
1.) Begin by cutting out all the pieces.
2.) Students will take any of the four puzzle pieces with the black squiggly line.
3.) Find an equivalent puzzle piece by using some trig identity.
4.) Repeat step 3 until there are no more equivalent pieces.
5.) Grab the next puzzle pieces with the black squiggly line.
6.) Repeat steps 3-5 until all puzzle pieces have been used.
Ex.) Begin with cscx-sinx. Lay next to that piece, the piece that reads =1/sinx – sinx, then the piece that reads =1/sinx – sin2x/sinx. Contiue the trend until you reach =cotx * cosx. Then move to the next squiggly lined piece.

Modify:
This game can be modified using inverse trig functions. Start with pieces such as sin-1(sin(300)) in squiggles. Have a piece showing sin-1(sin(300)) with a line through the sines. Then a piece that just shows 300. Next a piece in a squiggly line that is sin-1(sqrt(2)/2) that connects to a piece of 450, but make them write why this works.

green line

How does this topic extend what your students should have learned in previous courses?

Obviously, by this time students should know what trigonometric functions are and how to use this. Students should also know from previous classes what inverse functions are. Studying inverse trig functions then is a continuation of these topics. As I teacher I would begin relating inverse trig functions by refreshing the students on what inverse functions are. The class would then move into the concept that the trig expression of an angle returns a ratio of two sides of a triangle. We would slowly move into what happens then if you know the sides of a triangle but need the angle. From there we would discuss trigonometric expressions using the angles as variables. Finally, we would make the connection that that is a function, and on the proper interval should have an inverse function. That is when the extension into the new topic of inverse trigonometric functions would seriously begin.

 

Engaging students: Graphing Sine and Cosine Functions

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Emma Sivado. Her topic, from Precalculus: graphing sine and cosine functions.

green line

D.1: What interesting things can you say about the people who contributed to the discovery and/or the development of this topic?

First, I would pose the question “how did the Egyptians build the pyramids without calculators without measuring tapes and without the advanced mathematics we have today?” After a short discussion I would ask them if we want to build a pyramid that is 250 meters high and the base is 360 meters long how long would we need to make the hypotenuse? Already knowing the Pythagorean Theorem the students would be able to answer the question. Then, I would tell them that historians have found Egyptian scribes asking questions such as these in order to build the pyramids, and systems of ropes with knots were used to measure lengths. These relationships in right triangles created the sine and cosine functions we know today. Sine and cosine date back to 1900 BC where they were used to calculate angles in order to track the motion of the planets and stars. However, the definition of sine and cosine in terms of right triangles was not recorded until 1596 AD by Copernicus.

http://www.math.ucdenver.edu/~jloats/Student%20pdfs/40_Trigonometry_Trenkamp.pdf

 

green line

A.2: How could you as a teacher create an activity or project that involves your topic?

I found a great activity that encompasses all of the aspects of graphing sine and cosine on the University of Arizona website. Depending on how transformations in the linear and quadratic functions were introduced, this activity could follow the same pattern; allowing the students to explore the ideas themselves and having them put the content into their own words. The activity begins by giving an example of a bug walking on an upright loop. The instructor asks the students what the graph would look like of the bug’s distance from the ground vs. time. I would probably use a different, more concrete example because there are plenty of things the students know that go around in circles. The best example I think is a Ferris wheel. So after the students are able to tell you what the graph would look like you relate that to the unit circle and how the sine and cosine functions follow the same pattern of going around the circle counterclockwise. Next, you let the students plot points from the unit circle onto the Cartesian plane showing them that their prediction was correct; the sine and cosine functions make a wave. Now that they have drawn the parent function you let them explore the functions f(x) = asinx or f(x)= acosx, then f(x) = sin(bx) or f(x) = cos(bx), then finally f(x) = sin(x+c) or f(x) = cos(x+c) to let them discover how a, b, and c change the amplitude, period, frequency, and starting point of the graphs.

This is a great activity because the students use multiple examples to see how a, b, and c affect the parent graph of sine and cosine. The activity promotes inquiry based learning and will help deepen the understanding of the graphs of sine and cosine.

http://ime.math.arizona.edu/g-teams/Profiles/JC/Graphing_Sine_and_Cosine_2013.pdf

 

 

green line

E.1: How can technology (YouTube, Khan Academy [khanacademy.org], Vi Hart, Geometers Sketchpad, graphing calculators, etc.) be used to effectively engage students with this topic? Note: It’s not enough to say “such-and-such is a great website”; you need to explain in some detail why it’s a great website.

Math can be seen in many forms of art from music to painting. I remember one of my favorite activities from math in high school was creating pictures with sine and cosine functions. We were able to draw flowers, clovers, and hearts simply with only the sine and cosine functions. After the students understand the parent function you can give them an exploration activity on their graphing calculator where they plug in various sine and cosine functions to draw flowers, clovers, and hearts. After that challenge the students to draw their own picture using the patterns they see from the examples. These same ideas can be used in computer graphics and animation to draw similar figures, and a lot of students are interested in computers and especially video games so this should be a fun activity for them.

clovers

ftp://arts.ucsc.edu/pub/ems/DANM%20220-2012/Drawing%20with%20trig.pdf

How I Impressed My Wife: Index

Some husbands try to impress their wives by lifting extremely heavy objects or other extraordinary feats of physical prowess.

That will never happen in the Quintanilla household in a million years.

But she was impressed that I broke an impasse in her research and resolved a discrepancy between Mathematica 4 and Mathematica 8 by finding the following integral by hand in less than an hour:

\displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}

Yes, I married well indeed.

In this post, I collect the posts that I wrote last summer regarding various ways of computing this integral.

Part 1: Introduction
Part 2a, 2b, 2c, 2d, 2e, 2f: Changing the endpoints of integration, multiplying top and bottom by \sec^2 x, and the substitution u = \tan x.
Part 3a, 3b, 3c, 3d, 3e, 3f, 3g, 3h, 3i: Double-angle trig identity, combination into a single trig function, changing the endpoints of integration, and the magic substitution u = \tan \theta/2.
Part 4a, 4b, 4c, 4d, 4e, 4f, 4g, 4h: Double-angle trig identity, combination into a single trig function, changing the endpoints of integration, and contour integration using the unit circle
Part 5a, 5b, 5c, 5d, 5e, 5f, 5g, 5h, 5i, 5j: Independence of the parameter a, the magic substitution u = \tan \theta/2, and partial fractions.
Part 6a, 6b, 6c, 6d, 6e, 6f, 6g:Independence of the parameter a, the magic substitution u = \tan \theta/2, and contour integration using the real line and an expanding semicircle.
Part 7: Concluding thoughts… and ways that should work that I haven’t completely figured out yet.

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.