{"id":1949,"date":"2025-07-31T17:43:28","date_gmt":"2025-07-31T17:43:28","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/precalculus\/?post_type=chapter&#038;p=1949"},"modified":"2025-08-13T03:09:15","modified_gmt":"2025-08-13T03:09:15","slug":"graphs-of-the-sine-and-cosine-function-learn-it-4-2","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/precalculus\/chapter\/graphs-of-the-sine-and-cosine-function-learn-it-4-2\/","title":{"raw":"Graphs of the Sine and Cosine Function: Learn It 4","rendered":"Graphs of the Sine and Cosine Function: Learn It 4"},"content":{"raw":"<h2>Writing the Function for a Sine or Cosine Graph<\/h2>\r\n<section class=\"textbox example\" aria-label=\"Example\">\u00a0<span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">Determine the formula for the cosine function graphed.<\/span><img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003943\/CNX_Precalc_Figure_06_01_015.jpg\" alt=\"A graph of -0.5cos(x)+0.5. The graph has an amplitude of 0.5. The graph has a period of 2pi. The graph has a range of [0, 1]. The graph is also reflected about the x-axis from the parent function cos(x).\" width=\"487\" height=\"163\" \/>[reveal-answer q=\"509662\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"509662\"]\r\n<p id=\"fs-id1165137726017\">To determine the equation, we need to identify each value in the general form of a sinusoidal function.<\/p>\r\n<p style=\"text-align: center;\">[latex]y=A\\sin\\left(Bx-C\\right)+D[\/latex]<span id=\"MathJax-Element-411-Frame\" class=\"MathJax\" style=\"font-style: normal; font-weight: normal; line-height: normal; font-size: 14px; text-indent: 0px; text-align: center; letter-spacing: normal; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px;\" role=\"presentation\"><\/span><\/p>\r\n<p style=\"text-align: center;\">[latex]y=A\\cos\\left(Bx-C\\right)+D[\/latex]<\/p>\r\n<p id=\"fs-id1165137704661\">The graph could represent either a sine or a\u00a0<span class=\"no-emphasis\">cosine function<\/span>\u00a0that is shifted and\/or reflected. When [latex]x=0[\/latex], the graph has an extreme point, [latex](0,0)[\/latex]. Since the cosine function has an extreme point for [latex]x=0[\/latex], let us write our equation in terms of a cosine function.<\/p>\r\n<p id=\"fs-id1165135536557\">Let\u2019s start with the midline. We can see that the graph rises and falls an equal distance above and below [latex]y=0.5[\/latex]. This value, which is the midline, is\u00a0<em>D <\/em>in\u00a0the equation, so <em>D<\/em>=0.5.<\/p>\r\n<p id=\"fs-id1165137938642\">The greatest distance above and below the midline is the amplitude. The maxima are 0.5 units above the midline and the minima are 0.5 units below the midline. So |<em>A<\/em>|=0.5. Another way we could have determined the amplitude is by recognizing that the difference between the height of local maxima and minima is 1, so |<em>A<\/em>|=[latex]\\frac{1}{2}[\/latex]. Also, the graph is reflected about the\u00a0<em>x<\/em>-axis so that\u00a0<em>A<\/em>=0.5.<\/p>\r\n<p id=\"fs-id1165134204425\">The graph is not horizontally stretched or compressed, so\u00a0<em>B<\/em>=0 and the graph is not shifted horizontally, so\u00a0<em>C<\/em>=0.<\/p>\r\n<p id=\"fs-id1165135347312\">Putting this all together,<\/p>\r\n<p style=\"text-align: center;\">[latex]g(x)=0.5\\cos\\left(x\\right)+0.5[\/latex]<\/p>\r\n<p style=\"text-align: left;\"><span style=\"font-size: 1rem; text-align: initial;\">[\/hidden-answer]<\/span><\/p>\r\n\r\n<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">\r\n<div class=\"bcc-box bcc-success\">\r\n\r\nDetermine the formula for the sine function in the graph.\r\n<figure id=\"Figure_06_01_016\" class=\"small\"><img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003945\/CNX_Precalc_Figure_06_01_016.jpg\" alt=\"A graph of sin(x)+2. Period of 2pi, amplitude of 1, and range of [1, 3].\" width=\"487\" height=\"173\" \/><\/figure>\r\n[reveal-answer q=\"448760\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"448760\"]\r\n\r\n[latex]f(x)=\\sin(x)+2[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">[ohm_question hide_question_numbers=1]126732[\/ohm_question]<\/section>\r\n<div class=\"bcc-box bcc-success\"><section class=\"textbox example\" aria-label=\"Example\">Determine the equation for the sinusoidal function.<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003947\/CNX_Precalc_Figure_06_01_017.jpg\" alt=\"A graph of 3cos(pi\/3x-pi\/3)-2. Graph has amplitude of 3, period of 6, range of [-5,1].\" width=\"731\" height=\"565\" \/>[reveal-answer q=\"680521\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"680521\"]With the highest value at 1 and the lowest value at\u22125, the midline will be halfway between at \u22122. So <em>D<\/em> = \u22122.The distance from the midline to the highest or lowest value gives an amplitude of |A|=3.The period of the graph is 6, which can be measured from the peak at <em>x\u00a0<\/em>= 1 to the next peak at <em>x<\/em> = 7,\u00a0or\u00a0from the distance between the lowest points. Therefore, [latex]\\text{P}=\\frac{2\\pi}{|B|}=6[\/latex]. Using the positive value for <em>B<\/em>, we find that\r\n<p style=\"text-align: center;\">[latex]B=\\frac{2\u03c0}{P}=\\frac{2\u03c0}{6}=\\frac{\u03c0}{3}[\/latex]<\/p>\r\nSo far, our equation is either [latex]y=3\\sin(\\frac{\\pi}{3}x\u2212C)\u22122[\/latex] or [latex]y=3\\cos(\\frac{\\pi}{3}x\u2212C)\u22122[\/latex]. For the shape and shift, we have more than one option. We could write this as any one of the following:\r\n<ul>\r\n \t<li>a cosine shifted to the right<\/li>\r\n \t<li>a negative cosine shifted to the left<\/li>\r\n \t<li>a sine shifted to the left<\/li>\r\n \t<li>a negative sine shifted to the right<\/li>\r\n<\/ul>\r\nWhile any of these would be correct, the cosine shifts are easier to work with than the sine shifts in this case because they involve integer values. So our function becomes\r\n<p style=\"text-align: center;\">[latex]y=3\\cos(\\frac{\u03c0}{3}x\u2212\\frac{\u03c0}{3})\u22122[\/latex] or [latex]y=\u22123\\cos(\\frac{\u03c0}{3}x+\\frac{2\u03c0}{3})\u22122[\/latex]<\/p>\r\nAgain, these functions are equivalent, so both yield the same graph.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">Write a formula for the function graphed.\r\n<figure id=\"Figure_06_01_018\" class=\"medium\"><img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003949\/CNX_Precalc_Figure_06_01_018n.jpg\" alt=\"A graph of 4sin((pi\/5)x-pi\/5)+4. Graph has period of 10, amplitude of 4, range of [0,8].\" width=\"731\" height=\"440\" \/><\/figure>\r\n[reveal-answer q=\"993227\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"993227\"]\r\n\r\ntwo possibilities are: [latex]y=4\\sin(\\frac{\u03c0}{5}x\u2212\\frac{\u03c0}{5})+4[\/latex] or [latex]y=\u22124sin(\\frac{\u03c0}{5}x+4\\frac{\u03c0}{5})+4[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">[ohm_question hide_question_numbers=1]126749[\/ohm_question]<\/section><\/div>","rendered":"<h2>Writing the Function for a Sine or Cosine Graph<\/h2>\n<section class=\"textbox example\" aria-label=\"Example\">\u00a0<span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">Determine the formula for the cosine function graphed.<\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003943\/CNX_Precalc_Figure_06_01_015.jpg\" alt=\"A graph of -0.5cos(x)+0.5. The graph has an amplitude of 0.5. The graph has a period of 2pi. The graph has a range of [0, 1]. The graph is also reflected about the x-axis from the parent function cos(x).\" width=\"487\" height=\"163\" \/><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q509662\">Show Solution<\/button><\/p>\n<div id=\"q509662\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165137726017\">To determine the equation, we need to identify each value in the general form of a sinusoidal function.<\/p>\n<p style=\"text-align: center;\">[latex]y=A\\sin\\left(Bx-C\\right)+D[\/latex]<span id=\"MathJax-Element-411-Frame\" class=\"MathJax\" style=\"font-style: normal; font-weight: normal; line-height: normal; font-size: 14px; text-indent: 0px; text-align: center; letter-spacing: normal; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px;\" role=\"presentation\"><\/span><\/p>\n<p style=\"text-align: center;\">[latex]y=A\\cos\\left(Bx-C\\right)+D[\/latex]<\/p>\n<p id=\"fs-id1165137704661\">The graph could represent either a sine or a\u00a0<span class=\"no-emphasis\">cosine function<\/span>\u00a0that is shifted and\/or reflected. When [latex]x=0[\/latex], the graph has an extreme point, [latex](0,0)[\/latex]. Since the cosine function has an extreme point for [latex]x=0[\/latex], let us write our equation in terms of a cosine function.<\/p>\n<p id=\"fs-id1165135536557\">Let\u2019s start with the midline. We can see that the graph rises and falls an equal distance above and below [latex]y=0.5[\/latex]. This value, which is the midline, is\u00a0<em>D <\/em>in\u00a0the equation, so <em>D<\/em>=0.5.<\/p>\n<p id=\"fs-id1165137938642\">The greatest distance above and below the midline is the amplitude. The maxima are 0.5 units above the midline and the minima are 0.5 units below the midline. So |<em>A<\/em>|=0.5. Another way we could have determined the amplitude is by recognizing that the difference between the height of local maxima and minima is 1, so |<em>A<\/em>|=[latex]\\frac{1}{2}[\/latex]. Also, the graph is reflected about the\u00a0<em>x<\/em>-axis so that\u00a0<em>A<\/em>=0.5.<\/p>\n<p id=\"fs-id1165134204425\">The graph is not horizontally stretched or compressed, so\u00a0<em>B<\/em>=0 and the graph is not shifted horizontally, so\u00a0<em>C<\/em>=0.<\/p>\n<p id=\"fs-id1165135347312\">Putting this all together,<\/p>\n<p style=\"text-align: center;\">[latex]g(x)=0.5\\cos\\left(x\\right)+0.5[\/latex]<\/p>\n<p style=\"text-align: left;\"><span style=\"font-size: 1rem; text-align: initial;\"><\/div>\n<\/div>\n<p><\/span><\/p>\n<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\">\n<div class=\"bcc-box bcc-success\">\n<p>Determine the formula for the sine function in the graph.<\/p>\n<figure id=\"Figure_06_01_016\" class=\"small\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003945\/CNX_Precalc_Figure_06_01_016.jpg\" alt=\"A graph of sin(x)+2. Period of 2pi, amplitude of 1, and range of [1, 3].\" width=\"487\" height=\"173\" \/><\/figure>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q448760\">Show Solution<\/button><\/p>\n<div id=\"q448760\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]f(x)=\\sin(x)+2[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\"><iframe loading=\"lazy\" id=\"ohm126732\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=126732&theme=lumen&iframe_resize_id=ohm126732&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<div class=\"bcc-box bcc-success\">\n<section class=\"textbox example\" aria-label=\"Example\">Determine the equation for the sinusoidal function.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003947\/CNX_Precalc_Figure_06_01_017.jpg\" alt=\"A graph of 3cos(pi\/3x-pi\/3)-2. Graph has amplitude of 3, period of 6, range of [-5,1].\" width=\"731\" height=\"565\" \/><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q680521\">Show Solution<\/button><\/p>\n<div id=\"q680521\" class=\"hidden-answer\" style=\"display: none\">With the highest value at 1 and the lowest value at\u22125, the midline will be halfway between at \u22122. So <em>D<\/em> = \u22122.The distance from the midline to the highest or lowest value gives an amplitude of |A|=3.The period of the graph is 6, which can be measured from the peak at <em>x\u00a0<\/em>= 1 to the next peak at <em>x<\/em> = 7,\u00a0or\u00a0from the distance between the lowest points. Therefore, [latex]\\text{P}=\\frac{2\\pi}{|B|}=6[\/latex]. Using the positive value for <em>B<\/em>, we find that<\/p>\n<p style=\"text-align: center;\">[latex]B=\\frac{2\u03c0}{P}=\\frac{2\u03c0}{6}=\\frac{\u03c0}{3}[\/latex]<\/p>\n<p>So far, our equation is either [latex]y=3\\sin(\\frac{\\pi}{3}x\u2212C)\u22122[\/latex] or [latex]y=3\\cos(\\frac{\\pi}{3}x\u2212C)\u22122[\/latex]. For the shape and shift, we have more than one option. We could write this as any one of the following:<\/p>\n<ul>\n<li>a cosine shifted to the right<\/li>\n<li>a negative cosine shifted to the left<\/li>\n<li>a sine shifted to the left<\/li>\n<li>a negative sine shifted to the right<\/li>\n<\/ul>\n<p>While any of these would be correct, the cosine shifts are easier to work with than the sine shifts in this case because they involve integer values. So our function becomes<\/p>\n<p style=\"text-align: center;\">[latex]y=3\\cos(\\frac{\u03c0}{3}x\u2212\\frac{\u03c0}{3})\u22122[\/latex] or [latex]y=\u22123\\cos(\\frac{\u03c0}{3}x+\\frac{2\u03c0}{3})\u22122[\/latex]<\/p>\n<p>Again, these functions are equivalent, so both yield the same graph.<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\">Write a formula for the function graphed.<\/p>\n<figure id=\"Figure_06_01_018\" class=\"medium\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27003949\/CNX_Precalc_Figure_06_01_018n.jpg\" alt=\"A graph of 4sin((pi\/5)x-pi\/5)+4. Graph has period of 10, amplitude of 4, range of [0,8].\" width=\"731\" height=\"440\" \/><\/figure>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q993227\">Show Solution<\/button><\/p>\n<div id=\"q993227\" class=\"hidden-answer\" style=\"display: none\">\n<p>two possibilities are: [latex]y=4\\sin(\\frac{\u03c0}{5}x\u2212\\frac{\u03c0}{5})+4[\/latex] or [latex]y=\u22124sin(\\frac{\u03c0}{5}x+4\\frac{\u03c0}{5})+4[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\"><iframe loading=\"lazy\" id=\"ohm126749\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=126749&theme=lumen&iframe_resize_id=ohm126749&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<\/div>\n","protected":false},"author":13,"menu_order":8,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":191,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/1949"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/users\/13"}],"version-history":[{"count":5,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/1949\/revisions"}],"predecessor-version":[{"id":1961,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/1949\/revisions\/1961"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/parts\/191"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/1949\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/media?parent=1949"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapter-type?post=1949"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/contributor?post=1949"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/license?post=1949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}