Wikipedia:Reference desk/Archives/Mathematics/2014 March 17

= March 17 =

Algebraic Curves Approximating Transcendental Functions
The graphic of the implicit algebraic curve $$y^3+yx^2=1$$ approximates that of $$\text{sech }x=\frac1{\cosh x}$$ quite well, and the same goes for $$y^3+3yx^2=1$$ approximating that of the Gaussian function $$e^{-x^2}$$. My question would be whether these are just "coincidences", or if there's something more is going on. ( The two algebraic curves are basically $$45^\circ$$ rotations of the superellipse $$x^3+y^3=1$$ ). — 79.118.177.253 (talk) 07:05, 17 March 2014 (UTC)
 * Have you looked at Taylor series and the binomial theorem? The truncation of those series expansions of these functions usually is a nice approximation.--Jasper Deng (talk) 08:48, 17 March 2014 (UTC)
 * The first algebraic equation can be rewritten as $$x=\frac1{\sqrt y}\cdot\sqrt{1-y^3}\iff u=\sqrt{1-t},$$ whose Taylor series around 0 is $$1-\frac t2-\frac{t^2}8+O(t^3),$$ where $1⁄8$ = $3⁄24$. At the same time, $$\text{sech}\sqrt x,$$ also around 0, yields $$1-\frac x2+\frac5{24}x^2-O(x^3).$$ Is this what you had in mind ? If so, isn't this merely a re-phrasing of the same problem, as opposed to finding out the actual cause for this "coincidence" ? — 79.113.255.220 (talk) 17:47, 17 March 2014 (UTC)
 * Well, I was just wondering whether you had tried those series before. My hunch is that a binomial expansion of the square root might lead to something (it's not the same as a Taylor series though).--Jasper Deng (talk) 00:13, 18 March 2014 (UTC)
 * Algebraic functions are dense in the space of continuous functions, by the Stone-Weierstrass theorem. So you can find algebraic functions that are as close as you like to the hyperbolic secant, Gaussian, or any other function.  I wouldn't attach any significance to it unless you had some reason for believing otherwise (in which case, presumably you already have the answer to your question.)   Sławomir Biały  (talk) 11:37, 18 March 2014 (UTC)
 * Well... the "reason" for me being open to believe otherwise is due to their accidental and unintentional discovery. I just "rotated" the afore-mentioned superellipse, but was too lazy to fill in the coefficients, leaving only the bare polynomial. Then I plotted the "necklace curve" (hyperbolic secant) as well, on the same graphic, and was shocked to see their near-overlap. Then, days later, I did fill in the coefficients, but only after I've divided them by 2 or 3 (for pseudo-"aesthetic" reasons, because they weren't co-prime). Then I plotted the Gaussian. Again, shock and surprise. — 79.118.182.161 (talk) 16:09, 18 March 2014 (UTC)
 * So what you're asking is pure mysticism.  Sławomir Biały  (talk) 23:32, 18 March 2014 (UTC)
 * There's a connection between superellipses $$x^n+y^n=1,$$ Gaussian functions $$e^{-x^n},$$ and the factorial or Gamma function. So that might also be another reason why I'm not quite 100% convinced that this is all just a coincidence. Though it might just as well be one. But I had to ask, to see if maybe someone can shed some more light into it, either one way or another. — 79.118.182.161 (talk) 23:59, 18 March 2014 (UTC)
 * Thanks, the question now seems a little more reasonable to me now that I understand the context better.  Sławomir Biały  (talk) 12:57, 19 March 2014 (UTC)

Rewriting an equation in order to solve for a particular variable
I have the following equation:

$$2^n - 1 = (n+1)^2 \times k$$

Is it possible to solve this equation for n, so that n is expressed as a function of k?

I recall I asked a similar question some time ago also at this desk.

The answer by User:Bo Jacoby suggests to me I can write

$$2^n - 1 = (n+1)^2 \times k$$

as

$$e^{n \log{2}}-1-k(n+1)^2 = 0$$

which is

$$e^{n \log{2}}-1-kn^2+2kn+k = 0$$

Now, what would I have to substitute for what here? Also, can someone explain the step writing the function as a power series in a bit more detail?

The rationale behind all this is that I want to find solutions of the congruence $$2^{n} \equiv 1 \pmod{(n+1)^2}\,\!$$, which is related to the search for Wieferich primes. I think a brute-force approach is not very effective (according to the heuristic given in our article, the number of Wieferich primes below some number x is expected to be approximately log(log(x)), which means the next Wieferich prime could easily be larger than, say, 10100). Also, I don't know whether a solution exists where (n + 1) is composite, but if there is one, the first such number might be very, very large and far out of reach of any brute-force method with current technology. I hope looking at solutions of the equation could yield some insight into the form those solutions must have. --  Toshio   Yamaguchi  11:55, 17 March 2014 (UTC)


 * That suggestion was essentially to apply Newton's method to find numerical solutions to your original equation. It won't work out of the box, though, since you are only interested in integer solutions.  A modification of the approach, possibly involving Hensel's lemma, might work better.   Sławomir Biały  (talk) 12:23, 17 March 2014 (UTC)

Use the power series expansion of the exponential function
 * $$e^x=\sum_{i=0}^\infty \frac{x^i}{i!} $$

to get
 * $$2^n=e^{n\log 2}=\sum_{i=0}^\infty \frac{(n\log 2)^i}{i!}$$

Then your equation is
 * $$2^n - 1  = (n+1)^2 \times k$$
 * $$0=\left(\sum_{i=0}^\infty \frac{(n\log 2)^i}{i!}\right) - 1-k-2 k n - k n^2$$
 * $$0=-k + n(\log 2 - 2 k)+n^2(\frac{(\log 2)^2}2-k)+\sum_{i=3}^\infty n^i\frac{(\log 2)^i}{i!}$$

Leave the equation unsolved until you know the value of k. Truncating the series gives approximate polynomial equations which are solved by some standard root-finding method such as the Durand-Kerner method. Bo Jacoby (talk) 06:29, 22 March 2014 (UTC).

Bo Jacoby's method is one of many approximate ways to solve transcendental equations in lieu of closed-form solutions. --Jasper Deng (talk) 19:53, 22 March 2014 (UTC)


 * Thanks for the answers, I do appreciate them. Now digesting this is something nice for my spare time and weekends :) I don't know whether looking at this from the point of this equation is the best way or not, but since I know no better method for resolving the congruence I mentioned in my opening post, it might be a start. --  Toshio   Yamaguchi  21:45, 23 March 2014 (UTC)