Lab 04 · Chapter 4

Root Geometry and Rational Derivatives

How does the position of the roots give every derivative of a rational function in closed form?

A calculator for (αx+β)/(ax2+bx+c)(\alpha x+\beta)/(ax^2+bx+c) in every root regime — trigonometric (Δ<0\Delta<0), hyperbolic on its right exterior branch, branch-free real roots and the double root — with the book's corrected notation, exact BigInt values, Taylor coefficients in one step, the cubic theorems with an independent real root, the quartic superposition and the f′∩gf'\cap g intersection theorem.

What the book proves

Theory

Conventions used on this page

  • F(x)=αx+βax2+bx+c=Ax+Bx2+px+sF(x)=\dfrac{\alpha x+\beta}{ax^2+bx+c}=\dfrac{Ax+B}{x^2+px+s} with A=α/a, B=β/aA=\alpha/a,\ B=\beta/a; m=n+1m=n+1, every integer n≥0n\ge 0 (n = 0 returns F itself).
  • Trigonometric regime (Δ<0\Delta<0): r, θ, ρ, ϕr,\ \theta,\ \rho,\ \phi. Hyperbolic / real-root regime (Δ>0\Delta>0): r, η, ρ, ψr,\ \eta,\ \rho,\ \psi, numerator coefficients A, BA,\ B.
  • Angles use the book's quadrant-corrected arctangent (below); no two-argument arctangent appears in any displayed theorem. ρ=Q\rho=\sqrt{Q} is the positive root.
  • The real hyperbolic forms (real ψ\psi, positive ρ\rho) are stated only on the right exterior branch x>reηx>re^{\eta}; elsewhere the branch-free real-root formula is used. Orders are capped at n = 200 in the calculator.

§4.0.2 (p. 107) · §4.0.3 (p. 110) · §4.0.8 (p. 113)

Root parametrization

Δ<0:x2−2r(cos⁡θ)x+r2=(x−reiθ)(x−re−iθ),r>0, 0<θ<π\Delta<0:\quad x^2-2r(\cos\theta)x+r^2=(x-re^{i\theta})(x-re^{-i\theta}),\quad r>0,\ 0<\theta<\pi
Δ>0:x2−2r(cosh⁡η)x+r2=(x−reη)(x−re−η),r>0, η>0\Delta>0:\quad x^2-2r(\cosh\eta)x+r^2=(x-re^{\eta})(x-re^{-\eta}),\quad r>0,\ \eta>0
c<0:x2−2r(sinh⁡η)x−r2=(x−reη)(x+re−η)c<0:\quad x^2-2r(\sinh\eta)x-r^2=(x-re^{\eta})(x+re^{-\eta})

Unified: x1,2=re±λx_{1,2}=re^{\pm\lambda}, λ=iθ\lambda=i\theta (Δ<0\Delta<0) or η\eta (Δ>0\Delta>0). The cosh⁡\cosh form needs two positive roots; negative or mixed-sign real roots are handled by partial fractions.

§4.0.10 (p. 115)

Quadrant-corrected angle φ(x)

Since rsin⁡θ>0r\sin\theta>0, the book sets

ϕ(x)={arctan⁡ ⁣(rsin⁡θx−rcos⁡θ),x−rcos⁡θ>0,π2,x−rcos⁡θ=0,arctan⁡ ⁣(rsin⁡θx−rcos⁡θ)+π,x−rcos⁡θ<0,\phi(x)=\begin{cases}\arctan\!\left(\dfrac{r\sin\theta}{x-r\cos\theta}\right), & x-r\cos\theta>0,\\[4pt] \dfrac{\pi}{2}, & x-r\cos\theta=0,\\[4pt] \arctan\!\left(\dfrac{r\sin\theta}{x-r\cos\theta}\right)+\pi, & x-r\cos\theta<0,\end{cases}

so 0<ϕ(x)<π0<\phi(x)<\pi, cos⁡ϕ=(x−rcos⁡θ)/ρ\cos\phi=(x-r\cos\theta)/\rho, sin⁡ϕ=rsin⁡θ/ρ\sin\phi=r\sin\theta/\rho, and x−re±iθ=ρ(x)e∓iϕ(x)x-re^{\pm i\theta}=\rho(x)e^{\mp i\phi(x)}.

§4.0.2 (p. 107) · §4.0.3 (p. 110)

Reciprocal quadratic

Δ<0:f(n)(x)=(−1)nn!r ρ(x)n+1sin⁡θ sin⁡((n+1)ϕ(x))\Delta<0:\quad f^{(n)}(x)=\frac{(-1)^n n!}{r\,\rho(x)^{n+1}\sin\theta}\,\sin\big((n+1)\phi(x)\big)
Δ>0:f(n)(x)=(−1)nn!2rsinh⁡η(1(x−reη)n+1−1(x−re−η)n+1),f(n)(0)=n!rn+2sinh⁡((n+1)η)sinh⁡η\Delta>0:\quad f^{(n)}(x)=\frac{(-1)^n n!}{2r\sinh\eta}\left(\frac{1}{(x-re^{\eta})^{n+1}}-\frac{1}{(x-re^{-\eta})^{n+1}}\right),\qquad f^{(n)}(0)=\frac{n!}{r^{n+2}}\frac{\sinh((n+1)\eta)}{\sinh\eta}

§4.0.12 (p. 117)

Theorem 4.0.1 — universal trigonometric derivative theorem

For F(x)=Ax+Bx2−2r(cos⁡θ)x+r2F(x)=\dfrac{Ax+B}{x^2-2r(\cos\theta)x+r^2}, r>0, 0<θ<πr>0,\ 0<\theta<\pi, ρ(x)=x2−2r(cos⁡θ)x+r2\rho(x)=\sqrt{x^2-2r(\cos\theta)x+r^2}, ϕ\phi as above, m=n+1m=n+1, every n≥0n\ge0 and every real x:

F(n)(x)=(−1)nn!ρ(x)m[Acos⁡(mϕ(x))+Arcos⁡θ+Brsin⁡θsin⁡(mϕ(x))]F^{(n)}(x)=\frac{(-1)^n n!}{\rho(x)^m}\left[A\cos(m\phi(x))+\frac{Ar\cos\theta+B}{r\sin\theta}\sin(m\phi(x))\right]

§4.0.12 (p. 117) · §4.0.20 (p. 128)

Theorem 4.0.2 — universal hyperbolic derivative theorem

For F(x)=Ax+Bx2−2r(cosh⁡η)x+r2F(x)=\dfrac{Ax+B}{x^2-2r(\cosh\eta)x+r^2}, r>0, η>0r>0,\ \eta>0, on the right exterior branch x>reηx>re^{\eta} with ψ(x)=artanh⁡rsinh⁡ηx−rcosh⁡η\psi(x)=\operatorname{artanh}\frac{r\sinh\eta}{x-r\cosh\eta}:

F(n)(x)=(−1)nn!ρ(x)m[Acosh⁡(mψ(x))+Arcosh⁡η+Brsinh⁡ηsinh⁡(mψ(x))],x>reηF^{(n)}(x)=\frac{(-1)^n n!}{\rho(x)^m}\left[A\cosh(m\psi(x))+\frac{Ar\cosh\eta+B}{r\sinh\eta}\sinh(m\psi(x))\right],\quad x>re^{\eta}

For every real x≠re±ηx\neq re^{\pm\eta}, without a branch choice:

F(n)(x)=(−1)nn!2rsinh⁡η[Areη+B(x−reη)m−Are−η+B(x−re−η)m]F^{(n)}(x)=\frac{(-1)^n n!}{2r\sinh\eta}\left[\frac{Are^{\eta}+B}{(x-re^{\eta})^m}-\frac{Are^{-\eta}+B}{(x-re^{-\eta})^m}\right]

The hyperbolic form must not be used unchanged across the poles or on the left branch (§4.0.20). On the left branch it is off by the factor (−1)n+1(-1)^{n+1} — verified below.

§4.0.5 (p. 112) · §4.0.6 (p. 112)

Linear law and general theorem

dndxn1(x−a)m=(−1)n(m+n−1)!(m−1)!1(x−a)m+n\frac{d^n}{dx^n}\frac{1}{(x-a)^m}=(-1)^n\frac{(m+n-1)!}{(m-1)!}\frac{1}{(x-a)^{m+n}}

Any rational function reduces to a polynomial part plus ∑A/(x−a)m+∑(Bx+C)/(x2+bx+c)k\sum A/(x-a)^m+\sum (Bx+C)/(x^2+bx+c)^k, so F(n)F^{(n)} = polynomial part + linear laws + quadratic (trigonometric/hyperbolic) laws.

§4.0.20 (p. 128) · §4.0.5 (p. 112)

Double root Δ = 0

Book limit (η→0\eta\to0) for 1/(x−r)21/(x-r)^2: f(n)(0)=(n+1)!/rn+2f^{(n)}(0)=(n+1)!/r^{n+2}. With a general linear numerator, the linear law with m=1,2m=1,2 gives (used here; the numerator is kept):

Ax+B(x−xr)2:F(n)(x)=(−1)nn![A(x−xr)n+1+(n+1)(Axr+B)(x−xr)n+2]\frac{Ax+B}{(x-x_r)^2}:\quad F^{(n)}(x)=(-1)^n n!\left[\frac{A}{(x-x_r)^{n+1}}+\frac{(n+1)(Ax_r+B)}{(x-x_r)^{n+2}}\right]

§4.0.13 (p. 117)

Theorem 4.0.3 — general cubic derivative theorem

F(x)=1(x−q)(x2−2r(cos⁡θ)x+r2)F(x)=\dfrac{1}{(x-q)(x^2-2r(\cos\theta)x+r^2)}, r>0, 0<θ<πr>0,\ 0<\theta<\pi, the real root q independent of r and θ, g(q)=q2−2r(cos⁡θ)q+r2=Q3′(q)g(q)=q^2-2r(\cos\theta)q+r^2=Q_3'(q):

F(n)(x)=(−1)nn!g(q)[1(x−q)n+1−cos⁡((n+1)ϕ(x))ρ(x)n+1−q−rcos⁡θrsin⁡θsin⁡((n+1)ϕ(x))ρ(x)n+1]F^{(n)}(x)=\frac{(-1)^n n!}{g(q)}\left[\frac{1}{(x-q)^{n+1}}-\frac{\cos((n+1)\phi(x))}{\rho(x)^{n+1}}-\frac{q-r\cos\theta}{r\sin\theta}\frac{\sin((n+1)\phi(x))}{\rho(x)^{n+1}}\right]

§4.0.14 (p. 118) · §4.0.15 (p. 119)

Theorem 4.0.4 — hyperbolic shifted locus (three real roots)

Q3=(x−q)(x2−2r(cosh⁡η)x+r2)Q_3=(x-q)(x^2-2r(\cosh\eta)x+r^2), q independent of r, q≠re±ηq\neq re^{\pm\eta}; on x>max⁡{q,reη}x>\max\{q,re^{\eta}\}:

F(n)(x)=(−1)nn!gh(q)[1(x−q)n+1−cosh⁡((n+1)ψ(x))ρh(x)n+1−q−rcosh⁡ηrsinh⁡ηsinh⁡((n+1)ψ(x))ρh(x)n+1]F^{(n)}(x)=\frac{(-1)^n n!}{g_h(q)}\left[\frac{1}{(x-q)^{n+1}}-\frac{\cosh((n+1)\psi(x))}{\rho_h(x)^{n+1}}-\frac{q-r\cosh\eta}{r\sinh\eta}\frac{\sinh((n+1)\psi(x))}{\rho_h(x)^{n+1}}\right]

On the other real intervals: partial fractions over the three real roots.

§4.0.15 (p. 119)

Angular quantization of zeros and the quartic superposition

(1x2−2r(cos⁡θ)x+r2)(n)=0  ⟺  xk(n)=rcos⁡θ+rsin⁡θcot⁡kπn+1, k=1,…,n\Big(\tfrac{1}{x^2-2r(\cos\theta)x+r^2}\Big)^{(n)}=0\iff x_k^{(n)}=r\cos\theta+r\sin\theta\cot\frac{k\pi}{n+1},\ k=1,\dots,n

Corrected superposition for the quartic example:

(1x4+1)(n)=(−1)nn!22[sin⁡(mϕ1)−cos⁡(mϕ1)ρ1m+sin⁡(mϕ2)+cos⁡(mϕ2)ρ2m],f(4)(0)=−24\Big(\frac{1}{x^4+1}\Big)^{(n)}=\frac{(-1)^n n!}{2\sqrt2}\left[\frac{\sin(m\phi_1)-\cos(m\phi_1)}{\rho_1^{m}}+\frac{\sin(m\phi_2)+\cos(m\phi_2)}{\rho_2^{m}}\right],\quad f^{(4)}(0)=-24

§4.0.16 (p. 124) · §4.0.17 (p. 125)

Theorem 4.0.5 — f′ and the reduced factor

For a polynomial f(x)=(x−r)g(x)f(x)=(x-r)g(x) (r a real root): f′(x)=g(x)  ⟺  (x−r)g′(x)=0f'(x)=g(x)\iff (x-r)g'(x)=0, i.e. at x=rx=r and at the critical points of g. Cubic (Cor. 4.0.6): the vertex x=−b/(2a)x=-b/(2a); quartic (Cor. 4.0.7): the extrema of the cubic g.

§4.0.19 (p. 127)

Theorem 4.0.8 — shifted circle through the roots

For f=(x−r)(x2−bx+c)f=(x-r)(x^2-bx+c) with Δ=b2−4c<0\Delta=b^2-4c<0, roots α±iβ\alpha\pm i\beta, r≠αr\neq\alpha:

xc=r2−c2(r−α),R=∣r−xc∣x_c=\frac{r^2-c}{2(r-\alpha)},\qquad R=|r-x_c|

If r = α the three roots are collinear and no finite circle exists.

§4.0.21 (p. 129) · §4.0.22 (p. 130)

Universal analytic generator

F(x)=∑n=0∞(−1)nρ(x0)n+1[Acos⁡((n+1)ϕ(x0))+Arcos⁡θ+Brsin⁡θsin⁡((n+1)ϕ(x0))](x−x0)nF(x)=\sum_{n=0}^{\infty}\frac{(-1)^n}{\rho(x_0)^{n+1}}\left[A\cos((n+1)\phi(x_0))+\frac{Ar\cos\theta+B}{r\sin\theta}\sin((n+1)\phi(x_0))\right](x-x_0)^n

Valid for ∣x−x0∣<R|x-x_0|<R, the distance to the nearest (complex) root. Amplitude–phase form of the book's example (§4.0.22): cn=2193cos⁡(πn3−ϕ∗)c_n=\tfrac{2\sqrt{19}}{\sqrt3}\cos\big(\tfrac{\pi n}{3}-\phi_*\big), ϕ∗=arctan⁡733≈53.41∘\phi_*=\arctan\tfrac{7}{3\sqrt3}\approx53.41^\circ.

Compute

Interactive calculator

Loading the root-geometry calculator… It runs entirely in your browser and needs JavaScript.

From the book

Worked examples

§4.0.2 (p. 107)

Example 1 — 1/(x² − x + 1), trigonometric case

r=1, θ=π/3r=1,\ \theta=\pi/3; at x=1x=1: ρ(1)=1, ϕ(1)=π/3\rho(1)=1,\ \phi(1)=\pi/3, so f(n)(1)=(−1)nn! sin⁡((n+1)π/3)/sin⁡(π/3)f^{(n)}(1)=(-1)^n n!\,\sin((n+1)\pi/3)/\sin(\pi/3).

f′(1)=−1,f′′′(1)=6f'(1)=-1,\qquad f'''(1)=6

Recomputed here ✓ f′(1) = -1, f‴(1) = 6 (exact).

§4.0.3 (p. 110)

Example 2 — 1/(x² − 3x + 1), hyperbolic case at x = 0

r=1, cosh⁡η=3/2, η=ln⁡3+52r=1,\ \cosh\eta=3/2,\ \eta=\ln\frac{3+\sqrt5}{2}; f(n)(0)=n! sinh⁡((n+1)η)/sinh⁡ηf^{(n)}(0)=n!\,\sinh((n+1)\eta)/\sinh\eta.

f(0)=1,f′(0)=2cosh⁡η=3f(0)=1,\qquad f'(0)=2\cosh\eta=3

Recomputed here ✓ f(0) = 1, f′(0) = 3. (x = 0 lies on the left branch, so the lab evaluates the branch-free form there.)

§4.0.22 (p. 130)

18th derivative, trigonometric regime

f(x)=2x+3x2−x+1f(x)=\frac{2x+3}{x^2-x+1}, 2x+3=2(x−rcos⁡θ)+83(rsin⁡θ)2x+3=2(x-r\cos\theta)+\frac{8}{\sqrt3}(r\sin\theta), ρ(2)=3\rho(2)=\sqrt3, ϕ(2)=arctan⁡(3/3)=π/6\phi(2)=\arctan(\sqrt3/3)=\pi/6:

f(18)(2)=18!(3)19[2cos⁡19π6+83sin⁡19π6]=−7⋅18!59049f^{(18)}(2)=\frac{18!}{(\sqrt3)^{19}}\left[2\cos\frac{19\pi}{6}+\frac{8}{\sqrt3}\sin\frac{19\pi}{6}\right]=-\frac{7\cdot 18!}{59049}

Recomputed here ✓ exact −6 830 759 936 0009-\frac{6\,830\,759\,936\,000}{9} = −7·18!/59049; floating-point closed form −7.5897332622222 × 10¹¹.

§4.0.22 (p. 130) · §4.0.20 (p. 128)

18th derivative, hyperbolic regime between the poles

f(x)=2x+3x2−3x+1f(x)=\frac{2x+3}{x^2-3x+1}, r=1, cosh⁡η=32, sinh⁡η=52r=1,\ \cosh\eta=\tfrac32,\ \sinh\eta=\tfrac{\sqrt5}{2}. Since x = 2 lies between the poles, the book continues the hyperbolic form with a consistent complex branch, ρ(2)=i, ψ(2)=δ−iπ/2, δ=artanh⁡(1/5)\rho(2)=i,\ \psi(2)=\delta-i\pi/2,\ \delta=\operatorname{artanh}(1/\sqrt5):

f(18)(2)=−18![2sinh⁡(19δ)+125cosh⁡(19δ)]=−220465738556743680000f^{(18)}(2)=-18!\left[2\sinh(19\delta)+\frac{12}{\sqrt5}\cosh(19\delta)\right]=-220465738556743680000

The lab uses the branch-free real formula, valid for every real x away from the poles:

f(n)(x)=(−1)nn![1+6/5(x−eη)n+1+1−6/5(x−e−η)n+1]f^{(n)}(x)=(-1)^n n!\left[\frac{1+6/\sqrt5}{(x-e^{\eta})^{n+1}}+\frac{1-6/\sqrt5}{(x-e^{-\eta})^{n+1}}\right]

Recomputed here ✓ exact −220 465 738 556 743 680 000-220\,465\,738\,556\,743\,680\,000 (series and Q(√5) closed form agree); branch-free float −2.2046573855674 × 10²⁰.

§4.0.13 (p. 117)

General cubic derivative theorem — numerical example

F(x)=1x3−2x2+2x−4=1(x−2)(x2+2)F(x)=\frac{1}{x^3-2x^2+2x-4}=\frac{1}{(x-2)(x^2+2)}: q=2, r=2, θ=π/2, g(2)=Q3′(2)=6q=2,\ r=\sqrt2,\ \theta=\pi/2,\ g(2)=Q_3'(2)=6, ϕ(0)=π/2\phi(0)=\pi/2.

F′(0)=−16[14+12]=−18F'(0)=-\frac16\left[\frac14+\frac12\right]=-\frac18

Recomputed here ✓ F′(0) = −1/8 exactly; Theorem 4.0.3 in floating point gives −0.125.

§4.0.15 (p. 119)

Hyperbolic cubic (three real roots)

F=1x3−4x2+4x−1=1(x−1)(x2−3x+1)F=\frac{1}{x^3-4x^2+4x-1}=\frac{1}{(x-1)(x^2-3x+1)}, q=1, gh(1)=−1q=1,\ g_h(1)=-1; for x>(3+5)/2x>(3+\sqrt5)/2:

F(n)(x)=(−1)n+1n![1(x−1)n+1−cosh⁡((n+1)ψ)(x2−3x+1)n+12+15sinh⁡((n+1)ψ)(x2−3x+1)n+12]F^{(n)}(x)=(-1)^{n+1}n!\left[\frac{1}{(x-1)^{n+1}}-\frac{\cosh((n+1)\psi)}{(x^2-3x+1)^{\frac{n+1}{2}}}+\frac{1}{\sqrt5}\frac{\sinh((n+1)\psi)}{(x^2-3x+1)^{\frac{n+1}{2}}}\right]

Recomputed here ✓ at x = 4, n = 2: exact 112/675; Theorem 4.0.4 gives 0.16592592592593.

§4.0.15 (p. 119)

Zeros of the third derivative

1x2+1\frac{1}{x^2+1}: f′′′(x)=24x(1−x2)(x2+1)4f'''(x)=\frac{24x(1-x^2)}{(x^2+1)^4}, zeros cot⁡(kπ/4)=1,0,−1\cot(k\pi/4)=1,0,-1. 1x2−2x+5\frac{1}{x^2-2x+5}: xk=1+2cot⁡(kπ/4)=3,1,−1x_k=1+2\cot(k\pi/4)=3,1,-1.

Recomputed here ✓ -1, 0, 1 and -1, 1, 3.

§4.0.15 (p. 119)

Quartic superposition and fourth derivative

x4+1=(x2−2x+1)(x2+2x+1)x^4+1=(x^2-\sqrt2x+1)(x^2+\sqrt2x+1), θ1=π/4, θ2=3π/4\theta_1=\pi/4,\ \theta_2=3\pi/4; at 0: ρ1=ρ2=1, ϕ1=3π/4, ϕ2=π/4\rho_1=\rho_2=1,\ \phi_1=3\pi/4,\ \phi_2=\pi/4. For n = 4 each bracket equals −2-\sqrt2:

f(4)(0)=4!22(−22)=−24f^{(4)}(0)=\frac{4!}{2\sqrt2}\left(-2\sqrt2\right)=-24

Recomputed here ✓ exact −24 (from 1/(1 + x⁴) = 1 − x⁴ + …); superposition −24.

§4.0.20 (p. 128)

Double-root limit

f=1(x−1)2f=\frac{1}{(x-1)^2}, r=1, η→0r=1,\ \eta\to0: f(n)(0)=(n+1)!f^{(n)}(0)=(n+1)!.

Recomputed here ✓ n = 0…4: 1, 2, 6, 24, 120.00000000000001.

§4.0.21 (p. 129) · §4.0.22 (p. 130)

Taylor generation and the integrated truncations

2x+3x2−x+1\frac{2x+3}{x^2-x+1} at 0: ρ(0)=1, ϕ(0)=arctan⁡(−3)+π=2π/3\rho(0)=1,\ \phi(0)=\arctan(-\sqrt3)+\pi=2\pi/3, cn=(−1)n[2cos⁡2(n+1)π3+83sin⁡2(n+1)π3]c_n=(-1)^n\left[2\cos\frac{2(n+1)\pi}{3}+\frac{8}{\sqrt3}\sin\frac{2(n+1)\pi}{3}\right], radius of convergence 1.

F(x)=3+5x+2x2−3x3−5x4−2x5+⋯ ,cn=2193cos⁡(πn3−ϕ∗), ϕ∗=arctan⁡733F(x)=3+5x+2x^2-3x^3-5x^4-2x^5+\cdots,\qquad c_n=\frac{2\sqrt{19}}{\sqrt3}\cos\Big(\frac{\pi n}{3}-\phi_*\Big),\ \phi_*=\arctan\frac{7}{3\sqrt3}

∫01F(x)sin⁡x dx≈2.3902\int_0^1 F(x)\sin x\,dx\approx2.3902; integrating the 12- and 20-term polynomials gives 2.0719086202 and 2.5024633697. The series itself diverges at x = 1; these are integrated finite truncations, not a convergent equality.

Recomputed here ✓ c₀…c₅ = 3, 5, 2, -3, -5, -2; period 6 through c₁₉; ϕ* = 53.41°.

§4.0.16 (p. 124) · §4.0.17 (p. 125)

Intersections of f′ and g

f=(x−2)(x2+2)f=(x-2)(x^2+2): (x−2)⋅2x=0(x-2)\cdot2x=0 → (0, 2), (2, 6). f=(x−3)(x3−3x)f=(x-3)(x^3-3x): (x−3)(3x2−3)=0(x-3)(3x^2-3)=0 → (−1, 2), (1, −2), (3, 18).

Recomputed here ✓ (0, 2), (2, 6); (-1, 2), (1, -2), (3, 18).

§4.0.19 (p. 127)

Shifted circle through the three roots

f=(x−3)(x2−2x+4)f=(x-3)(x^2-2x+4), r=3, α=1, c=4r=3,\ \alpha=1,\ c=4: xc=9−42⋅2=1.25, R=1.75x_c=\frac{9-4}{2\cdot2}=1.25,\ R=1.75.

Recomputed here ✓ x_c = 1.25, R = 1.75.

Independent checks

Numerical verification

Every row below is recomputed by the lab's engine when this page is rendered and compared with a value obtained independently (the book's stated value, direct evaluation of F, or a second method). Exact values come from BigInt rational arithmetic: the Taylor coefficient of the rational function by exact power-series division, and — separately — the book's closed form evaluated exactly in the quadratic field Q(√Δ), where its irrational part must cancel. The closed form column is the floating-point evaluation of the displayed theorem (overflow-safe up to n = 200). The same checks, and 90+ further values recomputed with sympy/mpmath (scratch/ch4/sympy_check.py → lib/math/ch4/fixtures/reference.json), are asserted by the unit tests in lib/math/ch4/.

26 of 26 checks pass.

CheckExpectedExact (computed)Closed form (floating point)Verdict
F(x) = 1/((x−2)(x²+2)): F′(0) by Theorem 4.0.3 §4.0.13 · p. 117−1/8−1/8−0.125 (Theorem 4.0.3)Pass
1/(x⁴+1): f⁽⁴⁾(0) from the corrected superposition (independently: 1/(1+x⁴) = 1 − x⁴ + … gives −4! = −24) §4.0.15 · p. 119−24−24−24Pass
(2x+3)/(x²−3x+1): F⁽¹⁸⁾(2), between the poles §4.0.22 · p. 130−220465738556743680000−220465738556743680000−2.2046573855674 × 10²⁰ (branch-free)Pass
(2x+3)/(x²−x+1): F⁽¹⁸⁾(2) = −7·18!/59049 §4.0.22 · p. 130−6830759936000/9−6830759936000/9−7.5897332622222 × 10¹¹ (trig)Pass
n = 0 returns F(x₀): Δ < 0 (trigonometric), x₀ = 2 robustness7/37/32.3333333333333 (trig)Pass
n = 0 returns F(x₀): Δ > 0, right branch (hyperbolic form), x₀ = 3 robustness999 (hyperbolic)Pass
n = 0 returns F(x₀): Δ > 0, between the poles, x₀ = 2 robustness−7−7−7 (branch-free)Pass
n = 0 returns F(x₀): Δ > 0, left branch, x₀ = -1 robustness1/51/50.2 (branch-free)Pass
n = 0 returns F(x₀): Δ = 0 (double root, linear numerator), x₀ = 3 robustness9/49/42.25 (double)Pass
n = 0 returns F(x₀): negative real roots, x₀ = 1/2 robustness222 (branch-free)Pass
n = 0 returns F(x₀): roots of opposite sign (c < 0), x₀ = 1 robustness−1/6−1/6−0.16666666666667 (branch-free)Pass
n = 0 returns F(x₀): a zero root (c = 0), x₀ = 1 robustness−1−1−1 (branch-free)Pass
n = 0 returns F(x₀): non-monic denominator, x₀ = 1/3 robustness−9/50−9/50−0.18 (trig)Pass
n = 0 returns F(x₀): cubic (Thm 4.0.4 at x₀ = 4, Thm 4.0.3 at x₀ = 0) and quartic superposition at x₀ = 1/2 robustness1/15, −1/4, 16/171/15, −1/4, 16/170.0666666666667, −0.25, 0.941176470588Pass
n = 0, 1, 2 and n = 200 for five functions (all regimes) at three points robustness60 agreements60 agreementsexact closed form = exact series; float closed form within 10⁻⁹ × cancellationPass
(x+1)/(x²−2x+c), x₀ = 3, n = 3 with c = 1 ± 10⁻¹⁰ (Δ = ∓4·10⁻¹⁰) and c = 1 (Δ = 0) robustnesscontinuous through Δ = 0: −1.875Δ<0: −1.87499999972; Δ>0: −1.87500000028trig −1.87499999972; hyperbolic −1.87500000028 (cancellation ≈ 4.0e+4)Pass
1/(x²−3x+1) at x₀ = 2.618034, 1.1·10⁻⁸ right of the pole r e^η, n = 2 robustness6.28167189282 × 10²³156250002358375000000000000000000000/2487395155696.2816718928212 × 10²³ (hyperbolic)Pass
(x+1)/(x²−5x+4), r e^η = 4: x₀ = 4 (boundary), 4 ± 10⁻⁶, n = 3 §4.0.20 · p. 128x₀ = 4 rejected (pole); hyperbolic form only for x₀ > 4rejected; 4.000001 → hyperbolic; 3.999999 → branch-free−1 × 10²⁵ vs exact −1 × 10²⁵Pass
(x+5)/(x²+3x+1) (roots (−3 ± √5)/2 < 0), x₀ = -5, n = 7 robustness99978480/1948717199978480/194871715.1304768660366 (branch-free)Pass
(x+5)/(x²+3x+1) (roots (−3 ± √5)/2 < 0), x₀ = -1, n = 7 robustness−488880−488880−488880 (branch-free)Pass
(x+5)/(x²+3x+1) (roots (−3 ± √5)/2 < 0), x₀ = 1/2, n = 7 robustness−554022604800/19487171−554022604800/19487171−28430.119733644 (branch-free)Pass
(2x+3)/(x−1)², double root with the linear numerator kept, x₀ = 3, n = 5 §4.0.20 · p. 128−255/8−255/8−31.875 (double)Pass
1/((x−1)²(x−2)): q is also a factor root (g(q) = 0), x₀ = 3, n = 4 §4.0.5 · p. 112171/8171/821.375 (partial-fractions)Pass
(2x+3)/(x²−3x+1) at x₀ = −1 (left branch): hyperbolic form used outside its domain §4.0.20 · p. 128F⁽0⁾ = 0.19999999999999998, F⁽1⁾ = 0.6, F⁽2⁾ = 1.1199999999999999unrestricted hyperbolic form: -0.2, 0.6, -1.12equals (−1)ⁿ⁺¹ × true value → the restriction x > r e^η is necessaryPass
(2x+3)/(x²−x+1) at 0: c₀…c₁₉ and cₙ = (2√19/√3) cos(πn/3 − ϕ*) §4.0.21 · p. 1293, 5, 2, −3, −5, −2 (period 6); ϕ* = arctan(7/(3√3)) ≈ 53.41°3, 5, 2, −3, −5, −2 …; period 6generator agrees; ϕ* = 53.4132°Pass
∫₀¹ (2x+3)/(x²−x+1)·sin x dx and its integrated 12- and 20-term Taylor truncations §4.0.22 · p. 130I ≈ 2.3902, I₁₂ ≈ 2.0719086202, I₂₀ ≈ 2.5024633697I = 2.3901777907, I₁₂ = 2.0719086202, I₂₀ = 2.5024633697Gauss–Kronrod quadrature (truncations are approximations; the series diverges at x = 1)Pass

The interactive calculator repeats these comparisons for any input: exact closed form vs exact series, floating-point closed form, Taylor-mode automatic differentiation and (n ≤ 60) a Cauchy-integral derivative on a circle inside the disc of convergence.

When the formulas hold

Assumptions & domain

Hypotheses of the theorems

  • Theorem 4.0.1: r>0, 0<θ<πr>0,\ 0<\theta<\pi (Δ < 0); valid for every real x and every n≥0n\ge0.
  • Theorem 4.0.2: r>0, η>0r>0,\ \eta>0 (two positive roots). The hyperbolic form with real ψ\psi and positive ρ\rho holds only on x>reηx>re^{\eta}; the branch-free form holds for every real x≠re±ηx\neq re^{\pm\eta}.
  • Theorems 4.0.3/4.0.4: the real root q is independent of r, θ (η) and must not be a root of the factor (g(q)≠0g(q)\neq0); Theorem 4.0.4 only on x>max⁡{q,reη}x>\max\{q,re^{\eta}\}.
  • Theorem 4.0.5: f a real polynomial with a real root r; only real intersections are listed.
  • Theorem 4.0.8: complex pair and r≠αr\neq\alpha; for r=αr=\alpha the roots are collinear and no circle exists.

Domains, poles and limiting cases

  • x₀ at a root of the denominator is rejected (pole); a common root of numerator and denominator is reported as a removable singularity where F is undefined.
  • Δ = 0 is decided exactly (inputs are exact rationals). Near Δ = 0 the formulas stay valid; the branch-free sum cancels strongly when the roots almost coincide, so the lab reports the cancellation factor and the exact value is authoritative.
  • The boundary x=reηx=re^{\eta} is itself a pole; points just to its right use the hyperbolic form, points just to its left the branch-free form.
  • The Taylor series is a power series with radius R equal to the distance from x₀ to the nearest (possibly complex) root; it is displayed as an equality only for |x − x₀| < R.
  • All results are ordinary-function identities (no distributional derivatives at the poles).

What the calculator supports

  • Inputs: exact rationals (integers, decimals, p/q); decimals are used exactly as typed (2.618 means 2618/1000).
  • Derivative order 0 ≤ n ≤ 200 and up to 201 Taylor coefficients (configurable safe limit; values are carried in an overflow-safe form).
  • Linear numerator over a quadratic, the reciprocal cubic with an independent real root, a linear numerator over a polynomial of degree 2–6 with simple roots (superposition), and f = (x − r)g with deg g ≤ 5.
  • Not supported: numerators of degree ≥ the denominator's (polynomial part, §4.0.5 — the derivative of the polynomial part is elementary), repeated complex roots in the superposition mode, and the Legendre example 1/√(x² + 1) of §4.0.15 (not a rational function).
  • Durand–Kerner is used only to locate roots for the superposition and f′ ∩ g modes; every displayed exact value is computed without it.

Where this comes from

Source

Corrected book

Analytical Methods for Higher-Order Derivatives, Integral Transforms, and Matrix-Based Techniques (corrected edition). Section numbers and printed pages below are generated from the corrected PDF.

  • Ch. 4Higher Derivatives of Rational Functions via Trigonometric and Hyperbolic Root Representationp. 107
  • §4.0.1Motivationp. 107
  • §4.0.2Complex-angular factorization when ∆< 0p. 107
  • §4.0.3Hyperbolic representation when ∆> 0p. 110
  • §4.0.4Unified interpretationp. 111
  • §4.0.5A Unified Closed-Form Derivative Framework for Rational Functionsp. 112
  • §4.0.6General Rational Derivative Theoremp. 112
  • §4.0.7Root Parametrization via Trigonometric and Hyperbolic Formsp. 113
  • §4.0.8General Quadratic Formp. 113
  • §4.0.9Extension to Cubic Structurep. 114
  • §4.0.10The Linear-Numerator Case (Trigonometric Regime)p. 115
  • §4.0.11The Linear-Numerator Case (Hyperbolic Regime)p. 116
  • §4.0.12Superposition Formula for Linear Numeratorsp. 117
  • §4.0.13Extension to Cubic Rational Functions: General Cubic Derivative Theoremp. 117
  • §4.0.14Root-Locus Derivative Theorem for Cubic Denominatorsp. 118
  • §4.0.15Hyperbolic Formulation (Three Real Roots)p. 119
  • §4.0.16The General Theorem for Degree np. 124
  • §4.0.17Special Case: Quartic Polynomial (Degree 4)p. 125
  • §4.0.19Geometric Duality and Shifted Circular Symmetryp. 127
  • §4.0.20Additional Refinements and Special Casesp. 128
  • §4.0.21Application to Higher-Order Taylor Series Generationp. 129
  • §4.0.22Examples Using the General Derivative Formulap. 130

Reference implementation

The interactive cases on this page are ported from the author's open-source lab. Where the repository and the corrected book disagree, the book is followed and the difference is listed below.

A-Unified-Geometric-Framework-for-Higher-Derivatives-of-Rational-Functions on GitHub (opens in a new tab)

https://github.com/rida313jamal-source/A-Unified-Geometric-Framework-for-Higher-Derivatives-of-Rational-Functions

Corrections applied (12)

ItemEarlier text (GitHub / old site)Corrected book (used here)
Angle φ(x) in the trigonometric law §4.0.10GitHub (compute_derivative\texttt{compute\_derivative}, compute_taylor_coeffs\texttt{compute\_taylor\_coeffs}) and the old site's lab compute ϕ=atan2⁡(rsin⁡θ, x−rcos⁡θ)\phi=\operatorname{atan2}(r\sin\theta,\,x-r\cos\theta) (old site: atan2⁡(q,x−p)\operatorname{atan2}(q,x-p)) and show it in the formula.The displayed theorem uses the arctangent ratio with the explicit quadrant rule: ϕ=arctan⁡rsin⁡θx−rcos⁡θ\phi=\arctan\frac{r\sin\theta}{x-r\cos\theta} for x>rcos⁡θx>r\cos\theta, π2\frac{\pi}{2} at equality, +π+\pi for x<rcos⁡θx<r\cos\theta; 0<ϕ<π0<\phi<\pi.
Notation of the two regimes §4.0.12GitHub: (Ax+B)/(x2+bx+c)(Ax+B)/(x^2+bx+c) with "r value (real root / modulus)", ϕ\phi and ψ\psi undefined outside the code; old site: centre/half-gap p±iqp\pm iq, θ=atan2⁡(q,p)\theta=\operatorname{atan2}(q,p), reciprocal 1/(ax2+bx+c)1/(ax^2+bx+c) only.Trigonometric regime: r,θ,ρ,ϕr,\theta,\rho,\phi with x2−2r(cos⁡θ)x+r2x^2-2r(\cos\theta)x+r^2; hyperbolic/real-root regime: r,η,ρ,ψr,\eta,\rho,\psi with numerator coefficients A,BA,B (A=α/aA=\alpha/a, B=β/aB=\beta/a for a general ax2+bx+cax^2+bx+c).
Domain of the real hyperbolic formula §4.0.20GitHub applies (−1)nn!ρn+1[Acosh⁡(mψ)+… ]\frac{(-1)^n n!}{\rho^{n+1}}[A\cosh(m\psi)+\dots] for every xx, continuing artanh⁡\operatorname{artanh} and Q\sqrt{Q} into C\mathbb C: for (2x+3)/(x2−3x+1)(2x+3)/(x^2-3x+1) it returns F(18)(2)≈+2.2047×1020−6.5×105iF^{(18)}(2)\approx+2.2047\times10^{20}-6.5\times10^{5}i and F(0)=−3F(0)=-3 (true 33; off by (−1)n+1(-1)^{n+1} on the left branch).Hyperbolic form only on the right exterior branch x>reηx>re^{\eta}; elsewhere the branch-free real-root formula (−1)nn!2rsinh⁡η[Areη+B(x−reη)m−Are−η+B(x−re−η)m]\frac{(-1)^n n!}{2r\sinh\eta}\big[\frac{Are^{\eta}+B}{(x-re^{\eta})^{m}}-\frac{Are^{-\eta}+B}{(x-re^{-\eta})^{m}}\big], which gives F(18)(2)=−220465738556743680000F^{(18)}(2)=-220465738556743680000.
18th-derivative hyperbolic example §4.0.22GitHub's continuation gives the wrong sign and a spurious imaginary part at x=2x=2 (between the poles).f(18)(2)=−18! [2sinh⁡(19δ)+125cosh⁡(19δ)]=−220465738556743680000f^{(18)}(2)=-18!\,[2\sinh(19\delta)+\tfrac{12}{\sqrt5}\cosh(19\delta)]=-220465738556743680000 with the consistent branch ρ(2)=i\rho(2)=i, ψ(2)=δ−iπ/2\psi(2)=\delta-i\pi/2; verified exactly here.
Double root (Δ = 0) §4.0.20GitHub returns (−1)n(n+1)!/rn+2(-1)^n(n+1)!/r^{n+2} for every numerator and every x0x_0 (e.g. (2x+3)/(x−1)2(2x+3)/(x-1)^2: F′(0)=−2F'(0)=-2, true 88; also the wrong sign for a root at +r+r).General linear numerator kept: F(n)(x)=(−1)nn![A(x−xr)n+1+(n+1)(Axr+B)(x−xr)n+2]F^{(n)}(x)=(-1)^n n!\big[\frac{A}{(x-x_r)^{n+1}}+\frac{(n+1)(Ax_r+B)}{(x-x_r)^{n+2}}\big] (linear law §4.0.5); the book's (n+1)!/rn+2(n+1)!/r^{n+2} at x=0x=0 is the case A=0A=0, B=1B=1.
Negative or mixed-sign real roots, c ≤ 0 §4.0.8GitHub raises "math domain error" (arcosh⁡\operatorname{arcosh} of a value <−1<-1) for two negative roots and refuses c≤0c\le0; the old site wrote the negative pair as −re±η-re^{\pm\eta}.The cosh⁡\cosh parametrization is used only for two positive roots; other real-root cases use the branch-free partial-fraction formula, with the book's c<0c<0 representation x1=reηx_1=re^{\eta}, x2=−re−ηx_2=-re^{-\eta} (sinh⁡η=b/(2r)\sinh\eta=b/(2r)) shown for information.
Taylor generator in the hyperbolic regime §4.0.21GitHub uses ψ0=−η\psi_0=-\eta, ρ0=r\rho_0=r at x0=0x_0=0 (left branch): for 1/(x2−3x+1)1/(x^2-3x+1) it lists −1,3,−8,21,…-1,3,-8,21,\dotsCoefficients cn=F(n)(x0)/n!c_n=F^{(n)}(x_0)/n! from the branch-appropriate closed form: 1,3,8,21,⋯=sinh⁡((n+1)η)/sinh⁡η1,3,8,21,\dots=\sinh((n+1)\eta)/\sinh\eta, checked against exact series division.
Cubic theorem parameters §4.0.13Writing the cubic as (x−r)(x2−2rcos⁡θ x+r2)(x-r)(x^2-2r\cos\theta\,x+r^2) (the notation of §4.0.18) uses one letter for the real root and the modulus, which silently imposes q=rq=r.Theorem 4.0.3 uses an independent real root qq, modulus rr and angle θ\theta, with g(q)=q2−2r(cos⁡θ)q+r2=Q3′(q)g(q)=q^2-2r(\cos\theta)q+r^2=Q_3'(q); Theorem 4.0.4 likewise with η\eta on x>max⁡{q,reη}x>\max\{q,re^{\eta}\}.
Quartic partial-fraction superposition §4.0.15Superseded superposition for 1/(x4+1)1/(x^4+1) (the corrected book labels the new formula "the corrected superposition"); neither GitHub nor the old site implemented the quartic.f(n)=(−1)nn!22[sin⁡(mϕ1)−cos⁡(mϕ1)ρ1m+sin⁡(mϕ2)+cos⁡(mϕ2)ρ2m]f^{(n)}=\frac{(-1)^n n!}{2\sqrt2}\big[\frac{\sin(m\phi_1)-\cos(m\phi_1)}{\rho_1^{m}}+\frac{\sin(m\phi_2)+\cos(m\phi_2)}{\rho_2^{m}}\big] with quadrant-corrected ϕ1,2\phi_{1,2}; f(4)(0)=−24f^{(4)}(0)=-24 (verified exactly).
Amplitude–phase form of the Taylor coefficients §4.0.22GitHub shows only (−1)n[Acos⁡((n+1)ϕ0)+Ksin⁡((n+1)ϕ0)](-1)^n[A\cos((n+1)\phi_0)+K\sin((n+1)\phi_0)] with ϕ0\phi_0 from atan2.cn=2193cos⁡(πn3−ϕ∗)c_n=\frac{2\sqrt{19}}{\sqrt3}\cos(\frac{\pi n}{3}-\phi_*), ϕ∗=arctan⁡733≈53.41∘\phi_*=\arctan\frac{7}{3\sqrt3}\approx53.41^\circ; written ϕ∗\phi_* on this site to keep it distinct from ϕ(x)\phi(x) (the book reuses the letter ϕ\phi).
Scope of the calculator §4.0.12Old site: 1/(ax2+bx+c)1/(ax^2+bx+c) only, 1≤n≤101\le n\le10, plus a generic Durand–Kerner root viewer. GitHub: fixed monic denominator, no exact values, no cubic or quartic.Linear numerator over any quadratic, 0≤n≤2000\le n\le200, exact BigInt values, Taylor generator, cubic Theorems 4.0.3–4.0.4, quartic superposition, Theorem 4.0.5; Durand–Kerner kept only as a supporting root finder.
Book section references §4.0.15Old site: page numbers for §4.0.2, §4.0.3, §4.0.8 and §4.0.15 taken from an earlier layout (all offset from the corrected PDF), and §4.0.15 titled "Trigonometric Formulation (Complex Conjugate Roots)".Section numbers, titles and pages are generated from the corrected PDF (listed above); §4.0.15 is "Hyperbolic Formulation (Three Real Roots)".

Parity with the GitHub lab

Both sections of the Streamlit app are ported: the higher-order derivative calculator (inputs A, B, b, c, n, x₀ → here α, β, a, b, c, n, x₀ with a general leading coefficient, exact rational inputs and the book's regime rules) and the Taylor-series generator (closed-form coefficients, the list of coefficients and the partial series). The app's root type, r, θ/η, ρ(x₀), φ/ψ(x₀) readouts and its “general formula” panel appear in the “Root regime” and “Closed form” panels. Where the app and the corrected book differ (atan2, the unrestricted hyperbolic branch, the double root, negative roots) the book is followed; see the corrections above.