diff --git a/.ipynb_checkpoints/Rosen12-3-checkpoint.ipynb b/.ipynb_checkpoints/Rosen12-3-checkpoint.ipynb index 5e98d9690201cccdbccb6c79f7aaa514acd7803c..530454db6bf5890ff5fd5054cfcd525c005b9f00 100644 --- a/.ipynb_checkpoints/Rosen12-3-checkpoint.ipynb +++ b/.ipynb_checkpoints/Rosen12-3-checkpoint.ipynb @@ -294,7 +294,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 1, "id": "44991d26-ebed-44ad-9883-e49b90842e8e", "metadata": {}, "outputs": [], @@ -304,7 +304,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 2, "id": "a05c12c9-9df9-464d-b932-62a81a1d4429", "metadata": {}, "outputs": [], @@ -316,7 +316,15 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": null, + "id": "7ffc1d57-0784-4119-825f-32f5459cc945", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 5, "id": "1f050106-4454-441f-ab17-869bb1e7deb9", "metadata": {}, "outputs": [ @@ -328,7 +336,7 @@ " (-0.6299605249474365? + 1.091123635971722?*I, 1)]" ] }, - "execution_count": 42, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -339,7 +347,58 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 7, + "id": "3327b8b5-8e8e-4f34-97d0-8b24e06410e2", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1.259921049894873?" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa0=f0.roots()[0][0]\n", + "alfa0" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "4ddb6330-657c-4387-b902-6e055b0097b0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1; 3, 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, ...]" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "continued_fraction(alfa0)" + ] + }, + { + "cell_type": "raw", + "id": "d800b558-13db-47be-be2c-a1a878594129", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": 9, "id": "78e5e15c-0cc0-4dff-a8a2-5693f4b4a339", "metadata": {}, "outputs": [ @@ -349,7 +408,7 @@ "x^3 - 3*x^2 - 3*x - 1" ] }, - "execution_count": 46, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -386,7 +445,29 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 10, + "id": "c54abfa7-4930-4a3f-9c2c-3bf05d5b32a0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[3; 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, ...]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa1=f1.roots()[0][0]\n", + "continued_fraction(alfa1)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, "id": "5801d40e-a2a8-46e9-bdd9-39b33d52f83f", "metadata": {}, "outputs": [ @@ -396,7 +477,7 @@ "10*x^3 - 6*x^2 - 6*x - 1" ] }, - "execution_count": 48, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -410,7 +491,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 13, "id": "c4c0bc9d-9bbf-4d8d-b063-d1dc78245ff6", "metadata": {}, "outputs": [ @@ -422,7 +503,7 @@ " (-0.2900943677742046? + 0.02403056328910778?*I, 1)]" ] }, - "execution_count": 49, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -433,7 +514,29 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 14, + "id": "c049c466-ebf9-4853-9ebf-2be2a169b069", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1; 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, ...]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa2=f2.roots()[0][0]\n", + "continued_fraction(alfa2)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, "id": "9953eae5-e5d1-48f6-bda3-e464b1a6c6c1", "metadata": {}, "outputs": [ @@ -443,7 +546,7 @@ "3*x^3 - 12*x^2 - 24*x - 10" ] }, - "execution_count": 50, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -457,7 +560,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 17, "id": "0a66ff0f-dc17-42ae-b8ee-6535c8541aac", "metadata": {}, "outputs": [ @@ -469,7 +572,7 @@ " (-0.7748682428911940? + 0.01443345604526783?*I, 1)]" ] }, - "execution_count": 51, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -480,7 +583,29 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 18, + "id": "b4fc68d2-c006-43ce-945d-f809360adb11", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[5; 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, 3, ...]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa3=f3.roots()[0][0]\n", + "continued_fraction(alfa3)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, "id": "0c50aa3c-5f4c-4d34-bc2f-a5de911952b9", "metadata": {}, "outputs": [ @@ -490,7 +615,7 @@ "55*x^3 - 81*x^2 - 33*x - 3" ] }, - "execution_count": 52, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -504,7 +629,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 21, "id": "d99ecd1d-0a85-4ebb-a69b-546456037c87", "metadata": {}, "outputs": [ @@ -516,7 +641,7 @@ " (-0.1731630422019992? + 0.00043279622203746?*I, 1)]" ] }, - "execution_count": 53, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -525,6 +650,28 @@ "f4.roots()" ] }, + { + "cell_type": "code", + "execution_count": 22, + "id": "c72bd901-5e62-4abf-ab21-758fc8a6d91d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1; 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, 3, 4, ...]" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa4=f4.roots()[0][0]\n", + "continued_fraction(alfa4)" + ] + }, { "cell_type": "code", "execution_count": 54, diff --git a/Rosen12-3.ipynb b/Rosen12-3.ipynb index 5e98d9690201cccdbccb6c79f7aaa514acd7803c..530454db6bf5890ff5fd5054cfcd525c005b9f00 100644 --- a/Rosen12-3.ipynb +++ b/Rosen12-3.ipynb @@ -294,7 +294,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 1, "id": "44991d26-ebed-44ad-9883-e49b90842e8e", "metadata": {}, "outputs": [], @@ -304,7 +304,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 2, "id": "a05c12c9-9df9-464d-b932-62a81a1d4429", "metadata": {}, "outputs": [], @@ -316,7 +316,15 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": null, + "id": "7ffc1d57-0784-4119-825f-32f5459cc945", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 5, "id": "1f050106-4454-441f-ab17-869bb1e7deb9", "metadata": {}, "outputs": [ @@ -328,7 +336,7 @@ " (-0.6299605249474365? + 1.091123635971722?*I, 1)]" ] }, - "execution_count": 42, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -339,7 +347,58 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 7, + "id": "3327b8b5-8e8e-4f34-97d0-8b24e06410e2", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1.259921049894873?" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa0=f0.roots()[0][0]\n", + "alfa0" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "4ddb6330-657c-4387-b902-6e055b0097b0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1; 3, 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, ...]" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "continued_fraction(alfa0)" + ] + }, + { + "cell_type": "raw", + "id": "d800b558-13db-47be-be2c-a1a878594129", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": 9, "id": "78e5e15c-0cc0-4dff-a8a2-5693f4b4a339", "metadata": {}, "outputs": [ @@ -349,7 +408,7 @@ "x^3 - 3*x^2 - 3*x - 1" ] }, - "execution_count": 46, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -386,7 +445,29 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 10, + "id": "c54abfa7-4930-4a3f-9c2c-3bf05d5b32a0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[3; 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, ...]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa1=f1.roots()[0][0]\n", + "continued_fraction(alfa1)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, "id": "5801d40e-a2a8-46e9-bdd9-39b33d52f83f", "metadata": {}, "outputs": [ @@ -396,7 +477,7 @@ "10*x^3 - 6*x^2 - 6*x - 1" ] }, - "execution_count": 48, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -410,7 +491,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 13, "id": "c4c0bc9d-9bbf-4d8d-b063-d1dc78245ff6", "metadata": {}, "outputs": [ @@ -422,7 +503,7 @@ " (-0.2900943677742046? + 0.02403056328910778?*I, 1)]" ] }, - "execution_count": 49, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -433,7 +514,29 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 14, + "id": "c049c466-ebf9-4853-9ebf-2be2a169b069", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1; 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, ...]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa2=f2.roots()[0][0]\n", + "continued_fraction(alfa2)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, "id": "9953eae5-e5d1-48f6-bda3-e464b1a6c6c1", "metadata": {}, "outputs": [ @@ -443,7 +546,7 @@ "3*x^3 - 12*x^2 - 24*x - 10" ] }, - "execution_count": 50, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -457,7 +560,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 17, "id": "0a66ff0f-dc17-42ae-b8ee-6535c8541aac", "metadata": {}, "outputs": [ @@ -469,7 +572,7 @@ " (-0.7748682428911940? + 0.01443345604526783?*I, 1)]" ] }, - "execution_count": 51, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -480,7 +583,29 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 18, + "id": "b4fc68d2-c006-43ce-945d-f809360adb11", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[5; 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, 3, ...]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa3=f3.roots()[0][0]\n", + "continued_fraction(alfa3)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, "id": "0c50aa3c-5f4c-4d34-bc2f-a5de911952b9", "metadata": {}, "outputs": [ @@ -490,7 +615,7 @@ "55*x^3 - 81*x^2 - 33*x - 3" ] }, - "execution_count": 52, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -504,7 +629,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 21, "id": "d99ecd1d-0a85-4ebb-a69b-546456037c87", "metadata": {}, "outputs": [ @@ -516,7 +641,7 @@ " (-0.1731630422019992? + 0.00043279622203746?*I, 1)]" ] }, - "execution_count": 53, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -525,6 +650,28 @@ "f4.roots()" ] }, + { + "cell_type": "code", + "execution_count": 22, + "id": "c72bd901-5e62-4abf-ab21-758fc8a6d91d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1; 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, 3, 4, ...]" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alfa4=f4.roots()[0][0]\n", + "continued_fraction(alfa4)" + ] + }, { "cell_type": "code", "execution_count": 54,