From: kovarik@mcmail.cis.McMaster.CA (Zdislav V. Kovarik) Subject: Re: Let's talk about secs (was: A call for curious trigonometric tidbits...) Date: 9 Jul 1999 17:13:28 -0400 Newsgroups: sci.math Keywords: unusual elliptic transformation [My other tidbit comes later on in the reply, but first the calculation example:] In article <37863956.84825@news.globalnet.co.uk>, Andy Spragg wrote: [...] :On the subject of Spivak and his fantastic book, who can forget his :quote, in the context of evaluating integrals by changing variable, :that "...the world's sneakiest substitution is undoubtedly t = :tan(x/2)...", which claim he then backs up with a variety of :astonishing feats of integration. I had reason to recall this equation :recently when I was amazed to find it cropping up in a completely :different context. I was messing around with a geometrical problem and :was led to have to solve the equation: : :x.sin(x) + cos(x) = 1 : [ Here I offer a shortcut: ] x * sin(x) = 1 - cos(x) When can I divide by sin(x)? If x is an odd multiple of pi then it is not a solution (LHS=0, RHS=2). If x is an even multiple of pi, we have a solution (a boring one at that). Other than that, sin(x) is not 0, so x = (1 - cos(x)) / sin(x) x = 2 * (sin(x/2))^2 / (2 * sin(x/2) * cos(x/2)) x = tan(x/2) and for a full set of real "non-boring" solutions, x = (2*k*pi) + 2 * arctan(x) where k is an integer. It is true that the right side is contractive near the non-zero solutions, so that iterations converge, as noted: [...] : :The best way to solve this is by iteration on the rearranged form: : :x = 2.atan(x) : :which converges like buggery no matter where you start from, ... including from x=0 (couldn't resist...:-)= :and the principal value is: : :x = 2.331 122 370 414 ... : [...] Now more on tan(x/2): Contrary to traditions of story-telling, I will give the punchline first: There is a transformation, useful in the study of elliptical orbits (and astronomers will know the traditional names of the angles involved): With a parameter q strictly between -1 and 1, define y = x - 2 * arctan (q * sin(x) / (1 + q * cos(x))) The amazing fact (to me) is the formula expressing x in terms of y: x = y + 2 * arctan (q * sin(y) / (1 - q * cos(y))) (a neat exercise: note that the inverse is obtained when you replace q with (-q)). The transformation x -> y is continuous (real analytic at that) on the whole real line. Its derivative is dy/dx = (1 - q^2) / (1 + q^2 + 2 * q * cos(x)) and if you play with change of parameter: 2 * q / (1 + q^2) = eps where q = eps / (1 + sqrt(1 - eps^2)) (yes, eps is the relative excentricity of a suitable ellipse!) then dy/dx = sqrt(1 - eps^2) / (1 + eps * cos(x)) This gives an indefinite integral Int (1 + eps * cos(x)) dx = (1 - eps^2)^(-1/2) * (x - arctan(q * sin(x) / (1 + q * cos(x)))) + const. Now I confess there are more punchlines: If you use tan(x/2) = t in the above integration problem, you obtain Int (1 + eps * cos(x)) dx = 2 * (1-eps^2)^(-1/2) * arctan (r * tan(x/2)) + const where r = sqrt((1-eps)/(1+eps)). Ouch! The answer is undefined at certain multiples of pi, and will have jumps no matter how it is extended. That's not what a differentiable function is supposed to do. Well, between -pi and pi, this solution and "my" solution (not really mine, it's centuries old, unlike myself) are the same (for suitable const). It is a nice exercise to show it without integral calculus. And the relationship between eps and q (punchline #3): Suppose eps = sin(alpha), then q = tan(alpha/2). Have fun, ZVK(Slavek).