Not homework: just the ongoing process of an old guy trying to get his head around high school math.
I’m guessing I’m going to need the headslap smilie, but here goes. What the heck is sin(xy)? I can find sin (2x) (2sinxcosx), but that appears to apply only to 2x. Or is sin (3x) = 3 sinx cosx? It looks like not.
Usually, everything gets much easier when you apply Euler’s formulae to trig stuff. sin (xy) = (exp (ixy) - exp(-ixy)) / 2i . Whatever your problem is, work from there.
Past edit window: You can, of course, make a series expansion of your formula in any of the two variables, and around any given point. Are you into Taylor/MacLaurin series?
If you’re thinking of x and y as both angles, it rarely makes sense to multiply them, so you won’t find a useful formula for sin(xy) in terms of, say, sin(x) and sin(y).
However, you may instead be thinking of x as an angle, and y as a scaling factor, and hoping to find a formula for sin(xy) in terms of sin(x) and y. You’ve seen the y = 2 case of this already, and indeed, we can do this in general.
The general principle is that the function rot[sup]x[/sup] = cos(x) + i * sin(x), which represents rotation by the angle x, is exponential, in that it turns addition of inputs into multiplication of outputs. [i here represents a 90 degree rotation, and thus has the property that i * i = -1, corresponding to the fact that two 90 degree rotations in a row is a 180 degree rotation, turning any direction into its opposite].
So rot[sup]a + b[/sup] = rot[sup]a[/sup] * rot[sup]b[/sup], which is to say, cos(a + b) + i * sin(a + b) = (cos(a) + i * sin(a)) * (cos(b) + i * sin(b)), which, when you expand it out, = cos(a) * cos(b) - sin(a) * sin(b) + i * (cos(a) * sin(b) + cos(b) * sin(a)). Equating the “imaginary” and “real” parts (terrible names for the parts multiplied by i, and not multiplied by i, respectively), you get the addition laws for cosine and sine.
In the same way, rot[sup]x * y[/sup] = (rot[sup]x[/sup])[sup]y[/sup], which is to say, cos(x * y) + i * sin(x * y) = (cos(x) + i * sin(x))[sup]y[/sup]. If you pick any particular value of y, you’ll be able to expand out the right-hand side (by the binomial theorem, if you like), and get the corresponding formula.
Depending on why you need to know this, you can also just multiply the numbers first and then take the sine. Sometimes what you’re starting with is already the simplest form. Or possibly not, especially since “simplest” is subjective and can depend on the context.
Thank you all! I’m relieved in a way to see that it is indeed very complicated and I didn’t overlook something really obvious. (And as a SDMB bonus, I got to find out what i means, and it isn’t as mystifying as I thought!)
The genesis of the question was I was trying to work out on my own the old method of approximating pi using the perimeters of polygons inside the unit circle. (Yes, yes, I know this was solved by the Greeks (Archimedes?) a long time ago.)
So I got this far (where x = the number of sides of the polygon)
(sin(360/x)/cos (360/x))*x approximately equals pi/2. (So a 360-gon works out to (sin(1)/cos(1))*360= 6.283823/2=3.141911. Not bad. I put the formula into an excel spreadsheet to see how long it would take the approximation to get to 3.14159 (the numbers of digits of pi that I remember). I got tired of scrolling and still wasn’t there.
So I figured if I could work out this equation, I’d be able to figure out the polygon that would give me the answer:
(sin(360/x)/cos(360/x))*x=6.28318. Then I hit the wall, b/c I don’t know how to deal with the x’s in the denominators. So I figured if there was some easy rule for calculating sin(360/x) and cos(360/x), I could do it.
I’m afraid it looks like it’s beyond me, given that we’ve gotten into much more complex math. So any one of youse guys want to show me the next steps?
A) Note that (sin(360°/x)/cos (360°/x))*x = 6.28318 can’t be solved straight-up, because (sin(360°/x)/cos (360°/x))*x (the length of an x-gon circumscribing a unit radius circle) provides an over-estimate of 2π, and 6.28318 is an underestimate of 2π. But what you’re really interested in is the first point where the estimated digits of π start 3.14159; that is, where the estimate of π dips below 3.14160, or in other words, where the estimate of 2π dips below 6.28320. This we can do.
B) It’s easy to get rid of the x’s in the denominators, should one prefer to do so. Let y = 360°/x (note that, conversely, x = 360°/y). We can rewrite the equation as sin(y)/cos(y) * 360°/y = 6.2832. Now there’s nothing fancy in the sines and cosines, just the straight-up variable y. And once we solve for y, we can readily get x from it.
C) For what it’s worth, if your goal is to find the exact numerical solution to this equation by hand, we can walk you through how to do that, but it’s an extremely tedious calculation, exactly the sort of thing computers were designed to do for us. Is learning how computers carry out their computations of sine and cosine and their inverses and so on the sort of thing you’re interested in?
Alternatively, are you interested in finding a means of quickly approximating the exact solution to this equation by hand, then testing around your approximation with a calculator to find the polygon size you are interested in? We can help you with that too, of course.
Or do you just want the answer? In that case, the exact solution to (sin(360°/x)/cos (360°/x))*x = 6.2382 has x between 2372 and 2373, so that you’ll need at least a 2373-gon to approximate π to your desired level of sharpness in this manner.
Thank you! I’m going to digest this but don’t have time to work through it until this evening. But I’ve learned so much from both this and your previous detailed post.
Preemptively answering questions perhaps no one is actually asking:
If you’re stuck in a jail cell with nothing better to do, here’s how you might go about it:
To start off, I’ll invoke two basic approximations: cos(x radians) ~= 1 - x[sup]2[/sup]/2 and sin(x radians) ~= x - x[sup]3[/sup]/6 for small x.
I’ll pull these out of the air as magic for now, but the general theory of how to construct such approximations is the launching-off point of calculus. [Well, the first terms are straightforward: cos(x radians) ~= cos(0) = 1, while the circumscribing polygon calculation we’ve been discussing tells us sin(x radians)/cos(x radians) * 360°/(x radians) ~- 2π, which means sin(x radians) ~= x * cos(x radians) ~= x. But the higher-degree terms I’ll leave for now unexplained.]
One other, more basic, approximation which is frequently useful is (1 + x) * (1 + y) ~= 1 + (x + y). [Just expand it out and ignore the degree 2 term]. Similarly, (1 + x) / (1 + y) ~= 1 + (x - y).
So what? Well, consider sin(y)/cos(y) * 360°/y, which we are trying to get to equal 2 * 3.14160 = 6.2832. For convenience, let’s work in radians, and try to get sin(y radians)/cos(y radians) * 360°/(y radians) = sin(y radians)/[y * cos(y radians)] * 2π to equal 6.2832, or in other words, get sin(y radians)/[y * cos(y radians)] = 6.2832/2π = 3.14160/π.
What does sin(y radians)/[y * cos(y radians)] act like for small y? By the above, this is approximately (y - y[sup]3[/sup]/6)/[y * (y - y[sup]2[/sup]/2)] = (1 - y[sup]2[/sup]/6)/(1 - y[sup]2[/sup]/2) ~= 1 - y[sup]2[/sup](-1/6 + 1/2) = 1 + y[sup]2[/sup]/3.
So what we’re looking for is approximately the solution to 1 + y[sup]2[/sup]/3 = 6.2832/2π = 3.14160/π.
Next, let’s approximate 3.14160/π. Here, it helps to know one more digit of π: π ~= 3.141592. So 3.14160 ~= π + 8 * 10[sup]-6[/sup], and thus 3.14160/π ~= 1 + 8/π * 10[sup]-6[/sup].
Setting this last quantity equal to 1 + y[sup]2[/sup]/3, we get y[sup]2[/sup] = 3 * 8/π * 10[sup]-6[/sup]. As π ~= 3, we can cancel out those two factors; also, for ease of square rooting, let’s nudge the 8 into a 9. [Approximations on top of approximations…]. Having done that, we approximate y as sqrt(9) * 10[sup]-6/2[/sup] = 3 * 10[sup]-3[/sup].
Finally, to turn this back into the number of sides of a polygon, we ask how many times y radians goes into 360° = 2π radians. Well, that be 2π/(3 * 10[sup]-3[/sup]) = 2π/3 * 10[sup]3[/sup]. Again approximating π as 3 to cancel both out, we end up with an estimated minimum polygon size of “about 2000”.
As noted before, the actual minimum polygon size is 2373. So… not too shabby, considering the circumstances.
(Also, as a minor note: if you were actually trying to calculate π this way, inscribing polygons as well for the lower bounds, then 2373 wouldn’t be quite enough sides on the inscribed polygon to be sure of the “9” digit (sin(1/2373 revolutions) * 2373/2 = 3.14158898…). You’d have to go up to 2374 sides on the inscribed polygon before your lower and upper bounds together convinced you that the digits of π started “3.14159”. Of course, when Archimedes did this, he had no particular interest in base 10 digits, as such.)