Back to draw-Gnuplot

# Omar Khayyam's method

This plot explains Omar Khayyam's graphical method to solve the cubic equation $$x^3+a^2 x = b$$, for $$a, b \gt 0$$:

a: 3$b: 26$
r: b/(2*a^2)$draw2d(/* General settings */ xrange = [-3,3], yrange = [-2,4], axis_top = false, axis_right = false, axis_left = false, axis_bottom = false, transparent = true, user_preamble = "unset tics", title = "Omar Khayyam solution to the cubic x^3 + a^2 x = b", dimensions = [450,450], terminal = svg, file_name = "omar", /* draw parabola y=x^2/a */ explicit(x^2/a,x,-3,3), head_length = 0.1, vector([-1.626,2],[-0.5,-0.5]), label(["y=x^2/a",-1.5,2.1]), /* draw circle: radius r & center (r,0) */ ellipse(r,0,r,r,0,360), vector([r,0],[0,r]), label(["r=b/(2 a^2)",r-0.5,r*2/3]), /* draw axis */ points_joined = true, color = black, point_size = 0, points([[0,3.5],[0,-1.5]]), points([[-2.5,0],[2.5,0]]), /* Mark points P e Q*/ color = black, point_type = 7, point_size = 1, points([[2,4/3]]), label(["P",2.25,1.42]), points([[2,0]]), label(["Q",2.25,0.23]), /* Draw parallel to parabola axis */ point_size = 0, color = blue, line_type = dots, points([[2,2],[2,-0.5]]), /* Get the solution */ line_width = 4, color = red, line_type = solid, points([[0,0],[2,0]]), label(["The length of this red segment is the solution",1,-0.5]))$


In words:

1. Draw parabola $$y=\frac{x^2}{a}$$.
2. Draw circumference $$(x-\frac{b}{2 a^2})^2 + y^2 = \frac{b^2}{4a^4}$$.
3. Draw a segment from P, the intersecting point, paralel to the axis of the parabola, and get point Q.
4. Measure the distance from Q to the vertex of the parabola. This is the solution of the equation.

We can make use of Maxima to verify this result. Point P is the instersection of two curves, the parabola $$y=\frac{x^2}{a}$$ and the circumference $$(x-\frac{b}{2 a^2})^2 + y^2 = \frac{b^2}{4a^4}$$:

kill(all)$sol: solve([y=x^2/a, (x-b/(2*a^2))^2+y^2=b^2/(4*a^4)], [x,y])$


The result is too long and we don't reproduce it here. Since Khayyam claims that the length of the red segment is the solution, taking into account that OQ is equal to the abscissa of P, we only show the first coordinates of the solutions saved in variable sol.

absc: map(first,sol);


$\left[ x=\left({{-1}\over{2}}-{{\sqrt{3}\,i}\over{2}}\right)\, \left({{\sqrt{27\,b^2+4\,a^6}}\over{2\,3^{{{3}\over{2}}}}}+{{b }\over{2}}\right)^{{{1}\over{3}}}-{{\left({{\sqrt{3}\,i}\over{2}}+{{ -1}\over{2}}\right)\,a^2}\over{3\,\left({{\sqrt{27\,b^2+4\,a^6} }\over{2\,3^{{{3}\over{2}}}}}+{{b}\over{2}}\right)^{{{1}\over{3}}}}} , \\ x=\left({{\sqrt{3}\,i}\over{2}}+{{-1}\over{2}}\right)\,\left({{ \sqrt{27\,b^2+4\,a^6}}\over{2\,3^{{{3}\over{2}}}}}+{{b}\over{2}} \right)^{{{1}\over{3}}}-{{\left({{-1}\over{2}}-{{\sqrt{3}\,i}\over{2 }}\right)\,a^2}\over{3\,\left({{\sqrt{27\,b^2+4\,a^6}}\over{2\,3^{{{ 3}\over{2}}}}}+{{b}\over{2}}\right)^{{{1}\over{3}}}}} , \\ x=\left({{ \sqrt{27\,b^2+4\,a^6}}\over{2\,3^{{{3}\over{2}}}}}+{{b}\over{2}} \right)^{{{1}\over{3}}}-{{a^2}\over{3\,\left({{\sqrt{27\,b^2+4\,a^6} }\over{2\,3^{{{3}\over{2}}}}}+{{b}\over{2}}\right)^{{{1}\over{3}}}}} , \\ x=0 \right]$

We are looking for real numbers, since at the time Omar Khayyam lived, complex number were not known. Therefore we don't pay attention to the first and second abscissas, which contain the imaginary unit i. The fourth abscissas is also discarded. So only the third can be the first coordinate of the intersecting point P, a real positive number, namely:

realsol: third(absc);


$x=\left({{\sqrt{27\,b^2+4\,a^6}}\over{2\,3^{{{3}\over{2}}}}}+{{b }\over{2}}\right)^{{{1}\over{3}}}-{{a^2}\over{3\,\left({{\sqrt{27\,b ^2+4\,a^6}}\over{2\,3^{{{3}\over{2}}}}}+{{b}\over{2}}\right)^{{{1 }\over{3}}}}}$

Is this a valid solution of equation $$x^3+a^2 x = b$$? Let's ask Maxima substituting this expressions in the cubic equation and simplifying:

radcan(subst(realsol, x^3+a^2*x=b));


$b=b$

Which is an identity, and Khayyam was right.