Calculus for the Life Sciences II c Functions Joseph M. Mahaffy, mahaffy@math.ssu.eu Department of Mathematics an Statistics Dynamical Systems Group Computational Sciences Research Center San Diego State University San Diego, CA 918-77 http://www-rohan.ssu.eu/ jmahaffy Outline 1 Fall c (1/44) (/44) Differentiation of Trigonometric Functions Showe Sine an Cosine Moels were goo for perioic phenomenon Trigonometric functions are use to approximate more complicate behavior Joseph Fourier (1768-183) use series of trigonometric functions to approximate other phenomena, such as harmonic motion of vibrating strings Tial flow results from the interaction of iffering gravitational fiels The complex ynamics are approximate by a short series of trigonometric functions with perios relate to the astronomical boies causing the tial flow c (3/44) Oceans are one of the great remaining frontiers Over half of the population on this planet lives within 1 miles of the oceans Tial flow affects the aily ynamics of coastal zones The Bay of Funy in Newfounlan has ties rising over 16 meters in a 6.5 hour time perio In San Diego, the tial flow is not so ramatic The ties o affect a variety of marine behaviors Most ays there are two high ties (high-high an low-high) an two low ties (low-low an high-low) (4/44)
How are ties preicte an what is the basis for their variability? Gravitational forces of the Sun an Moon are the primary causes for generation of ties on Earth What causes the changes in amplitue an perio between the high an low ties? The primary forces generating the ties are from the gravity of the sun an the moon c (5/44) (6/44) 1 Four Dominant Diurnal components about 4 hours (once per ay) K 1, the lunisolar force O 1, the main lunar force Semiiurnal components about hours (twice per ay) M, the main lunar force S, the main solar force Perioic motion of the moon about the Earth (about 5 hours) cause variations When the moon, Earth, an sun align at either a full moon or a new moon, then the ties are at their highest an lowest as the forces of gravity enhance tial flow The ties show the least variation when the moon is in its first or last quarter Other complications inclue The elliptical orbit of the moon aroun the Earth The elliptical orbit of the Earth aroun the sun The influences of other planets c (7/44) (8/44)
1 What mathematical tools can help preict the ties? Use a series of trigonometric functions to approximate the behavior of the ties Stanar programs use -14 trigonometric functions Next Slie are graphs of the high an low ties for San Diego for September The moel is generate using only four trigonometric functions from the four forces escribe above The ata points inicate the actual values of the high an low ties from stanar tie tables c (9/44) First weeks of for San Diego in September Moel an Data Tie Height (ft) Sept 1 7, Tie Height (ft) Sept 8 14, 6 4 6 4 1 3 4 5 6 7 8 9 1 11 13 14 (1/44) 3 Last weeks of for San Diego in September Moel an Data Tie Height (ft) Sept 15 1, Tie Height (ft) Sept 8, 6 4 6 4 15 16 17 18 19 1 3 4 5 6 7 8 Day c (11/44) 4 Moel for Height of, h(t) in feet with t hours from minight 1 st ay of the month The function h(t) is forme by the sum of four cosine functions an a constant The perios of the cosine functions reflect the perioic nature of the forces K 1, lunisolar iurnal force with perio p 1 = 3.934 O 1, main lunar iurnal force with perio p = 5.819 M, main lunar semiiurnal force with perio p 3 =.41 S, main solar semiiurnal force with perio p 4 =. Perios are fixe base on the rotations of the moon an Earth (/44)
5 Moel for Height of The amplitues associate with each force are a i, i = 1,.., 4 The phase shifts associate with each force are φ i, i = 1,.., 4 A vertical shift satisfies a The parameters, a i an φ i, are fit using a least squares best fit to the high an low ties for the month of September h(t) = a + 4 i=1 ( ) π a i cos (t φ i ) p i 6 h(t) = a + Best Fitting Parameters 4 i=1 Vertical Shift ( ) π a i cos (t φ i ) p i a =.937 ft Force Amplitue Phase Shift K 1 a 1 =.878 φ 1 = 16.46 O 1 a =.76 φ = 14.311 M a 3 = 1.993 φ 3 = 6.164 S a 4 =.899 φ 4 = 1.857 c (13/44) (14/44) 7 8 Moel an Forces The strongest force affecting the ties is the semiiurnal main lunar force The highest an lowest ties of the month coincie with the new moon an full moon New Moon First Quarter Full Moon Last Quarter Moelling Low an High When o the highest an lowest ties occur base on the mathematical moel? The high an low points of a function are the maxima an minima This uses ifferentiation of our moel, h(t) The high an low ties shoul occur when h (t) = September 6 September 13 September 1 September 9 c (15/44) (16/44)
1 The erivative of these functions is foun using the efinition of the erivative an some trigonometric ientities Derivative of Sine Derivative of Cosine sin(x) = cos(x) x cos(x) = sin(x) x c (17/44) 3 Differentiation of Cosine Below is the graph of cosine an its erivative cos(x) = sin(x) x f(t) an f (t).5.5 f(t) = cos(t) f (t) = sin(t) Cosine an Its Derivative π π π π t c (19/44) Differentiation of Sine Below is the graph of sine an its erivative sin(x) = cos(x) x f(t) an f (t).5.5 f(t) = sin(t) f (t) = cos(t) Sine an Its Derivative π π π π t (18/44) 4 General Rule of The chain rule can be applie to give a more general rule of ifferentiation General Derivative of Sine x sin(f(x)) = f (x) cos(f(x)) General Derivative of Cosine x cos(f(x)) = f (x) sin(f(x)) (/44)
Example 1: Derivative of Sine Function Example : Derivative of Cosine Function Example 1: Consier the function Fin the erivative of f(x) Skip Example f(x) = sin(x + 1) Solution: Since the erivative of x + 1 is x, the erivative of f(x) is f (x) = x cos(x + 1) Example : Consier the function f(x) = e 3x cos(x + 4) Fin the erivative of f(x) Skip Example Solution:This erivative uses the prouct an chain rule f (x) = e 3x ( x sin(x + 4)) + cos(x + 4)(e 3x ( 3)) f (x) = e 3x (x sin(x + 4) + 3 cos(x + 4)) c (1/44) (/44) Example 3: More of Differentiation Example 4: More of Differentiation Example 3: Consier the function Fin the erivative of f(x) Skip Example f(x) = 3x sin(ln(x + )) Solution:This erivative uses the prouct an chain rule f (x) = ( 3x ) ( ) sin(ln(x + )) + 6x sin(ln(x + )) x f (x) = 3x cos(ln(x + )) x + + 6x sin(ln(x + )) Example 4: Consier the function f(x) = 4e cos(x+1) Fin the erivative of f(x) Skip Example Solution:This erivative uses the chain rule g (x) = 4e cos(x+1) ( sin(x + 1)) c (3/44) (4/44)
Example: 1 Example: Consier the function Skip Example y(t) = e t sin(t) Function escribes the motion of a ampe oscillator, like shock absorbers on a car Fin the absolute maximum an minimum for this function for t Graph of this function Example: Solution: is given by y(t) = e t sin(t) Derivative foun with the prouct rule y (t) = (e t cos(t) + e t ( 1) sin(t)) = e t (cos(t) sin(t)) The extrema occur when f (t) =, which happens whenever cos(t) = sin(t) Sine an cosine are equal when t = π 4 + nπ c (5/44) (6/44) Example: 3 Solution (cont): satisfies y(t) = e t sin(t) y (t) = e t (cos(t) sin(t)) The exponential function amps this solution to zero Horizontal asymptote of y = The function is zero whenever t = nπ for n an integer The absolute maximum an minimum occur at the first relative maximum an minimum The maximum occurs when t = π 4 with y ( ) ( π 4 = e π 4 sin π ) 4.6448 The minimum happens when t = 5π 4 with y ( ) ( 5π 4 = e 5π 4 sin 5π ) 4.786 c (7/44) Example: 4 Solution (cont): y(t).6.5.4.3..1 y(t) = e t sin(t) 1 3 4 5 6 7 t (8/44)
1 The highest an lowest ties of the month occur near the Full or New moon phases The gravity of the moon assists the gravity of the sun to enlarge the ties Use the moel to preict the highest high-high tie an lowest low-low tie for the first week Determine the error between the moel an the actual values for these ties The times an heights of the high an low ties use the local extrema c (9/44) 3 Moel for h(t) = a + The erivative satisfies: h (t) = i=1 4 i=1 ( ) a i cos π p i (t φ i ) 4 ( ) πai ( ) sin π p i (t φ i ) p i Clearly, this equation is too complicate to fin the extrema by han The Computer labs have shown that fining zeroes of this function are reaily one using either Excel s Solver or Maple s fsolve comman (3/44) 4 New Moon There was a New moon on September 6, The graphs show many local extrema for the month of September Usually four of them each ay Localize the search for the extrema using the visual information from the graph In the first week, the ata show that the highest tie is 6.7 ft on Sept. 6, while the lowest tie is 1. ft on the same ay So what oes our moel using four cosine functions preict to be the highest an lowest ties of this week? Low Tie Preiction for September 6, Parameters were fit for complete month of September an given earlier Set h (t) = an solve with a computer Low Tie Preiction The lowest tie of the first week from the moel occurs when t min = 4.58 hrs with a h(t min ) =.86 ft This correspons to Sept. 6 at 4:35 am The actual low-low tie on Sept. 6 is 1. ft occurring at 3:35 am The moel overshoots the tie height by about.14 feet an misses the time by 6 minutes c (31/44) (3/44)
5 6 High Tie Preiction for September 6, Repeat process for High Tie High Tie Preiction The highest tie of the first week from the moel occurs when t max = 14.56 hrs with a h(t max ) = 6.4 ft This correspons to Sept. 6 at 1:33 pm The actual high-high tie on Sept. 6 is 6.7 ft occurring at 9:36 pm The moel unershoots the tie height by about.3 feet an misses the time by 57 minutes Graph of : Moel an Data Tie Height (ft) September 6, 6 4 5 1 15 Hour c (33/44) (34/44) 7 Summary of Tie Moel for September The calculations above show that our moel introuces a moerate error Moel only uses four cosine functions to try to preict an entire month of high an low ties This is a reasonable approach to the problem Obviously, the aition of more trigonometric functions an more parameters can prouce a much more accurate moel Actual moels use -14 trigonometric functions to moel ties The information line (619-1-884) for the San Diego Beach report gives tie information c (35/44) 1 Maximum The sine function can be use to approximate the temperature uring a ay T (t) = A + B sin(ω(t φ)), with constants A, B, ω >, an φ [, 4) are etermine from the ata Suppose that the coolest temperature for a ay occurs at 3 am an is 56 F Assume at 3 pm, the hottest temperature of 8 F occurs (36/44)
Maximum The Temperature is moele by T (t) = A + B sin(ω(t φ)), Fin the constants that best fit the ata for the temperature uring the ay assuming that the temperature has a 4 hour perio Determine the times uring the ay that the temperature is rising most rapily an falling most rapily Give the rate of change of temperature at those times 3 Solution: The temperature uring a ay The average temperature is T (t) = A + B sin(ω(t φ)) A = (56 + 8)/ = 69 F The amplitue of this function is foun from the ifference between the high temperature an the average temperature The 4 hour perioicity gives B = 8 69 = 13 F 4ω = π or ω = π c (37/44) (38/44) 4 Solution (cont): The temperature uring a ay T (t) = 69 + 13 sin ( π (t φ)) 5 Graph of Temperature Moel T(t) = 69 + 13 sin(π(t 9)/) The maximum occurs at 3 pm or t = 15 The maximum of the sine function occurs at π The phase shift, φ, solves It follows that π (15 φ) = π 15 φ = 6 or φ = 9 hr T(t) (in o F) 8 75 7 65 6 5 1 15 t (in hours) c (39/44) (4/44)
6 7 Graph of Derivative of Temperature Moel Solution (cont): Graph shows temperature is rising most rapily in the morning an falling most rapily in the evening 3 T (t) = (13π/) cos(π(t 9)/) Moel is The erivative satisfies T (t) = 69 + 13 sin ( π (t 9)) T (t) = 13π cos ( π (t 9)) T (t) (in o F/hr) 1 1 c (41/44) 3 5 1 15 t (in hours) (4/44) 8 Solution (cont): The erivative is T (t) = 13π cos ( π (t 9)) Fin the maximum rate of change by properties of T (t) Cosine has maximum when argument is zero, when t = 9 Maximum increase at 9 am with T (9) = 13π cos() = 13π 3.4 F/hr Minimum increase hours later with t = 1, so T (1) = 13π cos(π) = 13π 3.4 F/hr 9 Alternate Solution: The maximum an minimum rate of change occurs when secon erivative is zero T (t) = 13π 144 sin ( π (t 9)) The sine function is zero when the argument is nπ Solve Thus, π (t 9) = nπ, n =, 1,... t = 9 + n n =, 1,... This gives same result as before c (43/44) (44/44)