"When am I ever going to have to use this?" - School kid to every math teacher ever
Well, as it turns out, there are sometimes random instances in which math can be used in real life. (I mean even outside of a work context.) I've included two recent examples below.
Example 1: Clock hands alignment
I wanted to know when, precisely, the hour hand and the minute hand on a standard clock are perfectly aligned. There was no actual practical application for this problem; I was just curious.
Essentially, we need to find all the times at which the angles of the two hands are identical. The angles range from 0 to 360 degrees. (I hate radians.) So, over the course of an hour, the hour hand moves 30 degrees, while the minute hand moves a full 360 degrees. The angles of the two hands can be represented by the graphic below:
This problem seeks to find the points of intersection between the lines. To do so, we can establish equations for the angles of the hour and minutes hands:
Let t represent the clock-face time in decimal form (e.g., 2:30 is represented by t = 2.5). Let h(t) be the angle of the hour hand at time t, and m(t) be the angle of the minute hand at time t. We define h(t) and m(t) as follows:
h(t) = 30 * t
m(t) = 360 * (t - k)
Because m(t) is cyclical, we use k to denote the kth hour on the clock. That is, k is the integer such that k < t < k + 1.
To find the points of intersection, we can set h(t) equal to m(t) and solve for t.
30t = 360t - 360k
360k = 330t
t = k * (12/11)
Then, for each integer value of k from 0 to 11 (0 represents clock hour 12), we can find the value of t which gives the point of intersection for each hour. Then we can translate this t into a standard time. The eleven solutions are below:
k = 0 → t = 0 → 12:00:00
k = 1 → t = 12/11 = 1.0909 → 1:05:27
k = 2 → t = 24/11 = 2.1818 → 2:10:54
k = 3 → t = 36/11 = 3.2727 → 3:16:22
k = 4 → t = 48/11 = 4.3636 → 4:21:49
k = 5 → t = 60/11 = 5.4545 → 5:27:16
k = 6 → t = 72/11 = 6.5455 → 6:32:44
k = 7 → t = 84/11 = 7.6364 → 7:38:11
k = 8 → t = 96/11 = 8.7273 → 8:43:38
k = 9 → t = 108/11 = 9.8081 → 9:49:05
k = 10 → t = 120/11 = 10.9091 → 10:54:33
k = 11 → t = 132/11 = 12 → 12:00:00
Interestingly enough, the 11 hour does not have such an intersection point. By the time the intersection happens, it is the 12th hour (or the 0th hour).
A similar exercise could be done for the second hand as well--when the second and minute hands align or when the second and hour hands align. There exists no point where all three hands are in alignment except for 12:00:00.
Example 2: Cutting a regular pentagon
I wanted to cut a perfect star from a square piece of fabric to sew onto a shirt for a Halloween costume. To do so, I would start with a regular pentagon and then cut isosceles triangles into the sides. The isosceles triangles were the easy part; the pentagon was the hard part, perhaps because I had no way to measure the 108-degree angles required for a regular pentagon. So, instead, I busted out some good old-fashioned high school trigonometry to determine where along the edges of the fabric I should cut to create an inscribed pentagon.
First, I made an assumption by inspection: The largest inscribed regular pentagon within a square is that which is rotated at 45 degrees, with its top point and the midpoint of its bottom segment lying along the square's diagonal. The figure below shows this:
I sought to find the points of intersection between the pentagon and the square's edge; these are the points where I would cut. These are points B, D, F, and H on the modified figure below:
Given that the pentagon is regular and is rotated 45 degrees, all angles can be calculated, as shown in the figure below:
The square of fabric was 9 inches on all sides, but the calculations below would apply for any length c; simply replace all instances of 9 with c. Based on that information and trigonometric ratios for right triangles, we can set the following system of equations (all angles in degrees because I hate radians):
(1) AB + BC = 9
(2) CD + DE = 9
(3) EF + FG = 9
(4) GH + AG = 9
(5) BC = CD
(6) AB = DE
(7) AH = EF
(8) FG = GH
(9) BD = DF = BH
(10) cos(45) = BC / BD
Substituting BC from (10) into equation (1), we get AB + BD * cos(45) = 9
(11) cos(27) = AB / BH
Substituting AB from (11) into equation (1), we get BH * cos(27) + BD * cos(45) = 9
Since BH = BD, we get that the length of the pentagon's sides is 9 / [cos(27) + cos(45)]
We can substitute BD into equation (10) and equation (5) and derive that BC = CD = 9 * cos(45) / [cos(27) + cos(45)]
Substituting BC into equation (1) and equation (6), we get AB = DE = 9 * cos(27) / [cos(27) + cos(45)]
Following similar logic, we can calculate that AH = EF = 9 * sin(27) / [cos(27) + cos(45)]
Running the numbers, we find that points B and D are 3.98218 inches from corner point C; and points H and F are 2.55671 inches from corner points A and E, respectively. The pentagon's side length is also 5.6315 inches, which we can use to calculate how far from point G along the square's diagonal to cut to form the pentagon's top two sides: the lines from points F and H that intersect with the square's diagonal and are exactly 5.6315 inches long.
So, I cut the fabric. Due to human error and decimal truncation, it wasn't a perfectly regular pentagon, but it was close enough such that the errors were imperceptible. Then I cut isosceles triangles into the pentagon's sides, made a star, and sewed it onto my Halloween costume.
Ta-dah.