| 1 | <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 | <title>cos</title> |
| 3 | <style> |
| 4 | td { padding-left: 5pt; padding-right: 5pt; } |
| 5 | th { padding-left: 5pt; padding-right: 5pt; } |
| 6 | code { white-space: pre-wrap; } |
| 7 | dd { white-space: pre-wrap; } |
| 8 | </style> |
| 9 | </head><body bgcolor="#FFFFFF"> |
| 10 | |
| 11 | <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Monaco,Courier" size=6 color="#999900"><b> |
| 12 | cos |
| 13 | </b></font></table></table> |
| 14 | <p>A function that can be used in <a href="Formulas.html">Formulas</a>.</p> |
| 15 | <h2>Syntax and semantics</h2> |
| 16 | <dl> |
| 17 | <dt><b><code><font size=+1>cos</font></code></b> (<i><code><font size=+1>x</font></code></i>) |
| 18 | <dd>compute the cosine of <i><code><font size=+1>x</font></code></i>.</dd> |
| 19 | </dl> |
| 20 | <code> Axes: -5, 5, -1.1, 1.1<br></code> |
| 21 | <code> Draw inner box<br></code> |
| 22 | <code> Draw function: -5, 5, 1000, ~ <b>cos</b> (x)<br></code> |
| 23 | <code> One mark bottom: -3*pi/2, "no", "yes", "yes", "\-m3%\pi/2"<br></code> |
| 24 | <code> One mark bottom: -pi, "no", "yes", "yes", "\-m%\pi"<br></code> |
| 25 | <code> One mark bottom: -pi/2, "no", "yes", "yes", "\-m%\pi/2"<br></code> |
| 26 | <code> One mark bottom: 0, "no", "yes", "yes", "0"<br></code> |
| 27 | <code> One mark bottom: pi/2, "no", "yes", "yes", "+%\pi/2"<br></code> |
| 28 | <code> One mark bottom: pi, "no", "yes", "yes", "+%\pi"<br></code> |
| 29 | <code> One mark bottom: 3*pi/2, "no", "yes", "yes", "+3%\pi/2"<br></code> |
| 30 | <code> One mark left: -1, "no", "yes", "yes", "\-m1"<br></code> |
| 31 | <code> One mark left: 0, "no", "yes", "yes", "0"<br></code> |
| 32 | <code> One mark left: 1, "no", "yes", "yes", "+1"<br></code> |
| 33 | <code> Text bottom: "yes", "%x \->"<br></code> |
| 34 | <code> Text left: "yes", "##<b>cos</b># (%x)"<br></code> |
| 35 | <code> Text top: "no", "##just over one and a half periods of a (co)sine wave"<br></code> |
| 36 | <p align=middle><img height=300 width=600 src=_cos__1.png></p><p>This picture illustrates the following properties of the cosine function:</p> |
| 37 | <dl> |
| 38 | <dd style="position:relative;padding-left:1em;text-indent:-2em">• <b><code><font size=+1>cos</font></code></b> (<i>x</i>) is zero for all values of <i>x</i> that are odd multiples of <i>π</i>/2.</dd> |
| 39 | <dd style="position:relative;padding-left:1em;text-indent:-2em">• The extrema of <b><code><font size=+1>cos</font></code></b> (<i>x</i>) are −1 and +1.</dd> |
| 40 | <dd style="position:relative;padding-left:1em;text-indent:-2em">• <b><code><font size=+1>cos</font></code></b> (<i>x</i>) is −1 or +1 wherever <i>x</i> is an integer multiple of <i>π</i>.</dd> |
| 41 | <dd style="position:relative;padding-left:1em;text-indent:-2em">• The cosine function is <i>periodic</i> with period 2<i>π</i>, i.e., <b><code><font size=+1>cos</font></code></b> (<i>x</i>+2<i>π</i>) = <b><code><font size=+1>cos</font></code></b> (<i>x</i>).</dd> |
| 42 | <dd style="position:relative;padding-left:1em;text-indent:-2em">• The cosine function is <i>symmetric</i> around 0, i.e. <b><code><font size=+1>cos</font></code></b> (−<i>x</i>) = <b><code><font size=+1>cos</font></code></b> (<i>x</i>).</dd> |
| 43 | <dd style="position:relative;padding-left:1em;text-indent:-2em">• The cosine function is <i>antisymmetric</i> around <i>π</i>/2, i.e. <b><code><font size=+1>cos</font></code></b> (<i>π</i>/2−<i>x</i>) = − <b><code><font size=+1>cos</font></code></b> (<i>x</i>); in other words, if you take the cosine curve and rotate it by 180 degrees around the point (<i>π</i>/2, 0), then you get the same curve again.</dd> |
| 44 | </dl> |
| 45 | <p>A cosine wave is a special case of the more general <i>sine wave</i> that is given by <i>y</i> = <a href="_sin_.html"><b><code><font size=+1>sin</font></code></b></a> (<i>x</i> + <i>φ</i>), where <i>φ</i> (an additive constant called the <i>initial phase</i>) is <i>π</i>/2.</p> |
| 46 | <h3>Links to this page</h3> |
| 47 | <ul> |
| 48 | <li><a href="_cos-H-H_.html"><code><font size=+1>cos##</font></code></a> |
| 49 | <li><a href="_cos-H_.html"><code><font size=+1>cos#</font></code></a> |
| 50 | <li><a href="Functions.html">Functions</a> |
| 51 | </ul> |
| 52 | <hr> |
| 53 | <address> |
| 54 | <p>© Paul Boersma 2023</p> |
| 55 | </address> |
| 56 | </body> |
| 57 | </html> |