Wikipedia:Reference desk/Archives/Mathematics/2018 February 9

= February 9 =

Piecewise parabolae mimicking sine function
What are the conditions for piecewise joint parabolae to mimick the graph of sine function?--213.233.84.184 (talk) 12:41, 9 February 2018 (UTC)
 * Define "mimick". No finite joining of parabolae can ever match exactly the sine function on any interval (because the sine function verifies $$f''(x)+f(x)=0$$ for all x, and the parabola-joining will only have that if the sum is zero). If you require the piecewise function to be smooth to some degree, then you can have boundary conditions at the "joints". Tigraan Click here to contact me 12:50, 9 February 2018 (UTC)
 * How close can this approximation be? What are the coefficients to satisfy the joining conditions?——213.233.84.55 (talk) 12:40, 11 February 2018 (UTC)
 * The joining condition is continuity of the first derivative, which is easy. With enough pieces, you can get as accurate as you want. For the curve defined by Bo Jacoby below (which is what most of us probably had in mind when we saw the question), the worst error appears to be very slightly above 0.056 (by Apple Grapher). —Tamfang (talk) 07:30, 12 February 2018 (UTC)


 * The parabola through $$(0,0), (\pi/2,1), (\pi,0)$$ may be what you have in mind. Continue with a parabola through $$(\pi,0), (3\pi/2,-1), (2\pi,0)$$ and so on. Bo Jacoby (talk) 13:15, 9 February 2018 (UTC).


 * Besides learning to determine the formula for the unique univariate quadratic function passing through three point (the simple method of plugging in three points and solving the system of equations mentioned in the first paragraph of Parabola is sufficient) you should also know how to manipulate a function f(x) so that its graph is translated horizontally or vertically by a units (f(x-a) or f(x)+a), scaled horizontally or vertically by a factor of a (f(x/a) or a⋅f(x)), or reflected about the vertical or horizontal axis (f(-x) or -f(x)). [Aside: I assumed we had a Wikipedia article discussing such manipulations, but the closest I found were the stubs Horizontal translation & Vertical translation.]  Then you will be able to manipulate the unit parabola y=x2 to form the two pieces needed for the first period of your piecewise function.
 * Here are some Wolfram Alpha plots of the function Bo Jacoby succinctly described above:
 * One period of the piecewise parabolic function f(x).
 * One period of Sin(x).
 * Both plotted on the same graph.
 * The difference (or error) e(x) = f(x) - Sin(x).
 * f1(x) - Sin(x) where f1 is the first piece of f; equal to e(x) for 0<x<π and encourages Alpha to give us local maxima.
 * The relative error e(x)/Sin(x).
 * The piecewise function superficially resembles the sine function, though it's a bit too rounded. As mentioned by Tamfang, we have continuity of the first derivative of the pieces, and it is thanks to symmetry that we have this despite each piece passing through not just two but three specified point.  The maximum absolute error of e≈0.056010 occurs at x≈0.47197 (about 30% of the way from 0 to π/2).  This represents about 12% of Sin(0.47197)≈0.45464.  The greatest relative errors occur as the functions cross the horizontal axis, with lim x->0 of (f(x)-Sin(x))/Sin(x) = (4/π)-1 ≈ 27%.  This comes from its slope through the origin being 4/π≈1.27 where the slope of the sine function there is 1. -- ToE 18:03, 14 February 2018 (UTC)

Graph of Generalized Mean?
What does the graph of the Generalized mean look like. For example y=G$x$(4,9). (it runs from y=4 at x=-∞ to y=9 at x=+∞) and what is the derivative of y=G$x$(4,9) look like?Naraht (talk) 18:25, 9 February 2018 (UTC)
 * You can always just try graphing them on Wolfram Alpha. As expected from what you've already pointed out, as a function of the power, the graph appears more or less sigmoidal, although not symmetrically so.  You can even have Alpha find you (an approximation of) the inflection point.  And the y-coordinate seems rather close to the arithmetic–geometric mean of the two numbers, but that could be a coincidence.  –Deacon Vorbis (carbon &bull; videos) 19:41, 9 February 2018 (UTC)
 * Yes, more or less sigmoidal, the inflection point isn't at x=0, which seams correct given that the Arithmetic mean is at x=1. As you said, close to the arithmetic-geometric, but I'll have to look more for that. Derivative is fairly messy as you might expect. (I'm using y=(1/2(4^x+9^x))^1^x) and got d/(dx)((1/2 (4^x + 9^x))^(1/x)) = (2^(-1/x) (4^x + 9^x)^(1/x - 1) ((4^x + 9^x) (-log(4^x + 9^x)) + (4^x + 9^x) log(2) + x (4^x log(4) + 9^x log(9))))/x^2
 * The fact that the derivative is everywhere nonnegative and the function is bounded above and below means it is indeed sigmoidal.--Jasper Deng (talk) 10:23, 10 February 2018 (UTC)
 * But not rotationally symmetric around x=0, all of the examples on the page have that (or at least can be shifted to be rotationally symmetrical)Naraht (talk) 12:23, 12 February 2018 (UTC)

Prime number theorem
In this article https://en.wikipedia.org/wiki/Prime_number_theorem#Statement is written a formula
 * $$p_n \sim n\log(n),$$

Can you show, how did the author get this result? The equation $$\pi(x)\sim\frac{x}{\log x}$$ we can reformulate next way: $$n \sim p_n/ln(p_n)$$. $$\therefore p_n \sim n\cdot ln(p_n) $$, but not $$p_n \sim n\log(n)$$ Username160611000000 (talk) 21:07, 9 February 2018 (UTC)

Also from eq. $$\pi(x)\sim\frac{x}{\log x}$$ : $$n \sim \tfrac{p_n}{\ln(p_n)}$$ $$n\ln(p_n) \sim p_n$$ $$\ln({p_n} ^n) \sim p_n$$ $$e^{p_n}\sim {p_n}^ n$$ But from the article

$$\lim_{x\to\infty} \frac{\vartheta (x)}x =1$$ Or $$\vartheta (p_n) \sim p_n $$ $$\textstyle\sum\ln{p_i} \sim p_n $$ $$\ln{\textstyle\prod p_i} \sim p_n $$ $$\textstyle\prod p_i \sim e^{p_n} $$ We know that $$\textstyle\prod\limits_{i=1}^n p_i = p_1 p_2 ... p_n < \underbrace{p_n p_n ... p_n}_\text{n times} = {p_n} ^n$$.

We've got contradiction:$$e^{p_n}\sim {p_n}^ n$$ and $$e^{p_n} \sim  \textstyle\prod p_i  $$. Is there a mistake somewhere? Username160611000000 (talk) 07:05, 10 February 2018 (UTC)
 * One mistake is u~v does not imply eu~ev, but you used this to get $$\textstyle\prod p_i \sim e^{p_n} $$. As a counter example, x+logx~x but not xex~ex. Also note that u<v and u~v do not imply a contradiction in general, though it's pretty clear that $${p_n}^n \sim \textstyle\prod p_i$$ is false. --RDBury (talk) 10:50, 10 February 2018 (UTC)
 * Thank you. I've tested $$\lim\limits_{n\to \infty}\tfrac{\ln(n^n)}{\ln(n!)} $$ in Mathcad and got 1. And $$\lim\limits_{n\to \infty}\tfrac{n^n}{n!} \to \infty $$Username160611000000 (talk) 11:19, 10 February 2018 (UTC)
 * For the first question, there is a proof of the ⇒ half starting on page 92 of . Not sure about the ⇐ half yet but the article should really have a citation since the equivalence is not obvious. Of course since both statements are true they are logically equivalent, but in the sense meant in the article it's less clear. --RDBury (talk) 16:38, 10 February 2018 (UTC)
 * I've found an example where eu ~ e v. Mertens' 2nd theorem : $$\textstyle\sum\tfrac{1}{p_i} \to \ln\ln p_n$$ $$e^{\textstyle\sum\tfrac{1}{p_i}} \to e^{\ln\ln p_n}$$ Why is it true? Are there any rules that could tell whether exponentiation is possible? Username160611000000 (talk) 12:22, 11 February 2018 (UTC)
 * Can you explain what you mean? $$\exp\left(\sum 1/p_i\right)$$ does not appear anywhere on that page. --JBL (talk) 14:25, 11 February 2018 (UTC)
 * Last question is not related to the article but is related to another article (and I gave a link)  and a possibility of exponentiation . User RDBury said u~v does not imply eu~ev . I wonder is it always true and why is it not  true in last example (u~v does imply eu~ev)? Username160611000000 (talk) 04:52, 12 February 2018 (UTC)
 * If u and v go to infinity and e^u ~ e^v then also u ~ v. So there is a one-way implication, and consequently many instances where both asymptotic equalities are valid.  But if you have two expressions u and v such that u ~ v, it does not follow logically that their exponentials are also asymptotically equal, as RDBury said.  --JBL (talk) 13:33, 12 February 2018 (UTC)