Wikipedia:Reference desk/Archives/Mathematics/2006 August 23

From Wikipedia, the free encyclopedia
< August 22 Mathematics desk archive August 24 >
Humanities Science Mathematics Computing/IT Language Miscellaneous Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions at one of the pages linked to above.


Solving an equation[edit]

How do I solve this?

(Please sign your posts using "~~~~".) One solution is obvious (it's a small integer). The challenge is to decide if it is unique (over the real numbers or complex numbers), and to show how it might be found other than by "inspection". Think of the task as finding any zero-crossings of 2x+x−6. Over the reals, explore the "shape" of the function; especially, is it monotonic? (Consider its terms, or plot it.) Since it is continuous, we should try to bracket a zero. For example, x = 0 gives −5, while x = 5 gives 31; the function must cross zero somewhere between. Since it is differentiable, we can search for that zero using Newton's method. If we want to get more sophisticated, we can approach solution using Lambert's W function.
This is not a question that is likely to arise "in the wild"; where did it come from? --KSmrqT 09:28, 23 August 2006 (UTC)[reply]

In general, how shall I solve this type of equations?

I think , it should be like this:

Now try integer values of x starting from 1 until (b-1).

If that fails, then start using real values for x between 1 and b.

If all else fails, plot the graph of and on the same graph. Ohanian 11:59, 23 August 2006 (UTC)[reply]

If b is a positive integer, most solutions for x will not be integers. A closed-form expression for general ax+xb = 0 is
where "log" denotes the natural logarithm (base e), and "W" denotes Lambert's W function. We cannot allow a to be negative if ax is to be meaningful, and if a is 0 or 1 then the solution is trivially x = b or x = b−1.
But again, what makes you ask? --KSmrqT 14:06, 23 August 2006 (UTC)[reply]


I'm sorry if I gave that impression but I did not ask the original question. I merely tried to help the person who asked the original question. " how shall I solve this type of equations? " is just me talking to myself. Ohanian 23:33, 23 August 2006 (UTC)[reply]


If, as is quite likely, you are attempting to solve the problem from the point of view of, say, high-school or low-level university mathematics (as opposed to, say, the kind of mathematics where you actually understand the article on the W-function enough to appreciate its full significance), then the best method goes something like this: Try graphing y = 2^x and y = 6-x, to the best of your abilities, on a single set of axes, and see what the general shape of the solutions are (are there zero solutions? just the one? quite a few? infinitely many?). Then, using whatever techniques may be available to you, try and "hone in" on whichever solution you decide is most important (perhaps all of them). In this case, the graph suggests a single solution, somewhere between 0 and 10. Trialling the integers will give you that single answer. If the situation were a little trickier, and the solution not a simple integer (eg. if you were trying to solve 2^x + x = pi), then your best bet is to find an approximate solution using, for example, the bisection method or Newton's method. Confusing Manifestation 14:03, 25 August 2006 (UTC)[reply]

Thank you friends for the help. The quetion actually arised "in the wild". --Vijaykcm 08:42, 26 August 2006 (UTC)[reply]

Newton's Method Loop[edit]

Is it possible for Newton's Method to repeat two values, i.e: a=b-(f(b)/f'(b)) and b=a-(f(a)/f'(a)) (a and b are not equal)? All I can reduce this to is f(a)/f'(a)=f(b)/f'(b). --Alexs letterbox 10:03, 23 August 2006 (UTC)[reply]

[before edit conflict] The equation you have reduced this to is a necessary but not a sufficient condition, and you forgot a minus sign. The correct condition is:
Constructing examples of this is easy. Any function satisfying, for example, f(1) = f(-1) = 1, f '(1) = 0.5, f '(-1) = -0.5, will do. Say, . -- Meni Rosenfeld (talk) 10:55, 23 August 2006 (UTC)[reply]
Here's a nicer example: . For every given , the method will alternate between x and −1/x. -- Meni Rosenfeld (talk) 11:09, 23 August 2006 (UTC)[reply]
Did you mean f(x) = – (x2 + 2)? --LambiamTalk 02:45, 24 August 2006 (UTC)[reply]
No... I don't see what's wrong with my examples, or for that matter, what's right with your example (it does alternate for , but that seems needlessly complicated). -- Meni Rosenfeld (talk) 09:51, 24 August 2006 (UTC)[reply]
Yes, this is easily arranged. For example, let h(−1) = −4, h(1) = 4, and h′(−1) = h′(1) = 2. (The function h(x) = 5xx3 will suffice.) Then with a = −1 and b = 1 we have
With exact arithmetic Newton's method will never find the zero at x = 0; it bounces endlessly between −1 and +1. Besides this pathology, Newton's method can go shooting off away from a bounded zero. Thus, in practice, we embed Newton's method in a more robust safeguard, such as Brent's method. --KSmrqT 11:22, 23 August 2006 (UTC)[reply]

Thanks for the examples, but none of them have zeros anyway, so it is unlikely that one would run into this problem while using the method, isn't it? --Alexs letterbox 10:29, 24 August 2006 (UTC)[reply]

How about this for an example that has zeros: f(x)=x3-x. If you take , then you get into a non-trivial loop between . Madmath789 10:39, 24 August 2006 (UTC)[reply]
KSmrq's example has a zero, a fact which is apparent and that he explicitly stated. And I thought it was quite clear that solutions to the problem are so abundant, that of course one can find such functions with as many zeros as one likes. Take the conditions I've stated above (f(1) = f(-1) = 1, f '(1) = 0.5, f '(-1) = -0.5) and add the condition f(0) = 0. You'll get , which exhibits the same behavior and has a zero at x = 0. Since you can set whatever conditions you want on a function and its derivatives (that is, their values at given points) and find a polynomial that satisfies them, any example you can think of is quite easy to generate. KSmrq also explained that Newton's method can cause problems in practice, and thus should not be applied naively. This particular problem is probably rare, since functions tend to have only a finite set of points where this occurs. -- Meni Rosenfeld (talk) 12:42, 24 August 2006 (UTC)[reply]
Please read my reply carefully - I was not stating that any of the previous examples did not have zeros - simply that mine did. Madmath789 13:27, 24 August 2006 (UTC)[reply]
My latest reply and accompanying request was not directed at you, but rather at Alexs letterbox. Maybe you didn't read it carefully :-) -- Meni Rosenfeld (talk) 16:55, 24 August 2006 (UTC)[reply]
I completely missed KSmrq's example. Sorry for the frustration. --Alexs letterbox 06:37, 25 August 2006 (UTC)[reply]
Consider the square root function. Extend it to negative numbers with absolute value:
or with modulus and sign function:
And a cube root might be even more fun. :) --CiaPan 18:40, 24 August 2006 (UTC)[reply]

Wilson's Theorem gives a nice division between primes and composites. Do you know of any others, preferably that don't involve a factorial? Black Carrot 20:30, 23 August 2006 (UTC)[reply]

Do you mean you want to find other primality tests? The Lucas-Lehmer test is a rather nice and simple one. Dysprosia 22:28, 23 August 2006 (UTC)[reply]
The Agoh-Giuga conjecture is something similar. Fredrik Johansson 18:01, 25 August 2006 (UTC)[reply]

Thanks, those are excellent. I notice, though, that they all seem to involve factorials, exponentials, or both. What's up with that? Black Carrot 05:25, 29 August 2006 (UTC)[reply]

Digits of Pi[edit]

Is there a website that displays Pi to, perhaps, the 1000th digit or more? thanks. Jamesino 23:22, 23 August 2006 (UTC)[reply]

A lot more than that! SEe Pi#External links. Melchoir 23:28, 23 August 2006 (UTC)[reply]

Why do you need more than 16 digits? Are you trying to calculate the circuference of the universe? Ohanian 23:38, 23 August 2006 (UTC)[reply]

What is significant about 16 digits? --Proficient 04:46, 24 August 2006 (UTC)[reply]
That is double precision in computers. (Igny 19:22, 24 August 2006 (UTC))[reply]
More accurate approximations are covered by export regulations. —Bromskloss 15:26, 25 August 2006 (UTC)[reply]