mersenneforum.org Farmer Fred's funky field
 Register FAQ Search Today's Posts Mark Forums Read

2021-09-06, 18:07   #56
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

255C16 Posts

Quote:
 Originally Posted by Dr Sardonicus ...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.

2021-09-06, 19:05   #57
Dr Sardonicus

Feb 2017
Nowhere

23×7×89 Posts

Quote:
 Originally Posted by Batalov 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

2021-09-06, 22:45   #58
Uncwilly
6809 > 6502

"""""""""""""""""""
Aug 2003
101×103 Posts

22×41×61 Posts

Quote:
 Originally Posted by firejuggler Also, the suez canal cut the Afro-Eurasia continent
You didn't hear about the Evergreen fence that was built recently?

2021-09-06, 23:58   #59
PhilF

"6800 descendent"
Feb 2005

23·5·17 Posts

Quote:
 Originally Posted by a1call 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."

 Similar Threads Thread Thread Starter Forum Replies Last Post kladner Reading 20 2021-03-23 17:05 carpetpool Abstract Algebra & Algebraic Number Theory 3 2017-11-15 14:37 paul0 Programming 6 2015-01-16 15:12 davar55 Lounge 9 2008-08-25 00:22 Numbers Puzzles 10 2005-12-31 10:07

All times are UTC. The time now is 17:21.

Wed Oct 20 17:21:54 UTC 2021 up 89 days, 11:50, 0 users, load averages: 1.81, 1.58, 1.44