Wikipedia:Reference desk/Archives/Mathematics/2012 September 5

= September 5 =

Project Euler question
There is a Project Euler problem (whose number I am not quoting so the answer is not given away directly here), where one needs integer solutions to 2b^2 - 2b - n^2 + n = 0. b=3 and n=4 is one solution to this equation. The equations b' = 3b + 2n - 2 and n' = 4b +3n - 3 generate b' and n' which are also solutions to the equation. Two questions please: (1) How do I prove that the b' and n' equations are valid? (2) How does one do Diophantine magic and generate those equations in the first place? -- SGBailey (talk) 08:46, 5 September 2012 (UTC)
 * The equation is equivalent to 2b(b &minus; 1) = n(n &minus; 1). Now it becomes obvious b = n = 1 is another solution... --CiaPan (talk) 09:22, 5 September 2012 (UTC)


 * I know the equations work, I've got a dozen solutions and could have a dozen more if I wanted them (they get quite big...). But I'm interested in the proof and creation of the "next set of solutions" equations. Yes 1,1 is a solution. So is 0,1. But so is 3,4. -- SGBailey (talk) 09:36, 5 September 2012 (UTC)


 * I don't know where they come from, but it's simple enough to show that they work: just plug your formulas for b' and n' into the original equation and simplify. You'll get 2b^2 - 2b - n^2 + n = 0.  Under the assumption that you started with a solution, this shows that b' and n' are a solution.--121.73.35.181 (talk) 10:25, 5 September 2012 (UTC)


 * (1) solved. You are right thanks - when I tried that previously, I went wrong; but it worked ok second time. So (2) where did the generating equations come from??? -- SGBailey (talk) 11:26, 5 September 2012 (UTC)


 * Convergents (p,q) to the continued fraction expansion of sqrt(2) are (1,1), (3,2), (7,5), (17,12), (41,29) etc (see Pell number). Alternate convergents (1,1), (7,5), (41,29) etc. satisfy
 * $$p^2 = 2q^2 - 1$$
 * Successive convergents in this sequence are related by the recurrence relations
 * $$p' = 4q + 3p \quad q' = 3q + 2p$$
 * Use the transform
 * $$n = \frac{p+1}{2} \quad b = \frac{q+1}{2}$$
 * and you get the (n,b) sequence (1,1), (4,3), (21, 15) etc. which satisfies
 * $$(2n-1)^2 = 2(2b-1)^2 - 1 \Rightarrow 4n^2 - 4n + 1 = 8b^2 - 8b + 1 \Rightarrow n^2 - n = 2b^2 - 2b$$
 * with the recurrence relations
 * $$n' = 4b + 3n - 3 \quad b' = 3b + 2n - 2$$
 * Gandalf61 (talk) 12:08, 5 September 2012 (UTC)


 * Thank you (I think). I didn't understand most of that, but I'll study it for a few days and see if it makes any sense then. -- SGBailey (talk) 13:11, 5 September 2012 (UTC)

Complex variables inequality
Hi. I'm working in a book, and looking at a claim that goes as follows: For $$|e^z - 1|\leq \frac{1}{2}$$, we have $$\frac{1}{2}|z| \leq |e^z - 1| \leq 2|z|$$. I've checked this by doing a change of variables $$\zeta=e^z-1$$, parameterizing the circle $$|\zeta|=\frac{1}{2}$$, and checking that $$\frac{1}{2}|\log(\zeta + 1)| \leq |\zeta|=\frac{1}{2} \leq 2|\log(\zeta + 1)|$$ all around the circle (for the principal branch). I checked just by graphing the left and right as functions of a real variable, and sure enough, they stayed away from $$\frac{1}{2}$$. This is terribly awkward, though. Does anyone know an easier way to see this? Thanks in advance. -GTBacchus(talk) 19:54, 5 September 2012 (UTC)
 * Unless I’m missing something, the first part of the inequality is false.
 * I will type * for times, and ^  for ”to the power of”.


 * Because, suppose that z = 2pi*i. Then e^z = e^(2pi*i) =  cos(2pi) +  i*sin(2pi) = 1 + 0 = 1. So then |e^z  - 1| = 0, which is less than 1/2.  So z = 2pi*i  satisfies the assumption.


 * But then the first part of the inequality, (1/2)|z| <= |e^z -1|, becomes (1/2)(2pi) <= 0, or pi <= 0, which is just not true.  Cardamon (talk) 07:00, 8 September 2012 (UTC)
 * Yeah, I noticed that too. The inequality applies for z close to 0, not close to other multiples of 2pi*i. It can be fixed by adding the condition that |z|<1 or something.
 * I seem to have it figured out. The trick is to do the substitution $$\zeta=e^z-1$$, and assume that $$|\zeta|\leq\frac{1}{2}$$; this obviates the problem you mention. Then you really want to show that $$\frac{1}{2}|\zeta|\leq|\log(\zeta + 1)|\leq 2|\zeta|$$. This can be accomplished by playing with the series expansion of $$\log(\zeta + 1)$$ and the triangle inequality. -GTBacchus(talk) 01:59, 11 September 2012 (UTC)