Ask a Mathematician

A repository for intrinsically valuable information

Re: Ask a Mathematician

Postby CarrieVS » Thu Mar 17, 2016 10:27 pm

NathanLoiselle wrote:What's the square root of 37?


√37

What, you want some sort of approximation? Why, when there's a perfectly good exact value? 37 is a little more than 6^2, so the answer's a little more than six, and mathematicians don't care much about anything between a rough idea and the exact value. Go ask a physicist if you want it to an arbitrary precision.
  • 8

A Combustible Lemon wrote:Death is an archaic concept for simpleminded commonfolk, not Victorian scientist whales.
User avatar
CarrieVS
TCS Redshirt
TCS Redshirt
 
Posts: 7103
Joined: Sat Apr 20, 2013 7:43 pm
Location: By my wild self in the wet wild woods waving my wild tail
Show rep
Title: Drama Llama

Re: Ask a Mathematician

Postby Windy » Sun Mar 27, 2016 4:57 pm

Is there an easy way to do math on a computer? It's kinda hard to read equations as y = ((x+5)(x-2)(5x^2*666)/(3242x-3)(5x^5-9)) * ((x^2-500x+90)(30x-3)/(999x^4-5)) / (500x^666)
  • 2

User avatar
Windy
TCS Junkie
TCS Junkie
 
Posts: 3127
Joined: Fri May 29, 2015 11:41 am
Show rep

Re: Ask a Mathematician

Postby CarrieVS » Sun Mar 27, 2016 5:36 pm

Not really, I'm afraid. There are various bits of software and so on that can render mathematical formulae nicely but they're usually fiddly.

One thing that does help is judicious use of spaces and of different sorts of brackets - generally in mathematical formulae (), [], and {} all mean the same, so you can use the different styles to make it clearer which opening goes with which closing in nested brackets.

I'd write your formula there as

y = { (x + 5)(x - 2)(5x^2 * 666)/(3242x - 3)(5x^5 - 9) } * { (x^2 - 500x + 90)(30x - 3)/(999x^4 - 5) } / (500x^666)

which I think is slightly clearer.
  • 5

A Combustible Lemon wrote:Death is an archaic concept for simpleminded commonfolk, not Victorian scientist whales.
User avatar
CarrieVS
TCS Redshirt
TCS Redshirt
 
Posts: 7103
Joined: Sat Apr 20, 2013 7:43 pm
Location: By my wild self in the wet wild woods waving my wild tail
Show rep
Title: Drama Llama

Re: Ask a Mathematician

Postby Windy » Mon Apr 11, 2016 5:58 am

Is there a symbol for "sum of all numbers from 1 to n"? For example, the product of all numbers from 1 to n is "n!".
  • 3

User avatar
Windy
TCS Junkie
TCS Junkie
 
Posts: 3127
Joined: Fri May 29, 2015 11:41 am
Show rep

Re: Ask a Mathematician

Postby CarrieVS » Mon Apr 11, 2016 10:35 am

It may be denoted as Tn, the nth triangular number. But I had to look that up, it's not very common.

Of course we have shorthand notation for sums and products (Big sigma for sums, big Pi for products, with sub- and superscripts indicating what you're summing over), but that's just a shorter way of writing "sum of ... from 1 to n".

Factorial is a standard mathematical function which turns up in a lot of places, and there's no simple calculation on n that you can do to work it out - you have to multiply all the numbers. So it makes sense to give it special treatment. Whereas Tn = n(n + 1)/2, and it also doesn't get used as much.

Edit: nice one, Avi!
  • 7

Last edited by CarrieVS on Mon Apr 11, 2016 12:01 pm, edited 2 times in total.
A Combustible Lemon wrote:Death is an archaic concept for simpleminded commonfolk, not Victorian scientist whales.
User avatar
CarrieVS
TCS Redshirt
TCS Redshirt
 
Posts: 7103
Joined: Sat Apr 20, 2013 7:43 pm
Location: By my wild self in the wet wild woods waving my wild tail
Show rep
Title: Drama Llama

Re: Ask a Mathematician

Postby Learned Nand » Mon Apr 11, 2016 11:17 am

I thought we could do subscripts, but apparently we couldn't. So I added tags for superscripts and subscripts, e.g. Tn, ex.
  • 9

Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

Click for a Limerick
OrangeEyebrows wrote:There once was a guy, Aviel,
whose arguments no one could quell.
He tested with Turing,
his circuits fried during,
and now we'll have peace for a spell.
User avatar
Learned Nand
Back-End Admin
Back-End Admin
 
Posts: 9858
Joined: Tue Apr 16, 2013 9:18 pm
Location: Permanently in the wrong
Show rep
Title: Auditor of Reality

Re: Ask a Mathematician

Postby jbobsully11 » Fri Aug 05, 2016 3:21 am

I probably should have learned this in college, but the required math classes for my major only went as far as first-order separable differential equations, and the math department there was somewhat sadistic with their grading/exams, so I didn't take any more classes with them than I absolutely had to. Not that it matters much now because I passed that one exam a while ago, but there was a question on it similar to #9 here that I'm not sure I got:
Spoiler: show
The solution to the following differential equation y'' - 2y' + y = e2t is
A. C1et + C2tet + te2t
B. C1et + C2tet + e2t
C. C1et + C2e-t + e2t
D. C1et + e2t

If I recall correctly, I differentiated the answer choices and plugged them in until I found something that looked like it worked, but they never gave out the answers, so I don't know for sure if I got it right. Is there a more "correct" way of doing it? I found some notes online, but my head started spinning before I even got to second-order equations.
  • 3

Crimson847 wrote:In other words, transgender-friendly privacy laws don't molest people, people molest people.

(Presumably, the only way to stop a bad guy with a transgender-friendly privacy law is a good guy with a transgender-friendly privacy law, and thus transgender-friendly privacy law rights need to be enshrined in the Constitution as well)
User avatar
jbobsully11
TCS Moderator
TCS Moderator
 
Posts: 3644
Joined: Mon Apr 15, 2013 10:22 pm
Location: not the outskirts of nowhere anymore, NJ, USA
Show rep
Title: The Chronically Underemployed

Re: Ask a Mathematician

Postby Malfeasinator » Fri Aug 19, 2016 2:31 pm

jbobsully11 wrote:I probably should have learned this in college, but the required math classes for my major only went as far as first-order separable differential equations, and the math department there was somewhat sadistic with their grading/exams, so I didn't take any more classes with them than I absolutely had to. Not that it matters much now because I passed that one exam a while ago, but there was a question on it similar to #9 here that I'm not sure I got:
Spoiler: show
The solution to the following differential equation y'' - 2y' + y = e2t is
A. C1et + C2tet + te2t
B. C1et + C2tet + e2t
C. C1et + C2e-t + e2t
D. C1et + e2t

If I recall correctly, I differentiated the answer choices and plugged them in until I found something that looked like it worked, but they never gave out the answers, so I don't know for sure if I got it right. Is there a more "correct" way of doing it? I found some notes online, but my head started spinning before I even got to second-order equations.


Yikes. I plugged it into Wolfram Alpha. It's B.
  • 1

User avatar
Malfeasinator
Time Waster
Time Waster
 
Posts: 1039
Joined: Sat Jul 27, 2013 5:17 pm
Location: Florida
Show rep
Title: this guy

Re: Ask a Mathematician

Postby jbobsully11 » Thu Oct 27, 2016 7:07 pm

I was thinking about the problem I posted above, and decided to check all the answers myself. I got the same result for choices B and D, and I can't figure out why D would be wrong. Work spoilered below:
Spoiler: show
y'' - 2y' + y = e2t

B. y = C1et + C2tet + e2t
y' = C1et + C2tet + C2et + 2e2t
y'' = C1et + C2tet + 2C2et + 4e2t

[C1et + C2tet + 2C2et + 4e2t] - 2[C1et + C2tet + C2et + 2e2t] + C1et + C2tet + e2t ?= e2t
C1et + C2tet + 2C2et + 4e2t - 2C1et - 2C2tet - 2C2et - 4e2t + C1et + C2tet + e2t ?= e2t

That can be rearranged to give
C1et + C1et - 2C1et + 2C2et - 2C2et + C2tet + C2tet - 2C2tet + 4e2t - 4e2t + e2t ?= e2t
(C1 + C1 - 2C1 + 2C2 - 2C2 + C2t + C2t - 2C2t)(et) + (4 - 4 + 1)(e2t) ?= e2t
0 + e2t = e2t


D. y = C1et + e2t
y' = C1et + 2e2t
y'' = C1et + 4e2t

[C1et + 4e2t] - 2[C1et + 2e2t] + C1et + e2t ?= e2t
C1et + 4e2t - 2C1et - 4e2t + C1et + e2t ?= e2t
(C1 - 2C1 + C1)et + (4 - 4 + 1)e2t ?= e2t
e2t = e2t
  • 0

Last edited by jbobsully11 on Sat Nov 05, 2016 8:47 am, edited 1 time in total.
Crimson847 wrote:In other words, transgender-friendly privacy laws don't molest people, people molest people.

(Presumably, the only way to stop a bad guy with a transgender-friendly privacy law is a good guy with a transgender-friendly privacy law, and thus transgender-friendly privacy law rights need to be enshrined in the Constitution as well)
User avatar
jbobsully11
TCS Moderator
TCS Moderator
 
Posts: 3644
Joined: Mon Apr 15, 2013 10:22 pm
Location: not the outskirts of nowhere anymore, NJ, USA
Show rep
Title: The Chronically Underemployed

Re: Ask a Mathematician

Postby cmsellers » Thu Oct 27, 2016 7:19 pm

Is there any possibility that there's inherently a flaw in mathematics somewhere?

And if not, why does the real world often fail to match the models it produces?
  • 0

User avatar
cmsellers
Back-End Admin
Back-End Admin
 
Posts: 9316
Joined: Sun Apr 14, 2013 7:20 pm
Location: Not *that* Bay Area
Show rep
Title: Broken Record Player

Re: Ask a Mathematician

Postby jbobsully11 » Sat Oct 29, 2016 4:50 pm

cmsellers wrote:Is there any possibility that there's inherently a flaw in mathematics somewhere?

And if not, why does the real world often fail to match the models it produces?

In what way? Calculus (from third derivatives [or more] up to integrals) models volumes, areas, and rates of change accurately. Chaotic functions model a lot of systems remarkably well, given the sensitivity of the input required. A lot of uncertainty comes from incomplete information, but that can be accounted for in some circumstances as well.
  • 2

Crimson847 wrote:In other words, transgender-friendly privacy laws don't molest people, people molest people.

(Presumably, the only way to stop a bad guy with a transgender-friendly privacy law is a good guy with a transgender-friendly privacy law, and thus transgender-friendly privacy law rights need to be enshrined in the Constitution as well)
User avatar
jbobsully11
TCS Moderator
TCS Moderator
 
Posts: 3644
Joined: Mon Apr 15, 2013 10:22 pm
Location: not the outskirts of nowhere anymore, NJ, USA
Show rep
Title: The Chronically Underemployed

Re: Ask a Mathematician

Postby cmsellers » Sat Oct 29, 2016 5:28 pm

jbobsully11 wrote:In what way? Calculus (from third derivatives [or more] up to integrals) models volumes, areas, and rates of change accurately. Chaotic functions model a lot of systems remarkably well, given the sensitivity of the input required. A lot of uncertainty comes from incomplete information, but that can be accounted for in some circumstances as well.

That was an attempt at a joke.

Probably would have been pithier if I'd said "My experimental results don't match my models. Is math broken?"
  • 1

User avatar
cmsellers
Back-End Admin
Back-End Admin
 
Posts: 9316
Joined: Sun Apr 14, 2013 7:20 pm
Location: Not *that* Bay Area
Show rep
Title: Broken Record Player

Re: Ask a Mathematician

Postby cmsellers » Sat Dec 10, 2016 5:08 am

Do you know the FiveThirtyEight Riddler series?

Normally they involve some degree of calculation, so I never attempt them. But this week's puzzle seems trivially easy.

Consider the following war game: Two countries are eyeing each other’s gold. At the beginning of the game, the “strength” of each country’s army is drawn from a continuous uniform distribution and lies somewhere between 0 (very weak) and 1 (very strong). Each country knows its own strength but not that of its opponent. The countries observe their own strength and then simultaneously announce “peace” or “war.”

If both announce “peace,” then they each stay quietly in their own territory, with their own gold, which is worth $1 trillion (so each “wins” $1 trillion).

If at least one announces “war,” then they go to war, and the country with the stronger army wins the other’s gold. (That is, the stronger country wins $2 trillion, and the other wins $0.)

What is the optimal strategy of each country (declaring “peace” or “war”) given its strength?

Extra credit: What if the countries don’t announce at the same time and instead one announces first and the other second? What if the value of winning the war were $5 trillion rather than $2 trillion?

We would assume that with a continuous uniform the probability that a country will win the war is equal to the size of its own army. With an army strength of .5 there is a .5 chance that the country will win the war. With no cost of going to war and a strictly rational country they should always go to war above .5 choose peace below it, and flip a coin at .5 on the dot.

If one country declares first and declares war, it makes no difference what the other country does. If one country declares first and chooses peace, the other country knows that its army strength is at or below .5, and should choose war if its own army strength is at or above .25.

And the size of the pot should make no difference assuming it's split evenly between the countries (on the other hand, a completely rational country with twice the pot of the other country should declare war at .67 army strength).

This problem seems so deceptively easy that it reminds me of the first time I saw the Monty Hall Problem. I assume that as I was then I'm wrong now. So what am I missing?
  • 2

User avatar
cmsellers
Back-End Admin
Back-End Admin
 
Posts: 9316
Joined: Sun Apr 14, 2013 7:20 pm
Location: Not *that* Bay Area
Show rep
Title: Broken Record Player

Re: Ask a Mathematician

Postby A Combustible Lemon » Sat Dec 10, 2016 8:21 am

Spoiler: show
E(Peace, A) = 1 * P(A>B) * P (Peace, B) + 2 * P(A > B) * P(War, B) + 1 * P(A<B) * P(Peace, B)
= (1-A) * Pp + 2(1-A)*(1-Pp) + A*(Pp) = Pp - APp +2 -2A - 2Pp + 2APp +APp = (2 -2A - Pp +2 APp)

E(War, A) = 2 P(A>B)(Pp) + 2 P(A>B) (Pw) = 2P(A>B) = 2 - 2A

A should optimally declare war only when the expected value of war is greater than the expected value of peace

2 - 2A > 2 - 2 A - P + 2 A P
0 > 2AP - P
2A - 1 < 0 (probabilities can't be negative)

A < 0.5

if the value of winning is 5

Ep = (1-A)P + 5(1-A)(1-P) + A(P) = P - AP + 5 -5A - 5P + 5AP + AP = 5 - 5A - 4P + 5AP
Ew = 5 - 5A

Ew > Ep
0 > -4P + 5AP
5a < 4
A < 0.8

if B has already declared war, eliminate the P(p,B) elements

E(Peace, A) = 2 * P(A > B) * P(War, B) = 2(1-A) = 2 -2A

E(War, A) = 2 * P(A>B) = 2 - 2A

Ew is equal to Ep
A is going to war, it's irrelevant whether or not it declares war.

if B has already declared peace, elminate P(w,B)

E(Peace, A) = 1 * P(A>B) * P (Peace, B) + 1 * P(A<B) * P(Peace, B)
= (1-A)P + (A)P = P = 1

E(War, A) = 2 P(A>B)(Pp) + 2 P(A>B) (Pw) = 2P(A>B) = 2 - 2A

so Ew > Ep only when 2 - 2A > 1

2A < 1
A < 0.5

edit: last one's weird, I'd double check it but I'm bored now.
double edit: just noticed a bunch of flipped >. apparently they're all weird, so either I'm completely wrong or the likely weaker one should attack.

triple edit, just to verify

expected value of A declaring war given A has 0.25 army would be
if A wins, 2 trillion, if A loses, 0
A has a 0.25 chance of winning, so 0.5
expected value of A declaring peace given A has 0.25 army would be
if B is also at peace, 1 trillion, if B declares war, and A wins, 2 trillion, if B declares war, and A loses, 0
1 trillion * Probability B declares peace + (2 (0.25) + 0 (0.75)) * Probability B declares war
P + 0.5(1-P) = 0.5P + 0.5

Ew = 0.5
Ep = 0.5(1+P)
sooo Ep > Ew...
yep, I was completely wrong there, something went wrong somewhere because keyboard typing a bunch of functions is the most annoying thing in the world

quardruple edit: real solution on next page
  • 1

Last edited by A Combustible Lemon on Sat Dec 10, 2016 8:54 am, edited 2 times in total.


WE ARE ALL FLOATING IN THE WINDS OF TIME. BUT YOUR CANDLE WILL FLICKER FOR SOME TIME BEFORE IT GOES OUT -- A LITTLE REWARD FOR A LIFE WELL LIVED. FOR I CAN SEE THE BALANCE AND YOU HAVE LEFT THE WORLD MUCH BETTER THAN YOU FOUND IT, AND IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT...
User avatar
A Combustible Lemon
TCS Regular
TCS Regular
 
Posts: 486
Joined: Thu Sep 25, 2014 7:25 pm
Location: The Internet, India
Show rep
Title: Grenadier

Re: Ask a Mathematician

Postby cmsellers » Sat Dec 10, 2016 8:34 am

I think you're confirming that my answer to the main question is correct, demonstrating that it really is as easy as it looks (even if I didn't prove it with formal math).

If I'm following the next part of your answer correctly, you set the value of peace with a 5 trillion pot at 4, but shouldn't it be 2.5? (Or am I misunderstanding what you're doing.

And I'm still convinced that the answer to "when should you choose war when the other party chose peace" is A > .25, though I have no idea how I'd prove that mathematically.
  • 0

User avatar
cmsellers
Back-End Admin
Back-End Admin
 
Posts: 9316
Joined: Sun Apr 14, 2013 7:20 pm
Location: Not *that* Bay Area
Show rep
Title: Broken Record Player

PreviousNext

Who is online

Users browsing this forum: No registered users and 4 guests

cron