A Trig Identities
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
Fortran 90 Overview
1 Fortran 90 Overview J.E. Akin, Copyright 1998 This overview of Fortran 90 (F90) features is presented as a series of tables that illustrate the syntax and abilities of F90. Frequently comparisons are made to similar features in the C++ and F77 languages and to the Matlab environment. These tables show that F90 has significant improvements over F77 and matches or exceeds newer software capabilities found in C++ and Matlab for dynamic memory management, user defined data structures, matrix operations, operator definition and overloading, intrinsics for vector and parallel pro- cessors and the basic requirements for object-oriented programming. They are intended to serve as a condensed quick reference guide for programming in F90 and for understanding programs developed by others. List of Tables 1 Comment syntax . 4 2 Intrinsic data types of variables . 4 3 Arithmetic operators . 4 4 Relational operators (arithmetic and logical) . 5 5 Precedence pecking order . 5 6 Colon Operator Syntax and its Applications . 5 7 Mathematical functions . 6 8 Flow Control Statements . 7 9 Basic loop constructs . 7 10 IF Constructs . 8 11 Nested IF Constructs . 8 12 Logical IF-ELSE Constructs . 8 13 Logical IF-ELSE-IF Constructs . 8 14 Case Selection Constructs . 9 15 F90 Optional Logic Block Names . 9 16 GO TO Break-out of Nested Loops . 9 17 Skip a Single Loop Cycle . 10 18 Abort a Single Loop . 10 19 F90 DOs Named for Control . 10 20 Looping While a Condition is True . 11 21 Function definitions . 11 22 Arguments and return values of subprograms . 12 23 Defining and referring to global variables . -
Quick Overview: Complex Numbers
Quick Overview: Complex Numbers February 23, 2012 1 Initial Definitions Definition 1 The complex number z is defined as: z = a + bi (1) p where a, b are real numbers and i = −1. Remarks about the definition: • Engineers typically use j instead of i. • Examples of complex numbers: p 5 + 2i; 3 − 2i; 3; −5i • Powers of i: i2 = −1 i3 = −i i4 = 1 i5 = i i6 = −1 i7 = −i . • All real numbers are also complex (by taking b = 0). 2 Visualizing Complex Numbers A complex number is defined by it's two real numbers. If we have z = a + bi, then: Definition 2 The real part of a + bi is a, Re(z) = Re(a + bi) = a The imaginary part of a + bi is b, Im(z) = Im(a + bi) = b 1 Im(z) 4i 3i z = a + bi 2i r b 1i θ Re(z) a −1i Figure 1: Visualizing z = a + bi in the complex plane. Shown are the modulus (or length) r and the argument (or angle) θ. To visualize a complex number, we use the complex plane C, where the horizontal (or x-) axis is for the real part, and the vertical axis is for the imaginary part. That is, a + bi is plotted as the point (a; b). In Figure 1, we can see that it is also possible to represent the point a + bi, or (a; b) in polar form, by computing its modulus (or size), and angle (or argument): p r = jzj = a2 + b2 θ = arg(z) We have to be a bit careful defining φ, since there are many ways to write φ (and we could add multiples of 2π as well). -
Unit Circle Trigonometry
UNIT CIRCLE TRIGONOMETRY The Unit Circle is the circle centered at the origin with radius 1 unit (hence, the “unit” circle). The equation of this circle is xy22+ =1. A diagram of the unit circle is shown below: y xy22+ = 1 1 x -2 -1 1 2 -1 -2 We have previously applied trigonometry to triangles that were drawn with no reference to any coordinate system. Because the radius of the unit circle is 1, we will see that it provides a convenient framework within which we can apply trigonometry to the coordinate plane. Drawing Angles in Standard Position We will first learn how angles are drawn within the coordinate plane. An angle is said to be in standard position if the vertex of the angle is at (0, 0) and the initial side of the angle lies along the positive x-axis. If the angle measure is positive, then the angle has been created by a counterclockwise rotation from the initial to the terminal side. If the angle measure is negative, then the angle has been created by a clockwise rotation from the initial to the terminal side. θ in standard position, where θ is positive: θ in standard position, where θ is negative: y y Terminal side θ Initial side x x Initial side θ Terminal side Unit Circle Trigonometry Drawing Angles in Standard Position Examples The following angles are drawn in standard position: y y 1. θ = 40D 2. θ =160D θ θ x x y 3. θ =−320D Notice that the terminal sides in examples 1 and 3 are in the same position, but they do not represent the same angle (because x the amount and direction of the rotation θ in each is different). -
Fortran Math Special Functions Library
IMSL® Fortran Math Special Functions Library Version 2021.0 Copyright 1970-2021 Rogue Wave Software, Inc., a Perforce company. Visual Numerics, IMSL, and PV-WAVE are registered trademarks of Rogue Wave Software, Inc., a Perforce company. IMPORTANT NOTICE: Information contained in this documentation is subject to change without notice. Use of this docu- ment is subject to the terms and conditions of a Rogue Wave Software License Agreement, including, without limitation, the Limited Warranty and Limitation of Liability. ACKNOWLEDGMENTS Use of the Documentation and implementation of any of its processes or techniques are the sole responsibility of the client, and Perforce Soft- ware, Inc., assumes no responsibility and will not be liable for any errors, omissions, damage, or loss that might result from any use or misuse of the Documentation PERFORCE SOFTWARE, INC. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THE DOCUMENTATION. THE DOCU- MENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. PERFORCE SOFTWARE, INC. HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS WITH REGARD TO THE DOCUMENTATION, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PAR- TICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE, WHETHER IN CONTRACT, TORT, OR OTHERWISE, FOR ANY SPECIAL, CONSEQUENTIAL, INDIRECT, PUNITIVE, OR EXEMPLARY DAMAGES IN CONNECTION WITH THE USE OF THE DOCUMENTATION. The Documentation is subject to change at any time without notice. IMSL https://www.imsl.com/ Contents Introduction The IMSL Fortran Numerical Libraries . 1 Getting Started . 2 Finding the Right Routine . 3 Organization of the Documentation . 4 Naming Conventions . -
IEEE Standard 754 for Binary Floating-Point Arithmetic
Work in Progress: Lecture Notes on the Status of IEEE 754 October 1, 1997 3:36 am Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic Prof. W. Kahan Elect. Eng. & Computer Science University of California Berkeley CA 94720-1776 Introduction: Twenty years ago anarchy threatened floating-point arithmetic. Over a dozen commercially significant arithmetics boasted diverse wordsizes, precisions, rounding procedures and over/underflow behaviors, and more were in the works. “Portable” software intended to reconcile that numerical diversity had become unbearably costly to develop. Thirteen years ago, when IEEE 754 became official, major microprocessor manufacturers had already adopted it despite the challenge it posed to implementors. With unprecedented altruism, hardware designers had risen to its challenge in the belief that they would ease and encourage a vast burgeoning of numerical software. They did succeed to a considerable extent. Anyway, rounding anomalies that preoccupied all of us in the 1970s afflict only CRAY X-MPs — J90s now. Now atrophy threatens features of IEEE 754 caught in a vicious circle: Those features lack support in programming languages and compilers, so those features are mishandled and/or practically unusable, so those features are little known and less in demand, and so those features lack support in programming languages and compilers. To help break that circle, those features are discussed in these notes under the following headings: Representable Numbers, Normal and Subnormal, Infinite -
Trigonometric Functions
Hy po e te t n C i u s se o b a p p O θ A c B Adjacent Math 1060 ~ Trigonometry 4 The Six Trigonometric Functions Learning Objectives In this section you will: • Determine the values of the six trigonometric functions from the coordinates of a point on the Unit Circle. • Learn and apply the reciprocal and quotient identities. • Learn and apply the Generalized Reference Angle Theorem. • Find angles that satisfy trigonometric function equations. The Trigonometric Functions In addition to the sine and cosine functions, there are four more. Trigonometric Functions: y Ex 1: Assume � is in this picture. P(cos(�), sin(�)) Find the six trigonometric functions of �. x 1 1 Ex 2: Determine the tangent values for the first quadrant and each of the quadrant angles on this Unit Circle. Reciprocal and Quotient Identities Ex 3: Find the indicated value, if it exists. a) sec 30º b) csc c) cot (2) d) tan �, where � is any angle coterminal with 270 º. e) cos �, where csc � = -2 and < � < . f) sin �, where tan � = and � is in Q III. 2 Generalized Reference Angle Theorem The values of the trigonometric functions of an angle, if they exist, are the same, up to a sign, as the corresponding trigonometric functions of the reference angle. More specifically, if α is the reference angle for θ, then cos θ = ± cos α, sin θ = ± sin α. The sign, + or –, is determined by the quadrant in which the terminal side of θ lies. Ex 4: Determine the reference angle for each of these. Then state the cosine and sine and tangent of each. -
4.2 – Trigonometric Functions: the Unit Circle
Warm Up Warm Up 1 The hypotenuse of a 45◦ − 45◦ − 90◦ triangle is 1 unit in length. What is the measure of each of the other two sides of the triangle? 2 The hypotenuse of a 30◦ − 60◦ − 90◦ triangle is 1 unit in length. What is the measure of each of the other two sides of the triangle? Pre-Calculus 4.2 { Trig Func: The Unit Circle Mr. Niedert 1 / 27 4.2 { Trigonometric Functions: The Unit Circle Pre-Calculus Mr. Niedert Pre-Calculus 4.2 { Trig Func: The Unit Circle Mr. Niedert 2 / 27 2 Trigonometric Functions 3 Domain and Period of Sine and Cosine 4 Evaluating Trigonometric Functions with a Calculator 4.2 { Trigonometric Functions: The Unit Circle 1 The Unit Circle Pre-Calculus 4.2 { Trig Func: The Unit Circle Mr. Niedert 3 / 27 3 Domain and Period of Sine and Cosine 4 Evaluating Trigonometric Functions with a Calculator 4.2 { Trigonometric Functions: The Unit Circle 1 The Unit Circle 2 Trigonometric Functions Pre-Calculus 4.2 { Trig Func: The Unit Circle Mr. Niedert 3 / 27 4 Evaluating Trigonometric Functions with a Calculator 4.2 { Trigonometric Functions: The Unit Circle 1 The Unit Circle 2 Trigonometric Functions 3 Domain and Period of Sine and Cosine Pre-Calculus 4.2 { Trig Func: The Unit Circle Mr. Niedert 3 / 27 4.2 { Trigonometric Functions: The Unit Circle 1 The Unit Circle 2 Trigonometric Functions 3 Domain and Period of Sine and Cosine 4 Evaluating Trigonometric Functions with a Calculator Pre-Calculus 4.2 { Trig Func: The Unit Circle Mr. -
A Practical Introduction to Python Programming
A Practical Introduction to Python Programming Brian Heinold Department of Mathematics and Computer Science Mount St. Mary’s University ii ©2012 Brian Heinold Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported Li- cense Contents I Basics1 1 Getting Started 3 1.1 Installing Python..............................................3 1.2 IDLE......................................................3 1.3 A first program...............................................4 1.4 Typing things in...............................................5 1.5 Getting input.................................................6 1.6 Printing....................................................6 1.7 Variables...................................................7 1.8 Exercises...................................................9 2 For loops 11 2.1 Examples................................................... 11 2.2 The loop variable.............................................. 13 2.3 The range function............................................ 13 2.4 A Trickier Example............................................. 14 2.5 Exercises................................................... 15 3 Numbers 19 3.1 Integers and Decimal Numbers.................................... 19 3.2 Math Operators............................................... 19 3.3 Order of operations............................................ 21 3.4 Random numbers............................................. 21 3.5 Math functions............................................... 21 3.6 Getting -
The Unit Circle 4.2 TRIGONOMETRIC FUNCTIONS
292 Chapter 4 Trigonometry 4.2 TRIGONOMETRIC FUNCTIONS : T HE UNIT CIRCLE What you should learn The Unit Circle • Identify a unit circle and describe its relationship to real numbers. The two historical perspectives of trigonometry incorporate different methods for • Evaluate trigonometric functions introducing the trigonometric functions. Our first introduction to these functions is using the unit circle. based on the unit circle. • Use the domain and period to Consider the unit circle given by evaluate sine and cosine functions. x2 ϩ y 2 ϭ 1 Unit circle • Use a calculator to evaluate trigonometric functions. as shown in Figure 4.20. Why you should learn it y Trigonometric functions are used to (0, 1) model the movement of an oscillating weight. For instance, in Exercise 60 on page 298, the displacement from equilibrium of an oscillating weight x suspended by a spring is modeled as (− 1, 0) (1, 0) a function of time. (0,− 1) FIGURE 4.20 Imagine that the real number line is wrapped around this circle, with positive numbers corresponding to a counterclockwise wrapping and negative numbers corresponding to a clockwise wrapping, as shown in Figure 4.21. y y t > 0 (x , y ) t t < 0 t θ (1, 0) Richard Megna/Fundamental Photographs x x (1, 0) θ t (x , y ) t FIGURE 4.21 As the real number line is wrapped around the unit circle, each real number t corresponds to a point ͑x, y͒ on the circle. For example, the real number 0 corresponds to the point ͑1, 0 ͒. Moreover, because the unit circle has a circumference of 2, the real number 2 also corresponds to the point ͑1, 0 ͒. -
A Fast-Start Method for Computing the Inverse Tangent
A Fast-Start Method for Computing the Inverse Tangent Peter Markstein Hewlett-Packard Laboratories 1501 Page Mill Road Palo Alto, CA 94062, U.S.A. [email protected] Abstract duction method is handled out-of-loop because its use is rarely required.) In a search for an algorithm to compute atan(x) For short latency, it is often desirable to use many in- which has both low latency and few floating point in- structions. Different sequences may be optimal over var- structions, an interesting variant of familiar trigonom- ious subdomains of the function, and in each subdomain, etry formulas was discovered that allow the start of ar- instruction level parallelism, such as Estrin’s method of gument reduction to commence before any references to polynomial evaluation [3] reduces latency at the cost of tables stored in memory are needed. Low latency makes additional intermediate calculations. the method suitable for a closed subroutine, and few In searching for an inverse tangent algorithm, an un- floating point operations make the method advantageous usual method was discovered that permits a floating for a software-pipelined implementation. point argument reduction computation to begin at the first cycle, without first examining a table of values. While a table is used, the table access is overlapped with 1Introduction most of the argument reduction, helping to contain la- tency. The table is designed to allow a low degree odd Short latency and high throughput are two conflict- polynomial to complete the approximation. A new ap- ing goals in transcendental function evaluation algo- proach to the logarithm routine [1] which motivated this rithm design. -
4.2 Trigonometric Functions: the Unit Circle
4.2 Trigonometric Functions: The Unit Circle The two historical perspectives of trigonometry incorporate different The Unit circle: xy221 2 2 3 1 1 3 Example: Verify the points , , , , , ,(1,0) are on the unit circle. 2 2 2 2 2 2 Imaging that the real number line is wrapped around this circle, with positive numbers corresponding to a counterclockwise wrapping and negative numbers corresponding to a clockwise wrapping, as shown in the following. As the real number line is wrapped around the unit circle, each real number t corresponds to a point (,)xy on the circle. For example, the real number corresponding to (0,1) . 2 Remark: In general, each real number t also corresponds to a central angle (in standard position) whose radian measure is t . With this interpretation of t , the arc length formula sr (with r 1 ) indicates that the real number t is the (directional) length of the arc intercepted by the angle , given in radians. In the following graph, the unit circle has been divided into eight equal arcs, corresponding to t -values 3 5 3 7 of 0, , , , , , , ,2 4 2 4 4 2 4 Similarly, in the following graph, the unit circle has been divided into 12 equal arcs, corresponding to t 2 5 7 4 3 5 11 values of 0,,,, , ,, , , , , ,2 6 3 2 3 6 6 3 2 3 6 The Trigonometric Functions. From the preceding discussion, it follows that the coordinates x and y are two functions of the real variable t . You can use these coordinates to define the six trigonometric functions of t . -
Appendix a Mathematical Fundamentals
Appendix A Mathematical Fundamentals In this book, it is assumed that the reader has familiarity with the mathematical definitions from the areas of Linear Algebra, Trigonometry, and other related areas. Some of them that are introduced in this Appendix to make the reader quickly understand the derivations and notations used in different chapters of this book. A.1 Function ‘Atan2’ The usual inverse tangent function denoted by Atan(z), where z=y/x, returns an angle in the range (-π/2, π/2). In order to express the full range of angles it is useful to define the so called two- argument arctangent function denoted by Atan2(y,x), which returns angle in the entire range, i.e., (- π, π). This function is defined for all (x,y)≠0, and equals the unique angle θ such that x y cosθ = , and sinθ = …(A.1) x 2 + y 2 x 2 + y 2 The function uses the signs of x and y to select the appropriate quadrant for the angle θ, as explained in Table A.1. Table A.1 Evaluation of ‘Atan2’ function x Atan2(y,x) +ve Atan(z) 0 Sgn(y) π/2 -ve Atan(z)+ Sgn(y) π In Table A.1, z=y/x, and Sgn(.) denotes the usual sign function, i.e., its value is -1, 0, or 1 depending on the positive, zero, and negative values of y, respectively. However, if both x and y are zeros, ‘Atan2’ is undefined. Now, using the table, Atan2(-1,1)= -π/4 and Atan2(1,-1)= 3π/4, whereas the Atan(-1) returns -π/4 in both the cases.