Talk:Trigonometric functions/Archive 2

Dave Barry and "The Cosine"
I think maybe a reference should be made about References in Popular Culture. Dave Barry frequently jokes about not understanding things in school such as "the cosine" (http://www.miami.com/mld/miamiherald/living/columnists/dave_barry/14530054.htm). —Preceding unsigned comment added by Ernieba1 (talk • contribs)

General maintenance
Instead of getting real work done today, I effected general repairs and upgrades on this article. Hopefully, all of the following constitute improvements: Anville 18:45, 12 June 2006 (UTC)
 * The referencing style is now uniform, with pseudo-Harvard style parentheticals and inline hyperlinks now all changed to cite.php footnotes.
 * Additional footnotes have been sprinkled throughout. The "History" section still needs some work in this regard, but it's not a horrendous affront to modern FA standards anymore.
 * The lead now has a picture. I hope nobody minds repeating the same image; to me, it makes the hefty table at the beginning much more digestible.
 * Big lists of formulas which made even my eyes glaze over have been moved to the appropriate sub-articles.


 * Looks good. Thanks a lot. -- Jitse Niesen (talk) 02:59, 14 June 2006 (UTC)


 * You're welcome. Anville 18:22, 14 June 2006 (UTC)

I forgot to mention one thing. During my cleanup job, I snipped the following blurb:

Theorem: There exists exactly one pair of real functions s, c with the following properties:

For any $$x, y \in\mathbb{R}$$:



s(x)^2 + c(x)^2 = 1,\, $$


 * $$s(x+y) = s(x)c(y) + c(x)s(y),\,$$


 * $$c(x+y) = c(x)c(y) - s(x)s(y),\,$$


 * $$0 < xc(x) < s(x) < x\ \mathrm{for}\ 0 < x < 1.$$

This fragment of mathematical discourse had a section all to itself, obfuscatingly titled "Other definitions". One could probably smuggle it back into the article, if one provided a better sense of the context (e.g., "From the standpoint of real analysis. . .") and a citation to a source giving the theorem's proof. Wikipedia is an encyclopedia, after all, not a Burroughs cut-up of math textbooks. Anville 16:22, 13 June 2006 (UTC)

Functional equations
The theorem above defines the Sine and Cosine as solutions of functional equations, it belongs to the functional analysis. There are more definitions of this kind, the one I learned in my mathematical analysis class used the difference formulas and that sin'(0)=1. These equations allow/require proving other properties of sin and cos instead of assuming them.

Maybe, there could just be a sentence in the intro that e.g. "They also can be defined as solutions of certain functional equations," but this is the same wording as with differential equations... --Marvin 14:32, 20 June 2006 (UTC)


 * How about something like this: "In functional analysis, one can define the trigonometric functions using functional equations based on properties like the sum and difference formulas.  Taking as given these formulas and the Pythagorean identity, for example, one can prove that only two real functions satisfy those conditions.  Symbolically, we say that there exists exactly one pair of real functions s and c such that for all real numbers x and y, the following equations hold:

s(x)^2 + c(x)^2 = 1,\, $$
 * $$s(x+y) = s(x)c(y) + c(x)s(y),\,$$
 * $$c(x+y) = c(x)c(y) - s(x)s(y),\,$$
 * with the added condition that
 * $$0 < xc(x) < s(x) < x\ \mathrm{for}\ 0 < x < 1.$$
 * Other derivations, starting from other functional equations, are also possible."
 * Meh. I need to think about this one a little more.  The next time I'm in the vicinity of a good functional analysis book, I'll try looking it up.  Anville 19:55, 22 June 2006 (UTC)


 * Maybe it was an inconsiderate statement (my statement) about the functional analysis. Functional equations belong there, but I am not sure everything that uses them would be said to belong there too. We did it in 'mathematical analysis' class and we didn't differentiate these branches much.
 * I'll write here 'my' version of the conditions, I didn't explain it exactly before (the last one). But I don't really care which one will be in the article:
 * $$\mathrm{c}(x-y)= \mathrm{s}(x) \mathrm{s}(y) + \mathrm{c}(x) \mathrm{c}(y) $$
 * $$\mathrm{s}(x-y)= \mathrm{s}(x) \mathrm{c}(y) - \mathrm{c}(x) \mathrm{s}(y) $$
 * $$\lim_{x \to 0} \frac{\mathrm{s}(x)}{x} = 1$$
 * It also can be extended over the complex numbers. x,y∈ℝ can be changed to z,w∈ℂ and everything goes well, so I wouldn't say real functions. I still have the proof in my notebook, but it would be too long to include in the article and it's out of its focus I think. And it's just notes from the class.
 * I like the text you wrote, maybe with the exception of functional analysis (sorry) and real functions. --Marvin talk 13:42, 23 June 2006 (UTC)
 * I wouldn't say I don't like the functional analysis there, I just fear it could prove wrong. --Marvin talk 13:45, 23 June 2006 (UTC)


 * Well, we don't talk about Hilbert spaces, operator algebras or Lebesgue-measurable functions, so maybe we should just say "mathematical analysis". Anville 14:25, 23 June 2006 (UTC)


 * I think mathematical analysis would be ok. And just function instead of real function. The extension to complexes might be mentioned (though I'm not sure if the first one also allows it), that can be done by including functional equations among the "more modern definitions allowing extension to complex numbers". --Marvin talk 17:40, 23 June 2006 (UTC)

Plot of Arcsin
The new plot of arcsin looks a bit weird, the function has two values at the ends according to the plot. --Marvin talk 17:55, 1 July 2006 (UTC)


 * Not to mention that it is plotted with real values for arguments > 1! The plot author apparently was under the mistaken impression that arcsin is a periodic function of its argument??  —Steven G. Johnson 18:46, 1 July 2006 (UTC)


 * I've removed the link to Image:Sin asin.svg from the article, due to the error in the arcsine plot. —Steven G. Johnson 02:52, 2 July 2006 (UTC)


 * I also looked at this, but I got a little confused when thinking about complex numbers. (But even if it showed real part of the value (complex), it would look quite different.) --Marvin talk 12:23, 2 July 2006 (UTC)
 * [[Image:Sin asin.svg|300px|right|thumb]]So is better? I think asin is a periodic plot not function. Look "The trigonometric functions are periodic, so we must restrict their domains before we are able to define a unique inverse. In the following, the functions on the left are defined by the equation on the right; these are not proved identities" --Jaro.p 15:56, 3 July 2006 (UTC)
 * The revised plot, with only one "copy" of asin, is no longer grossly incorrect. (Your defense that it was a "periodic plot" is nonsensical.)  (Regarding Marvin's comment, it is debatable whether to plot it as multivalued.)    Honestly, though, I don't really see the point of this plot&mdash;we already have plots of sine and cosine, and the inverse functions are obviously just that plot with the axes swapped.  —Steven G. Johnson 17:33, 3 July 2006 (UTC)


 * Yes, now it isn't incorrect. The inverse sine is really multivalued, but I am more inclined to plot a single-valued function, i.e. to choose an interval where sine is one-to-one and restrict its domain (commonly [-π/2,π/2]).
 * Now, as I look at it again... shouldn't the leftmost and rightmost points of the arcsin plot be reached at y= ±π/2 ≈ ±1.55 ? The plot does it at ≈±1.3 . Sorry for hairsplitting... --Marvin talk 00:25, 21 July 2006 (UTC)

Unclear variables
 What's U? What's B? --149.4.105.19 16:16, 18 September 2006 (UTC)

I mean, it should be stated sooner, or made clear that it will be below.

Sine?
Who knows why sine and cosecent are recipricals and not sine and secent? e-mail me if you do at ghostoftomjoad25@yahoo.com Thanks

-

Computing trigonometric functions
Someone somewhere ought to mention that one common way to compute these functions is by first compute sin(x) and cos(x) which is conveniently computed in parallell if you want both and if you then want to compute tan(x) you do so by dividing sin(x) / cos(x). However, for the inverse functions it is typically easier to start with arctan(x) and then compute arcsin(x) and arccos(x) from arctan(x). Also, we should mention the role of arctan2(x,y) and why computers often have this as a separate function and what it does and the role it plays in co-ordinate transformations between cartesian and polar co-ordinates or in computing logarithm or exponentials of complex numbers. Somewhere should also be mentioned the hyperbolic functions and a reference to them and how they relate to the trignometric functions. I didn't see those mentioned or linked to anywhere on this page and I feel they are appropriate to mention along with the trigonometric functions although perhaps the best would be just a short mention of them and a refernece to a separate page with the details. Such a page on hyperbolic functions should of course also reference back to this trigonometric functions page. I see sinh(x) etc is mentioned briefly but there is no explanation of them or reference to page for hyperbolic functions.

Another issue when talking about computing values is of course liberal use of identities so as to make the argument x as small as possible because doing any series.

Thus, when computing sin(x) the first step usually involved division by 2*pi (actually - division by pi/4 is even better - see below) and ignoring the integer result and only look at the remainder.

Further, you can then divide by pi/2 and find which quadrant the number belongs to and then use identities to find the actual values. You will typicaly combine these steps by dividing by pi/2 and instead of ignoring the quotient look at the two lower bits of the quotient to find the quadrant and ignoring any higher bits). However, you can do even better. By dividing the angle with pi/4 you can find the octant and then use identities involving cos(pi/4) = sin(pi/4) = 1/sqrt(2).

This ensures that the resulting z is in the range 0 <= z < pi/4 or -pi/4 <= z < pi/4 or some such (depending on what you find convenient) and then compute either sin(x) or cos(x) as some simple linear formula based on sin(z) and cos(z). This is also why cos(x) is easy to compute along with sin(x) and vice versa since they both involve sin(z) and cos(z) and are simple linear formula based on cos(z) and sin(z).

salte 13:35, 1 December 2006 (UTC)

I suggest adding the following under the computation section.

To compute the trigonometric functions it is often best to start with sin(x) and cos(x). Moreover, it is usually best to compute both of these in parallell for reasons that will become clear below.

All other trigonometric functions can be computed once you have those two. For the inverse functions a description will follow below.

First step is to divide x by $$\frac{\pi}4$$ and split it into an integer quotient q and a fractional part z such that $$0 <= z < \frac{\pi}4$$.

We ignore all bits except the three least significant bits of q as they indicate which octant the original angle x is to be found in. The higher bits only indicate which full turn of a circle and is useless for computation of sin(x) and cos(x).

The computation can then be summarized in the following table.

For the above 8 cases, one can easily compute sin(x) and cos(x) given sin(z) and cos(z).

As $$>0 <= z < \frac{\pi}4$$ z is conveniently small enough that the series can be used.

tan(x) is then easily computed as sin(x) / cos(x) - the others likewise.

For complex arguments it is probably best to first define exp(z) for a complex z and then compute sin(z) and cos(z) using Euler's formulae. exp(z) for a complex z can be defined by first converting z to polar co-ordinates and then compute $$\exp(z) = \exp(r)\cos(\theta) + i\exp(r)\sin(\theta)$$.

For a complex value z = x + yi, the polar co-ordinates are $$r = sqrt(x^2 + y^2)$$ $$\theta = arctan2(y,x)$$ (see below for arctan2).

For the inverse functions, it is best to start with arctan(x). This function also have a series which can be developed as follows:

First, if arctan(x) = y it follows that tan(y) = x = sin(y)/cos(y) or $$\sin(y) = x\cos(y)$$.

Derivating with respect to x on both sides gives us:

$$\cos(y)y' = \cos(y) + x(-\sin(y)y') = \cos(y) - x\sin(y)y'$$

Dividing by $$\cos(y)$$ on both sides gives: $$y' = 1 - x\tan(y)y'$$ or $$y' + x\tan(y)y' = 1$$

However, $$\tan(y) = x$$ so this means:

$$y' (1 + x^2) = 1$$

or

$$y' = \frac{1}{1 + x^2}$$

A series for 1/(1 + x^2) can be found by setting -x^2 for x in 1/(1-x) = 1 + x + x^2 + x^3... so we get:

$$y' = 1 - x^2 + x^4 - x^6 + x^8...$$

and integrating on both sides gives us:

$$y = arctan(x) = C + x - \frac13x^3 + \frac15x^5 - \frac17x^7...$$

The constant C is easily determined to be 0 since arctan(0) = 0 since tan(0) = 0.

For polar co-ordinate transformations and for complex numbers it is often useful to have a version of arctan(x) that takes the two arguments separately. This is because a fraction y/x = (-y)/(-x) and so while the angle within $$2\pi$$ is determined given y and x separately, the information is lost when considering the fraction. I.e. the fraction only gives the angle in the range $$0 <= \alpha < \pi$$ and that gives two possible points (x,y) or (-x,-y) both of which has the same fraction.

The implementation of arctan2(y,x) is easy though once we have arctan(z) as indicated above.

First, take the special cases that lead to infinity out of the way. If y = 0 the arctan2(0,x) function should return 0 if x equals 0 and $$\frac{\pi}2$$ if x is positive and $$-\frac{\pi}2$$ (or alternatively $$\frac{3\pi}2$$) if x is negative.

Then compute z = y/x and compute arctan(z) and then adjust the result depending on the signs of x and y.

If x and y are both positive the value of $$\theta$$ should fall in the range $$0 <= \theta < \frac{\pi}2$$, if y is positive and x is negative the value should fall in the range $$\frac{\pi}2 <= \theta < \pi$$. If y is negative and x is positive the value should either be in the range $$-\pi < \theta <= -\frac{\pi}2$$ or $$\pi < \theta <= \frac{3\pi}2$$. If both x and y are negative, the resulting value of $$\theta$$ should fall in the range $$-\frac{\pi}2 < \theta <= 0$$ or $$\frac{3\pi}2 <= \theta < 2\pi$$.

Computation of arcsin(x) and arccos(x) can be found once we know arctan(x) as follows:

if arczin(x) = y then x = sin(y) and since $$\sin^2(y) + \cos^2(y) = 1$$ we must have that

$$\cos(y) = \sqrt{1 - sin^2(y)}$$ and we get:

$$\sin(y) = x$$ and $$\cos(y) = \sqrt{1 - sin^2(y)}$$

Putting these together we get that:

$$\tan(y) = \frac{\sin(y)}{\cos(y)} = \frac{x}{\sqrt{1 - x^2}}$$

Hence, if y = arcsin(x) then we have:

$$ \arcsin(x) = \arctan\frac{x}{\sqrt{1 - x^2}}$$

Similar for arccos(x):

$$\arccos(x) = \arctan\frac\sqrt{1 - x^2}x$$

salte 14:50, 4 December 2006 (UTC)

Added more on how to compute sin(x) etc
Added in a description on how to compute sin(x), cos(x), tan(x), arctan(x), arctan2(y,x), arccos(x) and arcsin(x).

salte 13:38, 8 December 2006 (UTC)


 * I reverted your (rather verbose) additions. First, a detailed discussion on this level is not appropriate for a general article of this sort.  Notice that we already have a short section on "computation" that references practical methods.  Second, it seems to me that most of your discussion has little to do with practical computation.  As far as I can tell, nobody just uses the Taylor expansion around x=0, at least not in a practical context.  You spend a lot of time on trig identities to reduce the angles to to a limited range, but these are already mentioned and in fact we have a whole article on the trig identities; we don't need a table on this here.  Note also that functions to compute sin and cosine simultaneously are not standardized by POSIX or ANSI/ISO, and in any case this isn't the appropriate article to give programming advice.   —Steven G. Johnson 00:08, 9 December 2006 (UTC)


 * Note also that we already have articles on hyperbolic functions and on atan2.

I think if you look into interpolations done from table entries you will find they are exactly taylor series around 0. Computing sin(x) if you have a table entry for u near x where h = x - u is the difference between x and u you can compute sin(x) by:

sin(x) = sin(u + h) = sin(u)cos(h) + cos(u)sin(h)

sin(u) and cos(u) are found by looking in the table and sin(h) and cos(h) are found by a taylor series expansion around 0. Further, cos(x) is found as:

cos(x) = cos(u + h) = cos(u)cos(h) - sin(u)sin(h)

and is making use of exactly the same values just combined in a slightly different manner. Thus, computing sin(x) require you to find 4 numbers which when you know them also allow you to compute cos(x). It is therefore simply a good idea to check for if the library you use do provide a function that compute both simultaneously since that allow you to save computing those 4 numbers twice and doing the same job over again - once for sin(x) and then computing the exact same numbers to compute cos(x). It is also worth noting that the common situation is that you need to compute cos(x) if you just computed sin(x), it is a rare occation that you only need one of these two. Examples: Computing tan(x) require you to compute both, computing cartesian co-ordinates form polar co-ordinates require you compute both, generating a table of sine and cosine require you to compute both and therefore it is much smarter to generate both those tables in parallell rather than computing them seprately and independently. Further since sin(x) = cos(pi/2 - x) it is actually smarter to only compute both tables half-full and then fill out the missing entries from the other table in reverse order.

salte 02:29, 10 December 2006 (UTC)

Notation inconsistancy: log
I propose that "log" be used for general discussion of properties of logarithm functions and not refer specifically to the "ln" or natural logarithm function. "ln" is "log to base e". Sometimes "log" is used to mean "log to base 10".

Consequently the definitions for arccos, arcsin etc. of a complex number 'z' should use "ln" instead of "log".

Further looking around at the articles sees the justification for "log" when dealing with complex numbers, it is just that I am used to "ln".

It can be left as is but please fix the link to "complex logarithm": it is broken into two parts neither of which points to the article "complex logarithm".

Mike 00:59, 9 January 2007 (UTC)


 * I'm confused, is it $$\ln$$, $$\log_i$$ or is it $$\log$$?
 * It seems to me that this is'nt a complex logarithm at all, just a natural one.

sine function
i need to know what d represents when y=a sin(k(x+d)+c. Does anyone know?--AeomMai 21:58, 17 January 2007 (UTC)

The Sulba Sutras
I am removing an unsourced claim in the history section about the Sulba Sutras containing trigonometric functions. There is no evidence of this. Since the claim was made in other WP pages as well, I decided to probe it more and realized that the source provided was G. G. Joseph's book The Crest of the Peacock: The Non-European Roots of Mathematics (p. 232). However what is provided in Joseph's book is a modern-day proof of some results stated in the Sulba sutras, and that proof uses $$\sin \theta$$, (and that too a little redundantly since the angle is 45 degrees and he is really talking about the diagonal of a square). There is no indication in Joseph's book anywhere that sine, cosine, or anything resembling trigonometric functions are mentioned in the Sulbasutras. What is mentioned is the following line in Sankrit verse: "Divide the diameter of a circle into 15 equal part and take 13 of them to be the side of the square," (for "squaring the circle"). The Sulbasutras say that and nothing else (and no indication is given of how the result was discovered.) That is not evidence for knowledge of trigonometric functions. Fowler&amp;fowler «Talk»  14:09, 22 February 2007 (UTC)

I was about to suggest OR violation as are apparent by constant vandalism you have caused in Indian mathematics related articles but then "The whole of Indian geometry and trignometry is dominated by the theorum of the suqare and the diagonal." (Geometry in Ancient and Mediaeval India By T.A. Sarasvati Amma page 58).

I would appreciate it if you did not damage featured articles.

Freedom skies 03:18, 23 February 2007 (UTC)


 * Yes? But what does your quote have to do with the Sulba Sutras? There was a lot of great trigonometry in India in the first millennium CE. However, in the Sulba Sutras, no trigonometry is present.  There was knowledge of Pythagoras's Theorem, but no trigonometry.  Computing the ratio of the side of a square to its diagonal doesn't mean that you have also computed $$\sin(\frac{\pi}{4})$$ and therefore you know about trigonometric functions!   Fowler&amp;fowler  «Talk»  09:46, 24 February 2007 (UTC)


 * I have removed the sentence "The name of sine appears in the Sulba Sutras written in ancient India from the 8th century BC to the 6th century BC." This sentences is firstly unsourced. Secondly it goes against another established source which I will now cite.
 * I will also remove the same sentence from History of trigonometric functions. selfworm - just downgraded to version 0.4B! 02:21, 4 March 2007 (UTC)
 * I will also remove the same sentence from History of trigonometric functions. selfworm - just downgraded to version 0.4B! 02:21, 4 March 2007 (UTC)

double angle formulas
In the article it talks about the double angle formulas were in the case sin(a+b) or cos(a+b) or tan(a+b)that a=b; however, it states that there is a double angle formula without giving a link or stating what it is. I think we should add it. sin(2a)=2sin(a)cos(a) cos(2a)=cos2(a)-sin2(a) or derived into cos(2a)=2cos2a-1 or also cos(2a)=1-2sin2 tan(2a)=(2tan)/(1-tan2 —The preceding unsigned comment was added by 67.162.9.20 (talk) 02:09, 2 March 2007 (UTC).

Right Triangle Conventions
It is common knowledge that


 * Points are written in capitals A, B, C
 * Sides are written in small letters a, b, c
 * Angles are written in Greek letters α, β, γ

Can somebody change the graph(s) and formulae accordingly?

I know how do it myself, but I guess it would have to be approved by someone.

Fak119 07:32, 28 April 2007 (UTC)

That would actually be more of convention than definition, and I would agree to changing notation to current convention. Obscurans 13:21, 28 April 2007 (UTC)

Complex Numbers
Should'nt there be a section on how to calculate for an example cos(a+bi) or something of the like? T.Stokke 18:34, 26 May 2007 (UTC)


 * See the section called "Relationship to exponential function and complex numbers". Fredrik Johansson 19:07, 26 May 2007 (UTC)


 * Yes but I think we should add explicit formulaes for sine, cosine, tangent and cotangent of a full complex number. Although this article contains all the information needed to create the formula, I think we should just have some simple formulaes written there. T.Stokke 16:49, 9 June 2007 (UTC)

The Trig Hand JPEG is a bad link. It challenges and scolds when you click on it, evidently as a reaction to an attempted upload.

When I accessed the article I was looking for

tan A = y/x type definitions

I believe the trig circle ought to be superimposed on coordinate axes and/or at least the definitions added in terms of x and y values. The whole point is to make the concepts mesh better with analytic geometry and calculus, where coordinate axes rule. translator 19:05, 13 July 2007 (UTC)

Cosecant
How come SineBot doesn't have a counterpart that puts all silly posts under the hood. CosecantBot, come hither! —Preceding unsigned comment added by 69.143.236.33 (talk) 08:22, 8 October 2007 (UTC)

Mnemonics
User:RobertG removed the mnemonics sections today, with the edit summary that "Wikipedia is not a text book, nor a how-to guide". I feel that the mnemonics are a notable part of the culture associated with trigonometric functions, and that this section belongs in this article. Could I hear opinions on this from some other editors? Thanks. Doctormatt 16:31, 10 October 2007 (UTC)

Graphs
There are three semi-redudant graphs in the "Unit-circle definitions". The sin+cos and tan graphs are the most readable, and are preferable because they show the critical points in terms of pi, instead of just using integer labels. They also are more explicit about showing the x and y axes, and the functions producing the graphs. It would be possible and I think desirable to consolidate all 3 of these graphs onto a single improved one. -- Beland 20:07, 13 November 2007 (UTC)

Assessment comment
Substituted at 20:13, 26 September 2016 (UTC)