Please Some one give me the specific procedure . I'm confused because it's not the normal form . thanks
Hello, wsc810!
I have a solution, but it might not be acceptable.
$\displaystyle \text{Find the continued fraction for: }\:\dfrac{65 - \sqrt{44}}{37}$
I made two continued fractions.
$\displaystyle \displaystyle\text{We have: }\:\frac{65}{37} \;=\;1 + \frac{1}{1 + \frac{1}{3 +\frac{1}{9}}}$
. . $\displaystyle \text{ which can be written: }\,\frac{65}{37} \:=\:[1,1,3,9]$
$\displaystyle \displaystyle \text{We have: }\frac{\sqrt{44}}{37} \:=\:\frac{2}{37}\sqrt{11}$
$\displaystyle \displaystyle \text{And: }\:\sqrt{11} \;=\;3 + \frac{1}{3 + \frac{1}{6 + \hdots}}} $
. . $\displaystyle \text{which can be written: }\,\sqrt{11} \:=\:(\overline{3,3,6})$
$\displaystyle \displaystyle \text{Therefore: }\:\frac{64-\sqrt{44}}{37} \;=\;[1,1,3,9] - \tfrac{2}{37}(\overline{3,3,6}) $
@wsc810 -- Your textbook should have a section that describes how to convert a general irrational number into a continued fraction. If so, just follow the instructions and apply them to your number. I'll give the steps needed to derive the first two partial quotients. You should be able to take it from there.
Let $\displaystyle \xi_0 = \frac{65 - \sqrt{44}}{37}$. Then the first partial quotient, $\displaystyle a_0$, equals the integer part of $\displaystyle \xi_0$, or, using the floor function,
$\displaystyle \xi_0 = \lfloor\frac{65 - \sqrt{44}}{37}\rfloor$
which can easily be found with a calculator to equal 1. Thus, $\displaystyle a_0 = 1$.
We now define $\displaystyle \xi_1 := \frac{1}{\xi_0 - a_0}$ and $\displaystyle a_1 := \lfloor\xi_1\rfloor$. Therefore, since
$\displaystyle \xi_0 - a_0 = \frac{65 - \sqrt{44}}{37} - 1 = \frac{28 - \sqrt{44}}{37}$
and so
$\displaystyle \xi_1 = \frac{37}{28 - \sqrt{44}} = \frac{1036 + 37\sqrt{44}}{740}$
Thus,
$\displaystyle a_1 = \lfloor\xi_1\rfloor = 1$
which is again a simple calculation.
So your continued fraction begins
$\displaystyle 1 + \frac{1}{1 + \frac{1}{a_2 + \cdots}}$
You should be able to find the remaining partial quotients $\displaystyle a_2, a_3, \cdots$ by recursively defining
$\displaystyle a_i = \lfloor\xi_i\rfloor, \\\ \xi_{i+1} = \frac{1}{\xi_i - a_i}$
Q_0=Q
a_0=[(P a)/Q]
P_0=P
it's the starting value and a=Int(sqrt(d))
$\displaystyle P_{ n 1}=Q_n*a_n - P_n $
$\displaystyle Q_{n 1}=
(d-P_{n 1}^2)/Q_n $
$\displaystyle a_{n 1}=
[(P_{n 1} a)/Q_{n 1}] $
[ *] represents Int(*)
a0=1
P0=65
Q0=37
37*a0 - 65=-28 a0=1
-20*a1-(-28)=8 a1=1
1*a2 -28=6 a2=14
why a2 is not right
the actual vaule is 1 . Mathematica work out expression [1,1,1,2;1,2,1,1,1,12,1,1]
A piece of advise: if you're going to write a lot or some rather involved mathematical
expressions, you better take a peek at the forum's section "Math Resources", subsection
"LaTeX help", and then re-write your stuff using LaTex, otherwise it comes out
too messy and it might be that not many people will even take a look at it.
For example, the following part of you message:
P_{ n + 1}=
Q_n*a_n - P_n
Q_{n + 1}=
(d-P_{n + 1}^2)/Q_n
would come out, using LaTeX, as:
$\displaystyle \displaystyle{P_{n+1}=Q_na_n-P_n\,,\,\,Q_{n+1}=\frac{d-P_{n+1}^2}{Q_n}}$ ,and this is way clearer
and thus much easier to read.
Tonio