mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2021-09-06, 18:07   #56
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

52×383 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
...I don't know a closed-form solution, so I used Newton's method to obtain a numerical solution.
The final touch is using solve(x=A,B,f(x))
Bracket the root [A,B], set the wanted precision \p 50 and it will solve it.
Batalov is offline   Reply With Quote
Old 2021-09-06, 19:05   #57
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

32·557 Posts
Default

Quote:
Originally Posted by Batalov View Post
The final touch is using solve(x=A,B,f(x))
Bracket the root [A,B], set the wanted precision \p 50 and it will solve it.
Well, I'll be. I was not aware of this Pari function! According to the manual, it uses Brent's Method, which I also was unaware of. I've learned two things from your response!



Hmm, function has to be defined everywhere between A and B, and f(A)*f(B) has to be negative. Let's see here. For any positive L, f(\theta)\;=\;\tan(\theta)(\pi\;+\;2\theta)\;-\;L\text{ is negative at }\theta\;=\;0.

Clearly f is strictly increasing and tends to +\infty\text{ as }\theta\;\rightarrow \;\frac{\pi}{2}^{-} so is positive for large enough \theta\text{ in }(0,\;\frac{\pi}{2}).

For any L > 0, f = 0 has a unique root between 0 and \frac{\pi}{2}.

For L = 4, f\(\frac{\pi}{4}\)\;=\;\frac{3\pi}{2}\;-\;4\;>\;0 so A = 0 and B = \frac{\pi}{4} bracket the root.

Code:
? \p50
   realprecision = 57 significant digits (50 digits displayed)

? solve(t=0,Pi/4,tan(t)*(Pi+2*t) - 4)
%1 = 0.71813340130850774559009248053397820152280883833101
Dr Sardonicus is offline   Reply With Quote
Old 2021-09-06, 22:45   #58
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

1002710 Posts
Default

Quote:
Originally Posted by firejuggler View Post
Also, the suez canal cut the Afro-Eurasia continent
You didn't hear about the Evergreen fence that was built recently?
Uncwilly is online now   Reply With Quote
Old 2021-09-06, 23:58   #59
PhilF
 
PhilF's Avatar
 
"6800 descendent"
Feb 2005
Colorado

2AA16 Posts
Default

Quote:
Originally Posted by a1call View Post
I think her name is Wilma. As for the pleasant evening, I wouldn’t count on that.
Still, I really like his play on words:

Quote:
Originally Posted by retina
"I think Farmer Fred will have a very pleasant evening after erecting the fence."
PhilF is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chernobyl -Fred Pohl kladner Reading 20 2021-03-23 17:05
Finite field extensions carpetpool Abstract Algebra & Algebraic Number Theory 3 2017-11-15 14:37
GCD of Polynomials over a finite field for NFS paul0 Programming 6 2015-01-16 15:12
Fred Flame Charges davar55 Lounge 9 2008-08-25 00:22
The Chicken farmer from Minsk Numbers Puzzles 10 2005-12-31 10:07

All times are UTC. The time now is 06:18.


Thu Oct 28 06:18:15 UTC 2021 up 97 days, 47 mins, 0 users, load averages: 1.61, 1.85, 1.77

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.