Wikipedia:Reference desk/Mathematics

From Wikipedia, the free encyclopedia
Jump to: navigation, search

The Wikipedia Reference Desk covering the topic of mathematics.

Welcome to the mathematics reference desk.
Shortcut:
Want a faster answer?

Main page: Help searching Wikipedia

How can I get my question answered?

  • Provide a short header that gives the general topic of the question.
  • Type ~~~~ (four tildes) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Post your question to only one desk.
  • Don't post personal contact information – it will be removed. We'll answer here within a few days.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we’ll help you past the stuck point.


How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
 
See also:
Help desk
Village pump
Help manual


September 20[edit]

September 21[edit]

September 24[edit]

September 25[edit]

Linear equation perfect square solutions[edit]

I was reading about finding a solution to a quadratic equations which is a perfect square (the solution is easy to understand) and I started wondering about linear equations. Given a simple linear equation in the form y=ax+b where a and b are constants, what value of x will ensure that y is a perfect square? I've tried turning ax+b into (cx+d)(cx+d), but that hasn't worked. — Preceding unsigned comment added by 209.149.115.99 (talk) 18:19, 25 September 2014 (UTC)

If you want integer solutions {x,y} then these only exist if conditions are met for the constants, see Diophantine_equation#One_equation. Then you would just have to search among the (countable) solution set for perfect squares. You could also write y=z^2 and think of z^2=ax+b as a quadratic Diophantine equation, and solve using a Pell equation as described here [1]. Both of these methods would miss solutions where x is not an integer and y is a perfect square. SemanticMantis (talk) 19:12, 25 September 2014 (UTC)
I worked on this last night in earnest, but I don't see the relationship between y2=ax+b and the Diophantine ax2+by2=k. I changed my original request of y to y2 to reinforce that I am looking for a square. However, the x is not a square. If I rearrange it, I can make, at best, ax+by2=k. Without the squared x, I cannot make any headway on the solutions provided. 209.149.115.99 (talk) 11:26, 26 September 2014 (UTC)
Sorry about that, I misread my mathworld link. I don't know much about this area, but you could try looking up the Ito (1987) paper cited at mathworld, and also see what other papers have cited it. SemanticMantis (talk) 14:51, 26 September 2014 (UTC)
If you're happy with just rational solutions then draw a circle around the origin intersecting where y=ax+b is zero. This will be a rational point since y is zero and a and b are rational so the other point on the circle where y=ax+b cuts it is also rational. Any choice of a rational number for x and 0 for y for the origin will do the same thing. Dmcq (talk) 12:03, 26 September 2014 (UTC) Oops silly me I misread the question, I'll have a think about it. Dmcq (talk) 17:08, 26 September 2014 (UTC)
If you are looking for integer solutions with a and b being integers then your question is equivalent to asking if y^2=b \mod a . See the article Quadratic reciprocity for how the Legendre symbol can be used to quickly check if there is a solution is a or b are large - though it won't give an actual solution unfortunately. The article quadratic residue gives a ways of calculating the residues without checking each possibility except when a prime factor is of the form a=8n+1. Dmcq (talk) 17:29, 26 September 2014 (UTC)
Thanks. I didn't look at it as a mod problem. Once you throw that in, I can see why there is no simple solution for x. It looks like you'd have to try every x in the range you like to see if any work. 209.149.115.99 (talk) 17:49, 26 September 2014 (UTC)

September 26[edit]

Approximation of the cosine function[edit]

In the Cosine article on Mathworld, an interesting approximation is mentioned:

A close approximation to cos(pix/2) for x in [0,1] is

\begin{align}H(x)	& =	1-\frac{x^2}{x+(1-x)\sqrt{\frac{2-x}{3}}}

& \quad (8) \\

	& \approx \cos\left(\frac{\pi}{2}x\right)	
& \quad (9)
\end{align}

(Hardy 1959), where the difference between cos(pix/2) and Hardy's approximation is plotted above.

However, all it mentions is Hardy's work, and the work cited does not contain any other information about this approximation! The derivation and/or potential applications for this would be interesting, but no other information about this can be found on the internet. Do you know any other sources/information about this? Llightex (talk) 21:05, 26 September 2014 (UTC)

Here is a way you might reverse engineer the formula, though I have no idea how Hardy derived it. Let C(x) = cos(πx/2). We know from the Taylor series that C(x) = 1 - x2/constant + other terms. Rewrite this as C(x) = 1 - x2/K(x) where K is to be determined. We also know C(1) = 0 from which K(1)=1. Expand K at x=1 to get K(x)=1+constant⋅(x-1)+higher terms. Again, collecting the the constant and higher terms into a single function, write K(x)=1+(x-1)L(x). At this point you can get a fairly good approximation for C by plugging in a linear approximation for L. But we also know C(1/2)=√2/2 which would imply (after some computation) L(1/2) = 1 - √(1/2). So perhaps a better approximation of L would be L(x)≈ 1 - √(1/2+m(x-1/2)) for some constant m. If you plug in C(2/3)=1/2 you get m=-1/3 which produces the approximation given, but other values of m might work just as well or better. I found m=-.337 gives the lowest mean square error on the interval. Note that there are points in the derivation where different choices could be made, for example you could write C(x) = 1 - x2⋅K(x) or K(x)=1+(x-1)/L(x). It might be fun to explore these variations to see how they compare with the one given. --RDBury (talk) 00:01, 27 September 2014 (UTC)

September 27[edit]

Decimal exponents[edit]

[I really really ought to remember this!]

How do decimal exponents work? How do I calculate the result of x × 10y.z (with a numeral in place of each variable), for example? To my surprise, decimal exponent redirects to scientific notation, which didn't even address the issue as far as I could tell, and the fractional "Rational exponents" section of exponentiation didn't either, unless it went over my head. Not trying to understand the theoretical basis for it — I just want to know how to solve x × 10y.z, and I don't even know what to call it, since "decimal exponent" apparently means something completely different. Nyttend (talk) 11:40, 27 September 2014 (UTC)

If you have a^x and x is not a whole number, the decimal form for x isn't helpful in the computation. Write the exponent as a fraction x = n/d, and then
a^x = a^{n/d} = (a^n)^{1/d} = \sqrt[d]{a^n} = (\sqrt[d]a)^n,
So for example 4^{1.5} is 4^{3/2} = (\sqrt 4)^3 = 2^3 =8. Staecker (talk) 12:22, 27 September 2014 (UTC)
For one thing, I'd forgotten that x½ is equal to the square root of x. But what to do about a fraction that's not conveniently .5? I don't know how to interpret the "d" outside the √ following your third equals sign — I know it's the denominator, but what's the significance of a number in that position? It's been several years since I took a maths course. Nyttend (talk) 12:39, 27 September 2014 (UTC)
Take 1000.1. I just discovered that the result is the tenth root of 100. But the result of 1000.4 is not 4x the tenth root of 100, and it's not exactly what you get when you raise the tenth root of 100 to the fourth power. I can't yet follow your instructions to use the fractional method, since I don't understand what you're doing in the <math> section. Nyttend (talk) 12:46, 27 September 2014 (UTC)
Any difference between your calculation of 1000.4 and the fourth power of 1000.1 will just be rounding errors, because they are the same by definition. In the fraction n/d above, n is the nth power and d is the dth root (for example if d is 3 then you want the cube root). You can do the calculations in either order. Try working out 10281024 to the power of 0.7 (=7/10) It is easiest to find the tenth root first (a whole number) then raise this to the seventh power. You should get 128. Dbfirs 13:01, 27 September 2014 (UTC)
Okay, now I think I remember better; thank you. What I needed was the simple examples such as 10280.1 and 10280.7. I was using Windows Calculator (Windows 8), typing 100, hitting the xy button, typing 0.1, hitting enter, squaring the result twice, and adding this to memory. Next, I typed 100, hit the xy button, typed 0.4, hit enter, and subtracted it from memory; there was a difference, with the latter method getting a result smaller by approximately 4.958 × 10-37. (I do understand negative exponents). But then, I know quite well that 2 is the tenth root of 1028, but typing 1028, hitting the xy button, typing 0.1, and hitting enter produces a result of 2.0007798800968566238308934329587. Is it a calculator error? If my experiment with 0.14 and 0.4 had produced equal results, I would have understood much more easily. Nyttend (talk) 13:16, 27 September 2014 (UTC)
You're confusing 1024 with 1028. Try 2 [xy] 10 to get 1024. Then 1024 [xy] .1 to get 2 again. Generally arithmetic errors in computers, even in Microsoft products, are so rare as to be practically nonexistent. There was the infamous Pentium FDIV bug, but that's the exception rather than the rule. Not to say you don't have to watch out for rounding errors which are a different type of thing, --RDBury (talk) 15:32, 27 September 2014 (UTC)
Oops! that was my fault. Memory problems of the non-electronic variety! Dbfirs 16:37, 27 September 2014 (UTC)
My Mac calculator program gives the exact value '2' when you raise 1024 to the 0.1 power. 'Decimal exponents' isn't the best search term to use. Fractional exponents would be better. More background on fractional exponents is given in our logarithm article. When x = 10^y, x is the logarithm of y, y is the antilogarithm of x. EdJohnston (talk) 16:00, 27 September 2014 (UTC)

One has to be a bit careful when applying this to complex numbers since the complex logarithm is multi-valued. For example the complex square root can have multiple meanings depending on context.--Jasper Deng (talk) 16:42, 27 September 2014 (UTC)

the result of 1000.4 is not 4x the tenth root of 100 -- nor should it be. Unless I'm reading the comment above wrong, there seems to be a mix-up. By the product rule of exponents,1000.4 is equal to (1000.1)4 which is the same as (1004)0.1 -- and none of these is 4 times 1000.1 . El duderino (abides) 10:35, 1 October 2014 (UTC)

September 28[edit]

September 29[edit]

September 30[edit]

Quadratic expression evaluates to perfect square[edit]

For example, 2x^2 - 238x + 14161. Is there any way, apart from just substituting a succession of x values, to determine which integers will give the square of an integer? If my calculation is correct, the first eight positive ones are 20, 35, 39, 51, 68, 80, 84 and 99, which give the squares of 101, 91, 89, 85, 85, 89, 91 and 101. I see no obvious pattern beyond the symmetry about x=59.5 for a minimum.←86.146.61.61 (talk) 16:42, 30 September 2014 (UTC)

Google quadratic Diophantine equation, or use http://alpertron.com.ar/QUAD.HTM. PrimeHunter (talk) 16:53, 30 September 2014 (UTC)
Note for the QUAD, you are looking for x and y that fit 2x^2 - 238x + 14161 =y^2, move the y^2 to the other side, so the entries on the left are 2, 0, -1, -238, 0 and 14161.Naraht (talk) 17:37, 30 September 2014 (UTC)
Thanks. I've realised that 2x^2 - 238x + 14161 = y^2 reduces to x^2 + (119-x)^2 = y^2, so a search of, or parameterisation of, Pythagorean triples will suffice in this case.←86.146.61.61 (talk) 19:10, 30 September 2014 (UTC)

Automatic calculation with Excel[edit]

I don't want an explanation of how to do it - just even give me the name of the concept\function and I'll read about it.

I need to get to know the Automatic calculation option of statistical data with Excel (for example, for getting a Standard deviation). Right now, I can only write the data myself (e.g Multiply\Power every single piece) and I ought to automate this process. Thank you for your help and guidance. Ben-Natan (talk) 17:14, 30 September 2014 (UTC)

This question more properly belongs in the computing desk, also I'm not quite sure what you're asking for, but I'll give it a try. First, there are two standard deviation estimates commonly used, one with N-1 and one with N. (If you know the formulas the you'll know what I'm talking about.) Excel has the N-1 version as a built in function STDEV() and the N version as STDEVP(). I think what you're trying to do is get Excel to include one or both of these in the status bar along with min, max, sum and average. There doesn't seem to be a way of doing that, at least with the version of Office I'm using which is fairly recent. Maybe the next version will do it, but until then I think you'll have to make do with the STDEV or STDEVP. --RDBury (talk) 18:53, 30 September 2014 (UTC)
A more basic goal: I want that if I have 3 columns: X, f, and f*x, Than, Excel would multiply x&f for me. I want to achieve this goal for saving time. Ben-Natan (talk) 20:09, 30 September 2014 (UTC)
Again, your question is not very clear, but if I understand correctly then this is a very basic use of Excel. If X and f are in columns A and B, with the values starting on row 2, then you would enter =A2*B2 (a Formula in Excel terminology) in cell C2 and then copy it down as far as you need it, e.g. by dragging the "handle" (small square) that appears at the bottom right of the cell. Apologies if I've misinterpreted, but if this is new to you then you really need to do some basic tutorials before going much further. AndrewWTaylor (talk) 20:17, 30 September 2014 (UTC)
This is sometimes called "replication" of the formula. Dbfirs 22:17, 30 September 2014 (UTC)
Andrew, I don't know what wasn't clear to you in the question, but anyway The third column (f*X) should just contain the multiplications of X(Column A), and f(Column B). Is what you've described is the way to achieve this very goal? Does this process have a clear name that I could look for some Youtube videos about it? thank you again. Ben-Natan (talk) 04:21, 1 October 2014 (UTC)
Do you mean just the "Insert >> Function" feature in Excel? Any basic tutorial (or the inbuilt help) will explain this. Dbfirs 08:15, 1 October 2014 (UTC)
Yes, the method I described will achieve what you want. The "clear name" for the key concept is formula, and it's absolutely basic in using Excel. This page (for example) might give you a start; no doubt there are plenty of others, e.g. this YouTube video. AndrewWTaylor (talk) 15:13, 1 October 2014 (UTC)

October 1[edit]

Monty Hall and Condorcet[edit]

Perhaps someone would consider whether there is a connection between the Monty Hall problem and Condorcet's voting paradox. — Preceding unsigned comment added by 99.169.83.78 (talk) 05:49, 1 October 2014 (UTC)

I've pondered it a bit, but only based upon my own recollection of the former and a quick skim of the latter ...but I've also considered the possibility that this is a homework problem, so I have to ask[2]: do you think there is a connection and if so, what is it? El duderino (abides) 10:45, 1 October 2014 (UTC)
Well, on the face of it, Monty hall problem is fully solved, and several variants can also be analytically solved. In contrast, the "paradox" is simply that the Condorcet criterion does not allow for condorcet methods to satisfy Independence_of_irrelevant_alternatives, because of Arrow's_impossibility_theorem. So both phenomenon are fairly well understood (with some careful analysis), but both issues can be counterintuitive and surprising to first time learners. So I'd say the similarities have more to do with human psychology than any strong connections in the mathematical structures. Another connection is that I taught both of these topics in the same class in 2005 :) SemanticMantis (talk) 15:06, 1 October 2014 (UTC)