There are some daily Youtubers who write out their symbolic solutions to a short straight-forward (non-quiz like type) math problem. Oftentimes Mathematica can solve those problems too. Maybe we could share here the ones which our software cannot solve easily?
Problem#1.
Let me go first. In the “Putnam Exam 2004 | B5” video the youtuber claims that L = \frac{2}{e}
Imho the Wolfram L code for this expression should be:
Limit[Product[((1 + x^(n + 1))/(1 + x^n))^(x^n), {n, 0, Infinity}], x -> 1, Direction -> "FromBelow"]
However, Mathematica computes forever without returning a result, i must abort the computation. Maybe my code line is wrong, can you get the desired result?
Obviously this (hopefully collective) thread (feel free to memorize the short-URL, if you can’t follow/subscribe to the thread for updates) is nothing urgent. It is entertaining to let Mathematica have a crack at such symbolic math problems which get ten thousands of views within a week. Thanks for taking an interest!
Commenting the OddQ[] part outputs all solutions, from which one could pick the odd y solution, namely y=57:
In[1]:= FindInstance[{(*OddQ[y] == True,*) 0 <= x <= 100, 0 <= y <= 100, 1/x + 4/y == 1/12}, {x, y}, Integers, 100]
Out[1]= {{x -> 24, y -> 96}, {x -> 28, y -> 84}, {x -> 30, y -> 80}, {x -> 36, y -> 72}, {x -> 44, y -> 66}, {x -> 48, y -> 64}, {x -> 60, y -> 60}, {x -> 76, y -> 57}, {x -> 84, y -> 56}}
But when I uncomment in the above code, there is no result. Basically I am asking: How do we define in set of equations a variable to assume odd integer values only, for use in mathematical expressions or equations withinSolve[], Reduce[], Simplify[], FindInstance[]etc.?
In my day job writing and optimizing SQL, I run into interesting situations like this all the time. The direct and logical approach just doesn’t work, or doesn’t work in a reasonable amount of time.
In those situations, I have found that I can sometimes get what I need by first getting more than I need and then filtering, What amazes me most is that sometimes I can get what I need sub-second using the round-about approach when the direct and logical approach can run for hours.
Using this indirect approach, I think this solves this problem:
@Mike Thanks for your post and workaround code! I absolutely understand what you mean with generating the full set and then filtering the solution. I used this approach a lot in the stochastics text project which I was working on for 7.0 months (completed in mid April, some 800-1000 pages total).
Looks like our legendary Rohit has beaten us to it, I will try to remember the trick of defining an odd number through the Mod function, thank you @Rohit, works like a charm! See you guys in the next problem
However, Mathematica outputs the integral uncomputed and the NIntegrate[] function returns the positive value 0.4375. WolframAlpha outputs 0.4375 for the value of the integral, too. Did I make a user error or is our software indeed wrong?