>From mailnull Wed Jan 30 21:54:31 2013
Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of math.utexas.edu designates 146.6.25.7 as permitted sender) client-ip=146.6.25.7; envelope-from=maxima-bounces at math.utexas.edu; helo=ironclad.mail.utexas.edu;
Date: Wed, 30 Jan 2013 13:54:08 -0800
From: VicTT <victhetraitor at yahoo.com>
Reply-To: VicTT <victhetraitor at yahoo.com>
Content-Type: multipart/mixed;
boundary="===============4466812856504195392=="
--===============4466812856504195392==
Content-Type: multipart/alternative;
boundary="1091002116-1226810713-1359582848=:38676"
--1091002116-1226810713-1359582848=:38676
Content-Type: text/plain; charset="us-ascii"
I'll keep this short in the interest of preserving your time:
I'm trying to find min(k) such that, given integers: x,r and rational epsilon, abs(x^(p/(2^k)-x^(1/r))<epsilon.
Then, given integers: x,r,min(k) and rational epsilon, find p in the above inequality.
How would I do this in Maxima? (first step is, I assume, rewriting this as an equality *somehow*)
Also, if anyone knows any 3rd party add-ons that could solve this, I'd appreciate the contribution. I'm missing something, I just can't tell what.
(This is neither homework, nor a task I've devoted less than 1 hour towards achieving.)
Thank you in advance,
Pirvu Paul Daniel
If I understand correctly, you are attempting to approximate 1/r by
dyadic rationals (p/2^k). Let's write
1/r = sum(p[i]/2^i,i,0,inf);
as a binary expansion (each digit p[i] is a 0 or 1).
Then, if you define
p_k = sum(p[k-i]*2^i,i,0,k);
you see
0 >= 1/r - p_k/2^k >= 1/2^k
and there are no other dyadic rationals of the form p/2^k that are
closer to 1/r and less than 1/r; only (1+p_k)/2^k might be closer (but
it will be larger than 1/r). This gives you an effective algorithm to
solve your problem: you will find p and k simultaneously.
Other folks have shown how to translate your epsilon into a bound for
the above inequality.
HTH
Leo