{ "cells": [ { "cell_type": "markdown", "id": "f23e223b-2cd6-4cc2-9a5b-f977b8afce01", "metadata": {}, "source": [ "MCS 320 Project Two, due 19 July 2024, at 2pm." ] }, { "cell_type": "markdown", "id": "126e03ec-e97a-49c5-91a4-9b7b9efbaec2", "metadata": {}, "source": [ "# Taylor Series and Derivatives" ] }, { "cell_type": "markdown", "id": "fbb81bb2-9b3c-42ce-b8fb-38a6c245b17b", "metadata": {}, "source": [ " Computing symbolic derivatives may lead to expression swell,\n", "when many higher order derivatives are required. \n", "The $k$-th coefficient of a Taylor series expansion of a function\n", "$f(x)$ at $x=a$ equals\n", "$$\n", " \\frac{f^{(k)}(a)}{k!}\n", "$$\n", "which allows to recover the $k$-th derivative of $f(x)$ at $x=a$." ] }, { "cell_type": "markdown", "id": "db40f7a0-4c6f-44e4-b032-a008eaa29c88", "metadata": {}, "source": [ "In this project, we use SageMath to explore the connection between\n", "derivatives, Taylor series, and the avoidance of expression swell\n", "via the application of Newton's method." ] }, { "cell_type": "markdown", "id": "0832c69f-56fc-4ea8-af50-6fe3b94b9010", "metadata": {}, "source": [ "The output of" ] }, { "cell_type": "code", "execution_count": 1, "id": "8b26b3ed-50a7-4632-b78a-8febe7efb127", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-1/3628800*x^10 + 1/40320*x^8 - 1/720*x^6 + 1/24*x^4 - 1/2*x^2 + 1" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "taylor(cos(x), x, 0, 10)" ] }, { "cell_type": "markdown", "id": "672c3514-a888-41e6-b3bd-254f465b0f5f", "metadata": {}, "source": [ "is identical to" ] }, { "cell_type": "code", "execution_count": 2, "id": "9d71bbb9-134d-4981-aebf-a304cf29f96d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-1/3628800*x^10 + 1/40320*x^8 - 1/720*x^6 + 1/24*x^4 - 1/2*x^2 + 1" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sum([diff(cos(x), x, k).subs(x=0)/factorial(k)*x^k for k in range(11)])" ] }, { "cell_type": "markdown", "id": "1de46a37-6aa7-4508-937d-d72b70011333", "metadata": {}, "source": [ "which shows the first 10 terms of the Taylor series expansion\n", "of $\\cos(x)$ at $x = 0$." ] }, { "cell_type": "markdown", "id": "4a89a376-d518-4f6e-84a6-b99429868fa3", "metadata": {}, "source": [ "## 1. Expression Swell" ] }, { "cell_type": "markdown", "id": "c5edbcbb-981f-48c1-82fe-d8ab047eb08e", "metadata": {}, "source": [ "The straighforward way to symbolically compute a Taylor series expansion\n", "would thus be first compute all symbolic derivatives and then to evaluate \n", "all symbolic derivatives at the same point.\n", "This can lead to expression swell, as we explore in the first assignment." ] }, { "cell_type": "markdown", "id": "a8f4ee56-e56c-4d0a-851d-0b61d0fcd5b3", "metadata": {}, "source": [ "## Assignment One" ] }, { "cell_type": "markdown", "id": "25978664-ee67-4060-a808-1a9cbb2965c0", "metadata": {}, "source": [ "Consider\n", "$$\n", " f(x) = \\sqrt{\\frac{x+1}{x-1}}.\n", "$$\n", "\n", "1. Compute the first 15 derivatives of $f(x)$.\n", "\n", " Describe your observations about the size of the 15-th derivative.\n", "\n", "2. Evaluate the 15-derivative at $x=0$ and compare with the coefficient\n", " of $t^{15}$ in the Taylor expansion of $f(x)$ at $x = 0$.\n", "\n", "\n", " Demonstrate the recovery of $f^{(15)}(0)$ from that coefficient." ] }, { "cell_type": "markdown", "id": "80c0ef28-68a0-44cc-8596-92f5593d79f2", "metadata": {}, "source": [ "## answer to Assignment One" ] }, { "cell_type": "code", "execution_count": 3, "id": "ce2c0af7-eedc-4409-9f4f-7416b963e2f6", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "sqrt((x + 1)/(x - 1))" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "x = var('x')\n", "f = sqrt((x+1)/(x-1))\n", "f" ] }, { "cell_type": "code", "execution_count": 4, "id": "85cf398d-cf06-4650-8990-0c27a621aeb1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-213458046676875/32768*((x + 1)/(x - 1)^2 - 1/(x - 1))^15/((x + 1)/(x - 1))^(29/2) + 830114625965625/8192*((x + 1)/(x - 1)^2 - 1/(x - 1))^13*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)/((x + 1)/(x - 1))^(27/2) - 1294978816506375/2048*((x + 1)/(x - 1)^2 - 1/(x - 1))^11*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2/((x + 1)/(x - 1))^(25/2) + 1032229491418125/512*((x + 1)/(x - 1)^2 - 1/(x - 1))^9*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3/((x + 1)/(x - 1))^(23/2) - 442384067750625/128*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4/((x + 1)/(x - 1))^(21/2) + 97790162344875/32*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^5/((x + 1)/(x - 1))^(19/2) - 9587270818125/8*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^6/((x + 1)/(x - 1))^(17/2) + 273922023375/2*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^7/((x + 1)/(x - 1))^(15/2) - 431659605502125/4096*((x + 1)/(x - 1)^2 - 1/(x - 1))^12*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(25/2) + 619337694850875/512*((x + 1)/(x - 1)^2 - 1/(x - 1))^10*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(23/2) - 1327152203251875/256*((x + 1)/(x - 1)^2 - 1/(x - 1))^8*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(21/2) + 162983603908125/16*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(19/2) - 143809062271875/16*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(17/2) + 5752362490875/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^5*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(15/2) - 147496474125*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^6*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)/((x + 1)/(x - 1))^(13/2) - 147461355916875/256*((x + 1)/(x - 1)^2 - 1/(x - 1))^9*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2/((x + 1)/(x - 1))^(21/2) + 69850115960625/16*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2/((x + 1)/(x - 1))^(19/2) - 86285437363125/8*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2/((x + 1)/(x - 1))^(17/2) + 9587270818125*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2/((x + 1)/(x - 1))^(15/2) - 2212447111875*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2/((x + 1)/(x - 1))^(13/2) - 9587270818125/8*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3/((x + 1)/(x - 1))^(17/2) + 9587270818125/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3/((x + 1)/(x - 1))^(15/2) - 4424894223750*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3/((x + 1)/(x - 1))^(13/2) + 536350815000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3/((x + 1)/(x - 1))^(11/2) - 737482370625*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^4/((x + 1)/(x - 1))^(13/2) + 804526222500*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^4/((x + 1)/(x - 1))^(11/2) - 35756721000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^5/((x + 1)/(x - 1))^(9/2) + 56303426804625/512*((x + 1)/(x - 1)^2 - 1/(x - 1))^11*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(23/2) - 147461355916875/128*((x + 1)/(x - 1)^2 - 1/(x - 1))^9*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(21/2) + 69850115960625/16*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(19/2) - 28761812454375/4*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(17/2) + 9587270818125/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(15/2) - 884978844750*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^5*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(13/2) + 69850115960625/64*((x + 1)/(x - 1)^2 - 1/(x - 1))^8*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(19/2) - 28761812454375/4*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(17/2) + 28761812454375/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(15/2) - 8849788447500*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(13/2) + 804526222500*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(11/2) + 5752362490875/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(15/2) - 8849788447500*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(13/2) + 4827157335000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(11/2) + 1609052445000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(11/2) - 715134420000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)/((x + 1)/(x - 1))^(9/2) - 4108830350625/8*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(17/2) + 5752362490875/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(15/2) - 4424894223750*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(13/2) + 1609052445000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(11/2) - 2212447111875*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(13/2) + 4827157335000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(11/2) - 1072701630000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(9/2) - 1072701630000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2/((x + 1)/(x - 1))^(9/2) + 536350815000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^3/((x + 1)/(x - 1))^(11/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^3/((x + 1)/(x - 1))^(9/2) + 204324120000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^3/((x + 1)/(x - 1))^(7/2) - 29492271183375/256*((x + 1)/(x - 1)^2 - 1/(x - 1))^10*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(21/2) + 69850115960625/64*((x + 1)/(x - 1)^2 - 1/(x - 1))^8*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(19/2) - 28761812454375/8*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(17/2) + 9587270818125/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(15/2) - 2212447111875*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(13/2) + 160905244500*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^5*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(11/2) - 4108830350625/4*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(17/2) + 5752362490875*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(15/2) - 8849788447500*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(13/2) + 3218104890000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(11/2) - 2212447111875*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(13/2) + 4827157335000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(11/2) - 1072701630000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(9/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(9/2) + 1917454163625/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(15/2) - 4424894223750*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(13/2) + 4827157335000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(11/2) - 715134420000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(9/2) + 3218104890000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(11/2) - 4290806520000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(7/2) - 1072701630000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)/((x + 1)/(x - 1))^(7/2) - 442489422375*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^2/((x + 1)/(x - 1))^(13/2) + 1609052445000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^2/((x + 1)/(x - 1))^(11/2) - 1072701630000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^2/((x + 1)/(x - 1))^(9/2) - 1072701630000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^2/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^2/((x + 1)/(x - 1))^(7/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^2/((x + 1)/(x - 1))^(7/2) - 81729648000*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)^3/((x + 1)/(x - 1))^(5/2) + 7761123995625/64*((x + 1)/(x - 1)^2 - 1/(x - 1))^9*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(19/2) - 4108830350625/4*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(17/2) + 5752362490875/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(15/2) - 2949929482500*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(13/2) + 804526222500*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(11/2) + 1917454163625/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(15/2) - 4424894223750*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(13/2) + 4827157335000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(11/2) - 715134420000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(9/2) + 1609052445000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(11/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(9/2) + 204324120000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^3*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(7/2) - 884978844750*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(13/2) + 3218104890000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(11/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(9/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(9/2) + 1225944720000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(7/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(7/2) + 804526222500*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(11/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(7/2) + 1225944720000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)/((x + 1)/(x - 1))^(5/2) - 357567210000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)^2/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)^2/((x + 1)/(x - 1))^(7/2) - 245188944000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)^2/((x + 1)/(x - 1))^(5/2) - 4108830350625/32*((x + 1)/(x - 1)^2 - 1/(x - 1))^8*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(17/2) + 1917454163625/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(15/2) - 2212447111875*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(13/2) + 1609052445000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(11/2) - 178783605000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^4*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(9/2) - 884978844750*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(13/2) + 3218104890000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(11/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(9/2) - 1072701630000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(7/2) + 804526222500*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(11/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(7/2) + 1225944720000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(7/2) - 245188944000*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)^2*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(5/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(9/2) + 1225944720000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(5/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)/((x + 1)/(x - 1))^(5/2) - 245188944000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)^2/((x + 1)/(x - 1))^(5/2) + 273922023375/2*((x + 1)/(x - 1)^2 - 1/(x - 1))^7*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(15/2) - 884978844750*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(13/2) + 1609052445000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(11/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(9/2) + 804526222500*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(11/2) - 2145403260000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(7/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(7/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(9/2) + 1225944720000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(5/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(5/2) - 490377888000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(5/2) + 326918592000*((x + 1)/(x - 1)^8 - 1/(x - 1)^7)*((x + 1)/(x - 1)^9 - 1/(x - 1)^8)/((x + 1)/(x - 1))^(3/2) - 147496474125*((x + 1)/(x - 1)^2 - 1/(x - 1))^6*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(13/2) + 804526222500*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(11/2) - 1072701630000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(9/2) + 204324120000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^3*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(7/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(9/2) + 1225944720000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(7/2) - 245188944000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)^2*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(5/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(5/2) - 490377888000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(5/2) + 326918592000*((x + 1)/(x - 1)^7 - 1/(x - 1)^6)*((x + 1)/(x - 1)^10 - 1/(x - 1)^9)/((x + 1)/(x - 1))^(3/2) + 160905244500*((x + 1)/(x - 1)^2 - 1/(x - 1))^5*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(11/2) - 715134420000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(7/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(5/2) - 490377888000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(5/2) + 326918592000*((x + 1)/(x - 1)^6 - 1/(x - 1)^5)*((x + 1)/(x - 1)^11 - 1/(x - 1)^10)/((x + 1)/(x - 1))^(3/2) - 178783605000*((x + 1)/(x - 1)^2 - 1/(x - 1))^4*((x + 1)/(x - 1)^12 - 1/(x - 1)^11)/((x + 1)/(x - 1))^(9/2) + 612972360000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^12 - 1/(x - 1)^11)/((x + 1)/(x - 1))^(7/2) - 245188944000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)^2*((x + 1)/(x - 1)^12 - 1/(x - 1)^11)/((x + 1)/(x - 1))^(5/2) - 490377888000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^12 - 1/(x - 1)^11)/((x + 1)/(x - 1))^(5/2) + 326918592000*((x + 1)/(x - 1)^5 - 1/(x - 1)^4)*((x + 1)/(x - 1)^12 - 1/(x - 1)^11)/((x + 1)/(x - 1))^(3/2) + 204324120000*((x + 1)/(x - 1)^2 - 1/(x - 1))^3*((x + 1)/(x - 1)^13 - 1/(x - 1)^12)/((x + 1)/(x - 1))^(7/2) - 490377888000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^13 - 1/(x - 1)^12)/((x + 1)/(x - 1))^(5/2) + 326918592000*((x + 1)/(x - 1)^4 - 1/(x - 1)^3)*((x + 1)/(x - 1)^13 - 1/(x - 1)^12)/((x + 1)/(x - 1))^(3/2) - 245188944000*((x + 1)/(x - 1)^2 - 1/(x - 1))^2*((x + 1)/(x - 1)^14 - 1/(x - 1)^13)/((x + 1)/(x - 1))^(5/2) + 326918592000*((x + 1)/(x - 1)^3 - 1/(x - 1)^2)*((x + 1)/(x - 1)^14 - 1/(x - 1)^13)/((x + 1)/(x - 1))^(3/2) + 326918592000*((x + 1)/(x - 1)^2 - 1/(x - 1))*((x + 1)/(x - 1)^15 - 1/(x - 1)^14)/((x + 1)/(x - 1))^(3/2) - 653837184000*((x + 1)/(x - 1)^16 - 1/(x - 1)^15)/sqrt((x + 1)/(x - 1))" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Df = [diff(f,k) for k in range(1, 16)]\n", "Df[-1]" ] }, { "cell_type": "markdown", "id": "c30f60bb-2e32-4f3f-838f-63680a965926", "metadata": {}, "source": [ "We observe expression swell and a growth of the coefficients." ] }, { "cell_type": "markdown", "id": "96a921f7-6976-4d00-8dd1-30c3a84c4ae1", "metadata": {}, "source": [ "Now we evaluate the 15-th derivative at $x = 0$ and compare with the 15-th coefficient of the Taylor series." ] }, { "cell_type": "code", "execution_count": 5, "id": "3bf73499-a47a-4897-b01d-7c6b5020feb7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "273922023375*I" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cDf = Df[-1].subs(x=0)\n", "cDf" ] }, { "cell_type": "code", "execution_count": 6, "id": "93c4bba8-0603-4ca2-a8fc-5ddc1be63cf5", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "429/2048*I*x^15 + 429/2048*I*x^14 + 231/1024*I*x^13 + 231/1024*I*x^12 + 63/256*I*x^11 + 63/256*I*x^10 + 35/128*I*x^9 + 35/128*I*x^8 + 5/16*I*x^7 + 5/16*I*x^6 + 3/8*I*x^5 + 3/8*I*x^4 + 1/2*I*x^3 + 1/2*I*x^2 + I*x + I" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tf = taylor(f, x, 0, 15)\n", "tf" ] }, { "cell_type": "code", "execution_count": 7, "id": "be636492-36c9-4e1a-9bae-9d0b4dffdc16", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "429/2048*I" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tf.coefficient(x, 15)" ] }, { "cell_type": "code", "execution_count": 8, "id": "dc942fce-e7c1-45c8-8df7-ff8f00095d66", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "429/2048*I" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cDf/factorial(15)" ] }, { "cell_type": "markdown", "id": "1cc11595-fe50-4144-8627-b34eabc83da0", "metadata": {}, "source": [ "We observe that the coefficient of the 15-th term in the Taylor series is indeed \n", "$$\n", " \\frac{1}{15!} \\left. \\frac{d^{15}}{d~\\! x^{15}} f(x) \\right|_{x=0}.\n", "$$" ] }, { "cell_type": "markdown", "id": "8061d226-1ea5-4948-a716-10b14f7e812d", "metadata": {}, "source": [ "## 2. Newton's Method" ] }, { "cell_type": "markdown", "id": "5e3c284e-053c-4ca7-a665-6bd27d6a76aa", "metadata": {}, "source": [ "To compute the Taylor series of $\\sqrt{1+t}$, we consider the equation\n", "$$\n", " z^2 - (1 + t) = 0\n", "$$\n", "where $t$ is the variable in a power series ring with rational\n", "coefficients, of precision 16, so the truncation error is $O(t^{16})$,\n", "declared as `t` below" ] }, { "cell_type": "code", "execution_count": 9, "id": "c65f0391-21ca-4de8-95c8-34ba19d6ebe7", "metadata": {}, "outputs": [], "source": [ "R. = PowerSeriesRing(QQ, default_prec=16)\n", "P. = R[]" ] }, { "cell_type": "markdown", "id": "915fb47c-bd2e-4904-910e-beb176c46fc9", "metadata": {}, "source": [ "where the second command above declares $z$ as `z`,\n", "as the variable in a polynomial where the coefficients\n", "are power series of $O(t^{16})$ with rational coefficients." ] }, { "cell_type": "markdown", "id": "f8b45204-02fd-4c63-82cc-5652d7de51c6", "metadata": {}, "source": [ "Then we can apply Newton's method on the above equation" ] }, { "cell_type": "code", "execution_count": 10, "id": "2064fe91-b414-49fc-894b-fe1e725f3437", "metadata": {}, "outputs": [], "source": [ "equ = z^2 - (1+t)\n", "newton_step = z - equ/diff(equ, z)" ] }, { "cell_type": "markdown", "id": "84591c03-b3a1-4eff-a4cb-228e4cd4666f", "metadata": {}, "source": [ "by repeated evaluation of the expression `newton_step`\n", "starting at the series `1 + t` as follows:" ] }, { "cell_type": "code", "execution_count": 11, "id": "ec564348-a749-4407-a1d6-65000f466d7a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[1 + t,\n", " 1 + 1/2*t + O(t^16),\n", " 1 + 1/2*t - 1/8*t^2 + 1/16*t^3 - 1/32*t^4 + 1/64*t^5 - 1/128*t^6 + 1/256*t^7 - 1/512*t^8 + 1/1024*t^9 - 1/2048*t^10 + 1/4096*t^11 - 1/8192*t^12 + 1/16384*t^13 - 1/32768*t^14 + 1/65536*t^15 + O(t^16),\n", " 1 + 1/2*t - 1/8*t^2 + 1/16*t^3 - 5/128*t^4 + 7/256*t^5 - 21/1024*t^6 + 33/2048*t^7 - 107/8192*t^8 + 177/16384*t^9 - 593/65536*t^10 + 1001/131072*t^11 - 3395/524288*t^12 + 5773/1048576*t^13 - 19665/4194304*t^14 + 33525/8388608*t^15 + O(t^16)]" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sL = [1 + t]\n", "for i in range(3):\n", " sL.append(newton_step(sL[-1]))\n", "sL" ] }, { "cell_type": "markdown", "id": "4a4dbf5f-3473-4c06-a006-59e6cf8d134b", "metadata": {}, "source": [ "Because Newton's method converges quadratically, three steps suffice." ] }, { "cell_type": "markdown", "id": "6e0a760d-fcad-4364-950b-0b7b2b7ad573", "metadata": {}, "source": [ "## Assignment Two" ] }, { "cell_type": "markdown", "id": "646d0168-b4b0-403a-a8fa-fad551bdbc8e", "metadata": {}, "source": [ "Consider again $f(x)$ from assignment one.\n", "\n", "1. Apply Newton's method to compute all first 15 derivatives at $x=0$\n", " via the Taylor series. \n", "\n", " Verify the correctness by comparing to the output of `taylor`.\n", "\n", "2. How many steps are needed. Describe the convergence." ] }, { "cell_type": "markdown", "id": "2b75a2ad-6c27-4239-9d3f-b11f91b42f15", "metadata": {}, "source": [ "## answer to Assignment Two" ] }, { "cell_type": "markdown", "id": "b1f5453c-b800-445c-82fc-36aa539f97f9", "metadata": {}, "source": [ "From assignment one, we observe complex values for the derivatives. Therefore, we declare our power series ring to be `QQbar` which is the field of rational numbers, extended with the imaginary unit `I`." ] }, { "cell_type": "code", "execution_count": 12, "id": "efa11b13-63b6-4aa0-9d02-7f21926006d1", "metadata": {}, "outputs": [], "source": [ "ourR. = PowerSeriesRing(QQbar, default_prec=16)\n", "ourP. = ourR[]" ] }, { "cell_type": "code", "execution_count": 13, "id": "eeaab31d-ada5-4e53-88b9-60d6b5d4ab27", "metadata": {}, "outputs": [], "source": [ "equ = z^2 - (t+1)/(t-1)\n", "newton_step = z - equ/diff(equ, z)" ] }, { "cell_type": "markdown", "id": "106b74a4-5ca0-469f-b9b0-1a1cccd10543", "metadata": {}, "source": [ "To obtain complex coefficients in the series, we must start with an imaginary constant coefficient." ] }, { "cell_type": "code", "execution_count": 14, "id": "51935b4d-1097-4cd9-8e5a-16b00a62b843", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[I + t,\n", " I + I*t + (1/2*I - 1)*t^2 - 1/2*t^3 + 1/2*I*t^4 + (I - 1/2)*t^5 + (1/2*I - 1)*t^6 - 1/2*t^7 + 1/2*I*t^8 + (I - 1/2)*t^9 + (1/2*I - 1)*t^10 - 1/2*t^11 + 1/2*I*t^12 + (I - 1/2)*t^13 + (1/2*I - 1)*t^14 - 1/2*t^15 + O(t^16),\n", " I + I*t + 1/2*I*t^2 + 1/2*I*t^3 - 1/8*I*t^4 + (3/8*I + 1/2)*t^5 + (9/16*I - 7/8)*t^6 + (-I - 5/16)*t^7 + (25/32*I + 3/4)*t^8 + (21/32*I - 13/8)*t^9 + (-71/64*I + 9/32)*t^10 + (63/32*I + 13/64)*t^11 + (-107/128*I - 9/4)*t^12 + (-69/128*I + 169/64)*t^13 + (989/256*I - 243/128)*t^14 + (-273/64*I - 597/256)*t^15 + O(t^16),\n", " I + I*t + 1/2*I*t^2 + 1/2*I*t^3 + 3/8*I*t^4 + 3/8*I*t^5 + 5/16*I*t^6 + 5/16*I*t^7 + 51/128*I*t^8 + (19/128*I - 1/4)*t^9 + (15/256*I + 11/16)*t^10 + (391/256*I - 9/32)*t^11 + (-1365/1024*I - 19/16)*t^12 + (7/1024*I + 775/256)*t^13 + (7129/2048*I - 1779/1024)*t^14 + (-505/128*I - 4045/2048)*t^15 + O(t^16),\n", " I + I*t + 1/2*I*t^2 + 1/2*I*t^3 + 3/8*I*t^4 + 3/8*I*t^5 + 5/16*I*t^6 + 5/16*I*t^7 + 35/128*I*t^8 + 35/128*I*t^9 + 63/256*I*t^10 + 63/256*I*t^11 + 231/1024*I*t^12 + 231/1024*I*t^13 + 429/2048*I*t^14 + 429/2048*I*t^15 + O(t^16)]" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sL = [I + t]\n", "for i in range(4):\n", " sL.append(newton_step(sL[-1]))\n", "sL" ] }, { "cell_type": "markdown", "id": "90bcda7f-4844-4df6-88ca-0bf485ea07cb", "metadata": {}, "source": [ "Because the quadratic convergence, only four steps suffice to compute the first 16 terms of the Taylor series correctly. Observe the coefficient with $t^{15}$ we computed in assignment one." ] }, { "cell_type": "markdown", "id": "cc6eeb70-dbaa-4be3-aab9-4ffead94af83", "metadata": {}, "source": [ "## 3. Convergence Radius" ] }, { "cell_type": "markdown", "id": "8bf9be88-9e46-4019-8006-5ca6bc021b0e", "metadata": {}, "source": [ "Truncated Taylor series can be applied to approximate functions.\n", "We may expect the Taylor series of a function $f(x)$ about $x = 0$\n", "to be accurate for small values of the parameter $t$.\n", "Taylor series are Pade approximants, which are often much more accurate\n", "for larger values of the parameter $t$." ] }, { "cell_type": "markdown", "id": "69a42e87-cd0a-4b86-8634-2fe0764b1c02", "metadata": {}, "source": [ "## Assignment Three." ] }, { "cell_type": "markdown", "id": "45ede629-9905-4035-bbd4-dee60fecee5a", "metadata": {}, "source": [ "Consider once more $f(x)$ from assignment one.\n", "\n", "1. Use the computed Taylor series to construct Pade approximants \n", " with denominators and numerators of increasing degrees.\n", "\n", " Compare the accurate of the Pade approximant evaluated at $t = 1/2$\n", " to the value of $f(1/2)$, \\newline for increasing degrees.\n", "\n", "2. Use the computed Taylor series to construct Pade approximants \n", " with a linear denominator and a numerator of increasing degree.\n", "\n", " What do you observe about the root of the denominator \n", " of the Pade approximants?\n", "\n", " Compare the root with the expression for $f(x)$." ] }, { "cell_type": "markdown", "id": "ebf23f84-3711-44e2-9ae3-3c4808e527c0", "metadata": {}, "source": [ "## answer to Assignment Three" ] }, { "cell_type": "markdown", "id": "333344fa-c619-4844-8523-12d11e7c3d98", "metadata": {}, "source": [ "We use the Taylor series to compute rational approximations of increasing degrees of numerator and denominator." ] }, { "cell_type": "code", "execution_count": 15, "id": "4cccbc23-10a2-4197-adc0-46899e827cc2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[I,\n", " (-I*t - 2*I)/(t - 2),\n", " (I*t^2 - 2*I*t - 4*I)/(t^2 + 2*t - 4),\n", " (-I*t^3 - 4*I*t^2 + 4*I*t + 8*I)/(t^3 - 4*t^2 - 4*t + 8),\n", " (I*t^4 - 4*I*t^3 - 12*I*t^2 + 8*I*t + 16*I)/(t^4 + 4*t^3 - 12*t^2 - 8*t + 16),\n", " (-I*t^5 - 6*I*t^4 + 12*I*t^3 + 32*I*t^2 - 16*I*t - 32*I)/(t^5 - 6*t^4 - 12*t^3 + 32*t^2 + 16*t - 32),\n", " (I*t^6 - 6*I*t^5 - 24*I*t^4 + 32*I*t^3 + 80*I*t^2 - 32*I*t - 64*I)/(t^6 + 6*t^5 - 24*t^4 - 32*t^3 + 80*t^2 + 32*t - 64),\n", " (-I*t^7 - 8*I*t^6 + 24*I*t^5 + 80*I*t^4 - 80*I*t^3 - 192*I*t^2 + 64*I*t + 128*I)/(t^7 - 8*t^6 - 24*t^5 + 80*t^4 + 80*t^3 - 192*t^2 - 64*t + 128)]" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fpade = [sL[-1].pade(k,k) for k in range(8)]\n", "fpade" ] }, { "cell_type": "markdown", "id": "35de7aa7-9f8c-41c9-9d2b-2ec950ed7409", "metadata": {}, "source": [ "We evaluate the Pade approximants at 1/2." ] }, { "cell_type": "code", "execution_count": 16, "id": "ac2f2ac7-bdb6-4742-8cb4-6a5a230c5515", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[I, 5/3*I, 19/11*I, 71/41*I, 265/153*I, 989/571*I, 3691/2131*I, 13775/7953*I]" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = [p(t=1/2) for p in fpade]\n", "a" ] }, { "cell_type": "markdown", "id": "eb4a5ff2-c2b4-4ac8-a1fb-1f4caa8ebe3c", "metadata": {}, "source": [ "Consider the errors." ] }, { "cell_type": "code", "execution_count": 17, "id": "0446224e-2042-4bba-8c6b-616f48381a53", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[-9.909389553312491e-18 - 0.7320508075688773*I,\n", " -9.909389553312491e-18 - 0.06538414090221063*I,\n", " -9.909389553312491e-18 - 0.004778080296150025*I,\n", " -9.909389553312491e-18 - 0.0003434904957065471*I,\n", " -9.909389553312491e-18 - 0.00002466377802760877*I,\n", " -9.909389553312491e-18 - 1.770791294111729e-6*I,\n", " -9.909389553312491e-18 - 1.271371550953804e-7*I,\n", " -9.909389553312491e-18 - 9.128037367633901e-9*I]" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[(v - f(x=1/2)).n(digits=16) for v in a]" ] }, { "cell_type": "markdown", "id": "779fcb8c-8509-4f5a-9697-31655272fe12", "metadata": {}, "source": [ "We observe that the last approximation has 8 decimal places correct." ] }, { "cell_type": "markdown", "id": "38310d56-690d-43d6-843b-78f24ac84edb", "metadata": {}, "source": [ "In the second part of the assignment, we consider rational approximants of linear denominator." ] }, { "cell_type": "code", "execution_count": 18, "id": "5006e3fb-2668-41d9-8e1c-e65e003d71e7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[(-I)/(t - 1),\n", " (-I*t - 2*I)/(t - 2),\n", " (1/2*I*t^2 - I)/(t - 1),\n", " (-1/6*I*t^3 + 1/3*I*t^2 - 1/3*I*t - 4/3*I)/(t - 4/3),\n", " (1/8*I*t^4 + 1/2*I*t^2 - I)/(t - 1),\n", " (-3/40*I*t^5 + 1/20*I*t^4 - 1/10*I*t^3 + 2/5*I*t^2 - 1/5*I*t - 6/5*I)/(t - 6/5),\n", " (1/16*I*t^6 + 1/8*I*t^4 + 1/2*I*t^2 - I)/(t - 1),\n", " (-5/112*I*t^7 + 1/56*I*t^6 - 3/56*I*t^5 + 1/14*I*t^4 - 1/14*I*t^3 + 3/7*I*t^2 - 1/7*I*t - 8/7*I)/(t - 8/7),\n", " (5/128*I*t^8 + 1/16*I*t^6 + 1/8*I*t^4 + 1/2*I*t^2 - I)/(t - 1),\n", " (-35/1152*I*t^9 + 5/576*I*t^8 - 5/144*I*t^7 + 1/36*I*t^6 - 1/24*I*t^5 + 1/12*I*t^4 - 1/18*I*t^3 + 4/9*I*t^2 - 1/9*I*t - 10/9*I)/(t - 10/9),\n", " (7/256*I*t^10 + 5/128*I*t^8 + 1/16*I*t^6 + 1/8*I*t^4 + 1/2*I*t^2 - I)/(t - 1),\n", " (-63/2816*I*t^11 + 7/1408*I*t^10 - 35/1408*I*t^9 + 5/352*I*t^8 - 5/176*I*t^7 + 3/88*I*t^6 - 3/88*I*t^5 + 1/11*I*t^4 - 1/22*I*t^3 + 5/11*I*t^2 - 1/11*I*t - 12/11*I)/(t - 12/11),\n", " (21/1024*I*t^12 + 7/256*I*t^10 + 5/128*I*t^8 + 1/16*I*t^6 + 1/8*I*t^4 + 1/2*I*t^2 - I)/(t - 1),\n", " (-231/13312*I*t^13 + 21/6656*I*t^12 - 63/3328*I*t^11 + 7/832*I*t^10 - 35/1664*I*t^9 + 15/832*I*t^8 - 5/208*I*t^7 + 1/26*I*t^6 - 3/104*I*t^5 + 5/52*I*t^4 - 1/26*I*t^3 + 6/13*I*t^2 - 1/13*I*t - 14/13*I)/(t - 14/13),\n", " (33/2048*I*t^14 + 21/1024*I*t^12 + 7/256*I*t^10 + 5/128*I*t^8 + 1/16*I*t^6 + 1/8*I*t^4 + 1/2*I*t^2 - I)/(t - 1)]" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fpade1 = [sL[-1].pade(k,1) for k in range(15)]\n", "fpade1" ] }, { "cell_type": "code", "execution_count": 19, "id": "bc39dfab-ccdf-4d87-beda-279c7ee8f5a0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[t - 1,\n", " t - 2,\n", " t - 1,\n", " t - 4/3,\n", " t - 1,\n", " t - 6/5,\n", " t - 1,\n", " t - 8/7,\n", " t - 1,\n", " t - 10/9,\n", " t - 1,\n", " t - 12/11,\n", " t - 1,\n", " t - 14/13,\n", " t - 1]" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[p.denominator() for p in fpade1]" ] }, { "cell_type": "markdown", "id": "ab2479bb-ad6e-4fd4-85e4-eb09dc62fcd3", "metadata": {}, "source": [ "We observe that the root of the denominator is either 1 or is getting closer to 1, and $x - 1$ appears in the denominator of $f$." ] }, { "cell_type": "markdown", "id": "7c899e37-11b2-44e0-9e34-958b3a4a5ec0", "metadata": {}, "source": [ "## 4. The Deadline is Friday 19 July, at 2pm." ] }, { "cell_type": "markdown", "id": "f21cd626-2b4f-4993-b2e5-9e3c65acb56e", "metadata": {}, "source": [ "Upload your answer to gradescope at the latest on Friday 19 July,\n", "before 2pm." ] }, { "cell_type": "markdown", "id": "d23bcacd-4302-4e7c-8ca4-4b3b7c418d03", "metadata": {}, "source": [ "The solution consists of one single notebook,\n", "organized according to the assignments.\n", "Mark the start of each solution to an assignment using a heading in a cell.\n", "Your notebook should run from top to bottom as a program without errors.\n", "Apply proper formatting in your notebook so it reads\n", "like a technical report if you would print it.\n", "Document the execution cells with complete sentences,\n", "properly formatted in markdown cells." ] }, { "cell_type": "markdown", "id": "2fb7970c-db7f-4768-af94-f34baf93ec6d", "metadata": {}, "source": [ "You may (not must) work in pairs for this project. \n", "A pair consists of two, not three or more.\n", "If you decide to work in a pair,\n", "then you must send me an email with the name of your partner and\n", "with the email address of your partner in the copy of the email,\n", "before 2pm on Monday 15 July.\n", "If working in a pair, then only one Jupyter notebook should be submitted." ] }, { "cell_type": "markdown", "id": "ec281265-d8ec-44e2-accd-da9eee0e3c2f", "metadata": {}, "source": [ "If you have questions, concerns, or difficulties,\n", "feel free to contact me for help." ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 10.3", "language": "sage", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.14" } }, "nbformat": 4, "nbformat_minor": 5 }