« first day (1266 days earlier)      last day (2389 days later) » 

6:11 PM
@Mithrandir24601 @DonaldSplutterwit @heather Idk what we're doing today, but hi
 
@SimplyBeautifulArt Rytsas!
 
Heyo
I feel like doing something non-calculus based today
Or rather
an application of calculus on something else
 
@SimplyBeautifulArt sure - any ideas?
 
Well, since its something I've been thinking about recently, I want to talk about fixed-points and numerical methods
 
if that's what counts as an application in maths, then fair enough :P
 
6:19 PM
:P
 
6:57 PM
I'm cool with whatever you fancy telling us ... continued fractions ... the non trivial zeros of the zeta function ... homotopy groups of spheres ... whatever Chief !
 
lol
I was just going to go over boring old "how can you approximate $\sqrt2$"?
 
Pell's equation ... I could find that intresting at any time :P
Maybe start with roots of rationals & then go on ... to ?
 
^ Now that's an application! :P
 
There are some cool continued fractions for $e^x$
I think I saw a good on for the gamma function recently ... let me see
In mathematics, the upper incomplete gamma function and lower incomplete gamma function are types of special functions, which arise as solutions to various mathematical problems such as certain integrals. Their respective names stem from their integral definitions, which are defined similarly to the gamma function, another type of special function, but with different or "incomplete" integral limits. The gamma function is defined as an integral from zero to infinity. This contrasts with the lower incomplete gamma function, which is defined as an integral from zero to a variable upper limit. Similarly...
Yeah explain Gauss's continued fraction to us SBA
 
7:06 PM
Lol
It just requires proving a functional equation and iterating over it
 
Oh well ... that explains that ... cool ... you have about 2 hours to find something else then ... :-)
 
lol
Well I'm mostly interested in finding something I think heather will be able to understand
@DonaldSplutterwit @Mithrandir24601 How would you go about computing $\sqrt2$?
 
Whatever you think ... Me & @Mithrandir24601 will be cool with whatever ?
 
I'm just interested in whether or not you two know any ways to compute things like this
 
I would type SQRT 2 into my OX-240 and read off 1.4142...
 
7:15 PM
lol
No, I mean how would you compute it using a calculator that only has addition, multiplication, subtraction, and division
4 function calculator
 
@SimplyBeautifulArt To be honest, I don't... Normally, I'd just use a calculator or the computer. If necessary, I'd probably just use a series expansion
@SimplyBeautifulArt There's an algorithm for this :)
 
@Mithrandir24601 there's many algorithms for this :P
 
I would calculate the first few convergents of the continued fraction ... probably see 7/5 & say I can do that in my head ... 1.4 (to 2 sig fig)
& check on my OX-240 !!
 
Continued fractions are generally very slow though
$$\sqrt2=1.4+\frac1{70}-\frac1{4900}\pm\frac{3}{343000}$$
Where $\pm$ denotes maximum error
I binomial expanded $\sqrt x$ at $a=1.96=1.4^2$
 
cool ...
 
7:23 PM
Yeah I'm bored :-/
 
I was about to ask ... & then realised ... binomial
 
Well
I've got not much better to do, so here's a challenge if you two want to try it @DonaldSplutterwit @Mithrandir24601
Numerically approximate this integral to 5 significant places
$$\int_0^\infty\frac{\sin(\pi x)}{\ln(x)}~{\rm d}x$$
 
@SimplyBeautifulArt I've started thinking about the most efficient way to do this on a quantum chip...
 
@Mithrandir24601 Newton's method is usually the preferred approach
 
That's what I would do classically... But is there a more efficient quantum way?
 
7:27 PM
there is a singularity at $1$ ... and interval is quite large (infinte !)
 
@Mithrandir24601 I don't even know how 'quantum chips' affect the problem
 
ooops ... there is not a singularity at 1
 
@DonaldSplutterwit Nah, its a removable singularity
Don't worry about the magnitude of the interval
 
@SimplyBeautifulArt For some problems, the best quantum algorithms are 'better' (quite what 'bett' is, is a bit of a question) than classical ones
 
7:40 PM
@DonaldSplutterwit :P Having fun with that horribly slow converging integral?
I should have the integral evaluated out almost 10 places
Oh, not 10
But definitely 5
 
@SimplyBeautifulArt My choices here really are: doing it in my head (definitely not even going to attempt that), writing a program or using mathematica...
 
@Mithrandir24601 Bet you can't get a program to approximate that integral to 5 places
:D
 
@SimplyBeautifulArt Oh no... You just had to say that... :P
 
Okay, maybe not 5 places
Bet you can't do 10 places
Lmao
WA says it diverges
 
... Although I've just noticed that I've already got a program that calculates square roots, so that's what I'd use to get $\sqrt 2$
Hmm... It actually uses 3 different ways of doing so :P
 
7:50 PM
@Mithrandir24601 :P
 
@SimplyBeautifulArt Numerically integrating it works though :)
(NIntegrate on Mathematica)
 
@Mithrandir24601 Doubt you'll get anywhere near 5 places, let alone 10 places
 
-3.21919 apparently
or in more digits: -3.219189999895627
 
@Mithrandir24601 Wrong
 
@SimplyBeautifulArt :o Bad Mathematica!
 
7:56 PM
Half-decent approximation though
You did numerical integration?
 
@SimplyBeautifulArt Yeah
 
Dang, that's a lot of places accurate for a numerical integration
 
@SimplyBeautifulArt What's it accurate to?
 
Error is between $10^{-6}$ and $10^{-5}$
Believe I've got 12 places out right now
Give up yet?
 
@SimplyBeautifulArt Well, I never got round to trying to write a program as I got side-tracked by Mathematica :P
 
8:07 PM
:P
 
I am trying various different methods in mathematica and they do have a tendency to give up :P
Ooh, how about -3.219189637131119?
 
Meh, not really better than the last one
 
Aww :/
Heh. Adaptive Quasi Monte Carlo gave me -79901.4...
 
To be fair, it did estimate an error almost as big as the value :P
 
8:14 PM
xD
 
This is an interesting one: arxiv.org/pdf/1510.04452.pdf
 
8:29 PM
Huh
I've got 13 places out on my integral
 
8:49 PM
\begin{align}\int_0^\infty\frac{\sin(\pi x)}{\ln(x)}~{\rm d}x&\approx\int_0^{50}\frac{\sin(\pi x)}{\ln(x)}~{\rm d}x+\sum_{n=0}^{19}\frac1{2^{n+1}}\sum_{k=0}^n\binom nk(-1)^k\int_0^1\frac{\sin(\pi t)}{\ln(t+k+50)}~{\rm d}t\\&\approx\underline{-3.219190038646}743\end{align}
@Mithrandir24601 @DonaldSplutterwit that's my approximation
 
9:47 PM
Sorry Chaps... been busy expressing permutations in terms of $4$-cycles math.stackexchange.com/questions/2472431/…
3-2-1 .. I am back in the room ... right calculus @heather @SimplyBeautifulArt @Mithrandir24601 ... ready when you are ?
 
idk where they are
 
They have probably followed my link ... & are trying to express permutations in terms of $4$-cycles ... they will be busy for a while ! ... lol ... @heather @Mithrandir24601
 
lol
Well, how would you approximate the solution to $$x=-2^x$ @DonaldSplutterwit
 
That Integral was too bonkers for me ... seemed quite arbitrary to break at 19 & 50
 
Lol
Yeah, the choice of 50 and 19 were somewhat arbitrary
 
9:57 PM
$x=-2^x$ ... can this be solved exactly using the Lambert function ? ... let me think
 
desmos.com/calculator/5mp0risqyx ... cheat ? $x=0.641$
But how would I get the approximation using pen & paper ?
 
@SimplyBeautifulArt I'm here, just making tea :)
 
@DonaldSplutterwit -0.641
 
So we know -16/25 is a good approx ... but how would we magic that ?
 
10:06 PM
@DonaldSplutterwit I'll allow you to use a 5 function calculator. +,-,x,÷,2^
 
yo .... @Mithrandir24601 Thank goodness ... SBA is asking hard questions ! ... help ?
 
xD
Provide an algorithm that approximates the solution to $x=-2^x$ to arbitrary accuracy, and compute the solution to 10 places.
 
@DonaldSplutterwit First thing - how does x scale with increasing x (yes, really) and how does $2^x$ scale with increasing x?
 
I'll be back in about 20 min
 
Also: @heather !!
(this has nothing to do with getting an algorithm, just how you'd guess the value)
 
10:12 PM
OK @Mithrandir24601 What do you mean by scale ? ... we have 20 mins, how can we take a good approx & algoritmically get better ones ?
 
@DonaldSplutterwit so, you wanted to know how we 'magic' -16/25
 
Yes ... I cheated ... see the desmos link
but now we know -16/25 ... how do we get better ?
 
@DonaldSplutterwit OK, assuming that, it's an algorithm, so the first thing you want is an iterative approach, right?
 
@DonaldSplutterwit So, I don't know about this specific equation, but the first thing I'd generally do is known as the Newton-Raphson method
Have you ever heard of it?
 
10:21 PM
Just tried iterating $-2^{x_n} $ ... glacially slow convergence ... SBA would be sad ? :-(
 
Only 21 minutes late, @heather !
 
i know, i'm so sorry.
 
... the NR iteration method ... yes I used to teach it 15 years ago ...
 
my mom dragged me along on errands.
 
@heather it's fine :P I'm just trying out one of many methods that I only recently learned to try to get people to do things like appear on time :P
@DonaldSplutterwit Well... That makes things slightly easier in terms of explanations... :P Does it work?
 
10:24 PM
@heather cool ... you are here ... SBA will be back shortly ... we must aprrox $x=-2^x$
 
(In this specific case)
 
We must have an approx to 87 sig fig before he returns !
 
hoo boy
 
@heather Have you done any of these types of things before?
 
nope. i have an idea (probably wrong) for how to approach it, though.
 
10:27 PM
@heather What's your idea?
 
@Mithrandir24601 can you remind us how the Newton-Raphson method works ?
 
if you take the derivative of both sides, you get $1 = -2^x\log 2$, or $\frac{1}{\log 2} = -2^x$ or, let me think
$-\frac{1}{\log 2} = 2^x$
or
 
@heather This looks right, but where would you go from there?
 
$\log_2( -\frac{1}{\log 2}) = x$
i think
 
@DonaldSplutterwit yeah I'd be sad
 
10:33 PM
which google says is $1.73202085 + 4.53236014 i$?
 
@heather Which is unfortunately wrong... Why?
 
@DonaldSplutterwit Yeah I'd be sad if that were all you could think of
 
I'm not sure why it has $i$ in it.
but i don't have much experience with logarithms, so i don't know.
 
@heather might be because of the - sign
 
@heather Try log_2(-1/ln(2))
 
10:35 PM
it says
$0.528766373 + 4.53236014 i$
 
@SimplyBeautifulArt we have nearly nailed the Newton-Rhapson method ... we will have an approx to 87 sig fig shortly ?
 
Oh right, we're stupid lol
@heather We're not solving for $x$, we're solving for $dy/dx$
@DonaldSplutterwit lol, okay
I asked for 10 figs... but 87 is good too
 
@SimplyBeautifulArt oh, so then the derivative of that
 
Gotta go eat
 
erm, no, nvm
 
10:37 PM
See if you can tell me how fast it converges if you iterate -2^x
 
but i did take the derivative, just to solve for $x$
 
How fast does it converge if you use Newton's?
 
@heather So what's $\log\left(2^x\right)$?
 
$x_{n+1}=x_n -\frac{f(x_n)}{f'(x_n)}$ where $f(x)=x+2^x$
 
Something like $x-x_n=\mathcal O(10^{-n})$
 
10:37 PM
@DonaldSplutterwit yeah, this
 
@Mithrandir24601 google's giving me a graph.
 
@heather Yeah, so what's happened (I believe) is that you've found the stationary point of the equation
So, I'll explain Newton-Raphson
@DonaldSplutterwit OK - take a function $f(x)$ and Taylor expand about $x_0$ to get $f(a) = f\left(x_0\right) + f'\left(x_0\right)\left(a-x_0\right) + O\left(x_0^2\right)$
 
taylor expand to the first order ...
 
@DonaldSplutterwit yep. Then, at the point where $f(a) = 0$ i.e. $a$ is the number we're looking for, $f\left(x_0\right) + f'\left(x_0\right)\left(a-x_0\right) \approx 0$
which gives $$a \approx x_0 - \frac{f\left(x_0\right)}{f'\left(x_0\right)}$$
 
$x_{n+1}=x_n-\lfrac{x+2^x}{1+ \ln(2) 2^x}$ ... rapidly gives ?
 
10:51 PM
O.o
well, how are we doing?
 
Only now, $a$ is our next iteration, i.e. $a=x_1$ and we repeat the process to get $$x_{n+1} = x_n - \frac{f\left(x_n\right)}{f'\left(x_n\right)}$$
@SimplyBeautifulArt Slowly, but we're hopefully getting there...
Is everyone with me so far?
 
Stupid gifs
It's a root finding algorithm
You take a point
draw the tangent against it
Find where the tangent crosses the x-axis
That's your new point, rinse and repeat
:D
 
-0.641185744 ... to 9/10 sig fig ... best my OX-240 will do ?
 
Here's the solution I have
-0.641185744505
 
By the way 641 is special ... it is 2^4+5^4 and is the first time a fermat is composite
 
10:58 PM
:|
:I
:P
Well
Are we still having confusions with Newton's method? @DonaldSplutterwit @heather
 
i'm still a bit confused, yeah.
let me read through it again.
 
Fermat conjectured that 2^{2^n}+1 was prime for all n ... it is wrong ... for n=5 ... 641 is a factor
 
@SimplyBeautifulArt what language is that key in?
 
Sorry guys ... never meant to kill the thread with a number theory observation ...
 
@SimplyBeautifulArt No idea man
 
11:06 PM
@DonaldSplutterwit Nah, I was just dosing myself with paracetamol and antibiotics :/
Which my body naturally tried to cough up on me :(
 
I am worried about you guys ? ... SBA is talking to himself & you are self medicaticting ?
 
Don't worry, it's fine @DonaldSplutterwit
 
@DonaldSplutterwit All on the Doctor's orders, don't worry :P
 
:-/
*::Twiddles his thumbs::*
 
breathes in
...
breathes out
coughs
 
11:10 PM
Let's do some continued fractions ? ... that will cheer everyone up ?
 
Sure...
I actually wanted to wrap up the iteration stuff for today
@Mithrandir24601 @DonaldSplutterwit You know how to find the rate at which it converges to our -0.641185744505?
Let's suppose we want to do: x_0 = 0 and x_n+1 = Newton(x_n)
What's the asymptotic behavior of (x - x_n) as n → ∞
 
@SimplyBeautifulArt ... good place to end ... we have all gone slightly bonkers ?
 
@DonaldSplutterwit No, I'm actually ill :(
 
@Mithrandir24601 Get better then
 
11:14 PM
Although I probably went bonkers years ago :P
@SimplyBeautifulArt I'm trying! :P
 
@Mithrandir24601 :D
@Mithrandir24601 trying isn't good enough!
 
Oh I am sorry to hear that ... GWS ?
 
Well
Did you guys know that Newton's method usually converges quadratically?
And do you guys know what this means!?
 
@DonaldSplutterwit Thanks. Hopefully will. If it's not better by Monday, I don't know what the GP will do with me :/
@SimplyBeautifulArt Rings a bell, yeah
 
I know it converges quickly ... would need to think about quantifying the speed ?
 
11:17 PM
Well, all it means is that:
(x - x_n+1) = a * (x - x_n)^2 + O((x - x_n)^3)
For some constant a
And if (x - x_n) ≈ 10^-k, then (x - x_n+1) ≈ a * 10^-2k
That is, the amount of accurate digits approximately doubles per iteration
@DonaldSplutterwit D: Cuz that's what an analytic person should do? :P
 

« first day (1266 days earlier)      last day (2389 days later) »