Implicit bias with Ritz-Galerkin method in understanding deep learning for solving PDEs

Abstract: This paper aims at studying the difference between Ritz-Galerkin (R-G) method and deep neural network (DNN) method in solving partial differential equations (PDEs) to better understand deep learning. To this end, we consider solving a particular Poisson problem, where the information of the right-hand side of the equation f is only available at n sample points, that is, f is known at finite sample points. Through both theoretical and numerical studies, we show that solution of the R-G method converges to a piecewise linear function for the one dimensional (1D) problem or functions of lower regularity for high dimensional problems. With the same setting, DNNs however learn a relative smooth solution regardless of the dimension, this is, DNNs implicitly bias towards functions with more low-frequency components among all functions that can fit the equation at available data points. This bias is explained by the recent study of frequency principle (Xu et al., (2019) [17] and Zhang et al., (2019) [11, 19]). In addition to the similarity between the traditional numerical methods and DNNs in the approximation perspective, our work shows that the implicit bias in the learning process, which is different from traditional numerical methods, could help better understand the characteristics of DNNs.

\section*{Acknowledgments}

\begin{abstract}
This paper aims at studying  the difference between Ritz-Galerkin (R-G) method and deep neural network (DNN) method in solving partial differential equations (PDEs) to better understand deep learning. To this end, we consider solving a particular Poisson problem, where the information of the right-hand side of the equation $f$ is only available at $n$ sample points, that is, $f$ is known at finite sample points.
Through both theoretical and numerical studies, we show that solution of the R-G method converges to a piecewise linear function for the one dimensional (1D) problem or functions of lower regularity for high dimensional problems. With the same setting, DNNs however learn a relative smooth solution regardless of the dimension, this is, DNNs implicitly bias towards functions with more low-frequency components among all functions that can fit the equation at available data points. This bias is explained by the recent study of frequency principle (Xu et al., (2019) \cite{xu2019frequency} and Zhang et al., (2019) \cite{zhang2019explicitizing,luo2019on}). In addition to the similarity between the traditional numerical methods and DNNs in the approximation perspective, our work shows that the implicit bias in the learning process, which is different from traditional numerical methods, could help better understand the characteristics of DNNs.
\end{abstract}

\ams{35Q68, 65N30, 65N3
}
\keywords{Deep learning, Ritz-Galerkin method, Partial differential equations, F-Principle}

\maketitle

\section{Introduction}
Deep neural networks (DNNs) become increasingly important in scientific computing fields
\cite{weinan2017deep,weinan2018deep,han2018solving,he2018relu,liao2019deep,siegel2019approximation,hamilton2019dnn,cai2019deep,wang2020mesh}.
A major potential advantage over traditional numerical methods is
that DNNs could overcome the curse of dimensionality in high-dimensional
problems. With traditional numerical methods, several studies have
made progress on the understanding of the algorithm characteristics
of DNNs. For example, by exploring
ReLU DNN representation of continuous piecewise linear function in FEM, the work \cite{he2018relu}
theoretically establishes that a ReLU DNN can accurately represent any linear finite element functions. In the aspect of the convergence behavior, the works \cite{xu2019training,xu2019frequency}
show a Frequency Principle (F-Principle) that DNNs often learn
low-frequency components first while most of the conventional methods (e.g.,
Jacobi method) exhibit the opposite convergence behavior---higher-frequency components are learned faster. These understandings could
lead to a better use of DNNs in practice, such as  DNN-based algorithms are proposed
based on the F-Principle to fast eliminate high-frequency error \cite{cai2020phase,liu2020multi}.

The aim of this paper is to investigate the different behaviors between DNNs and traditional numerical method, e.g., Ritz-Galerkin (R-G) method. To this end, we utilize an example to show their stark difference, that is, solving PDEs given a few sample points. We denote $n$ by the sample number and $m$ by the basis number in the Ritz-Galerkin method or the neuron number in DNNs. In traditional PDE models, we consider the situation where the source functions in the equation are completely known, i.e. the sample number $n$ can go to infinity.
But in practical applications, such as signal processing, statistical mechanics, chemical and biophysical dynamic systems, we often encounter the problems that only a few sample values can be obtained. It is interesting to ask what effect R-G methods would have on solving this particular problem, and what the solution would be obtained by the DNN method.

In this paper, we show that R-G method considers the discrete sampling points as linear combinations of Dirac delta functions, while DNN methods always use a relatively smooth function to interpolate the discrete sampling points.  And we incorporate the F-Principle to show how DNN is different from the R-G method, that is, for all functions that can fit the training data, DNNs implicitly bias towards functions with more low-frequency components. In addition to the similarity between the traditional numerical methods and DNNs in the approximation perspective \cite{he2018relu}, Our work shows that the implicit bias in the learning process, which is different from traditional numerical methods, could  help better understand the characteristics of DNNs.

The rest of the paper is organized as follows. In section 2, we briefly introduce the R-G method and the DNN method. In sections 3 and 4, we present the difference between using these two methods to solve PDEs theoretically and numerically. We end the paper with the conclusion in section 5.
\section{Preliminary}
In this section we take the toy model of Poisson's equation as an example to investigate the difference of solution behaviors between R-G method and DNN method.

\subsection{Poisson problem}
We consider the $d$-dimensional Poisson problem posed on the bounded domain $\Omega \subset \mathbb{R}^d$ with Dirichlet boundary condition as
\begin{eqnarray}\label{Model}
\left\{\begin{array}{c}
 - \Delta u(\bm{x})=f(\bm{x}),\quad \bm{x}\in\Omega,\\
 u(\bm{x})=0, \quad \bm{x} \in \partial\Omega,
\end{array}
\right.
\end{eqnarray}
where $\displaystyle \Delta$ represents the Laplace operator, $\bm{x}=(x_1,x_2,\cdots, x_d)$ is a d-dimensional vector. It is known that the problem (\ref{Model})
admits a unique solution for $f\in L^2(\Omega)$, and its regularity can be raised to $C_b^{s+2}(\Omega)$ if $f\in C_b^s(\Omega)$
for some $s\ge 0$.
 In literatures, there are a number of effective numerical methods to solve problem \eqref{Model} in general case. We here consider a special situation: we only have the information of $f(\bm{x})$ at the $n$ sample points $\bm{x}_i$ $(i =1,\cdots,n)$. In practical applications, we may imagine that we only have finite experiment data, i.e., the value of  $f(\bm{x}_i)$ $(i =1,\cdots,n)$, and have no more information of $f(\bm{x})$ at other points.
Through solving such a particular Poisson problem \eqref{Model} with R-G method and deep learning method, we aim to find the bias of these two methods in solving PDEs.

\subsection{R-G method}
In this subsection, we briefly introduce the R-G method \cite{Brenner2008The}.
For problem \eqref{Model}, we construct a functional
\begin{eqnarray}
J(u) = \frac12a(u,u)-(f,u),
\end{eqnarray}
where
$$
a(u,v) = \int_\Omega \nabla u(\bm{x})\nabla v(\bm{x}) d\bm{x} ,\quad (f,v)=\int_\Omega f(\bm{x})v(\bm{x}) d\bm{x}.
$$
The variational form of problem \eqref{Model} is the following:
\begin{eqnarray}\label{MPE}
\text{Find}\; u\in H_0^1(\Omega),\; \text{s.t.} \; J(u)=\min_{v\in H_0^1(\Omega)} J(v).
\end{eqnarray}
The weak form of \eqref{MPE} is to find $u\in H_0^1(\Omega)$ such that
\begin{eqnarray}\label{VW}
a(u,v)=(f,v), \quad \forall \;v \in H_0^1(\Omega).
\end{eqnarray}
The problem (\ref{Model}) is the strong form if the solution $u\in H_0^2(\Omega)$.
To numerically solve \eqref{VW}, we now introduce the finite dimensional space $U_h$ to approximate the infinite dimensional space $H_0^1(\Omega)$.  Let $U_h \subset H_0^1(\Omega)$ be a subspace with a sequence of basis functions $\{\phi_1,\phi_2,\cdots,\phi_m\}$. The numerical solution $u_h \in U_h$ that we will find can be represented as
\begin{eqnarray}\label{ucphi}
u_h = \sum_{k=1}^{m} c_k\phi_k,
\end{eqnarray}
where the coefficients $\{c_i\}$ are the unknown values that we need to solve.
Replacing $H_0^1(\Omega)$ by $U_h$, both problems \eqref{MPE} and \eqref{VW} can be transformed to solve the following system:
\begin{eqnarray}\label{RG}
\sum_{k=1}^{m}c_ka(\phi_k,\phi_j)= (f,\phi_j),\quad j=1,2,\cdots,m.
\end{eqnarray}
From \eqref{RG}, we can calculate $c_i$, and then obtain the numerical solution $u_h$. We usually call \eqref{RG} R-G equation.

For different types of basis functions, the R-G method can be divided into finite element method (FEM) and spectral method (SM) and so on. If the basis functions $\{\phi_i(\bm{x})\}$ are local, namely, they are compactly supported, this method is usually taken as the FEM. Assume that $\Omega$ is a polygon, and we divide it into finite element grid $\mathcal{T}_h$ by simplex, $h=\max_{\tau\in\mathcal{T}_h}\text{diam}(\tau)$.  A typical finite element basis is the linear hat basis function, satisfying
\begin{eqnarray}
\phi_k(\bm{x_j}) = \delta_{kj},\quad \bm{x_j}\in \mathcal{N}_h,
\end{eqnarray}
where $\mathcal{N}_h$ stands for the set of the nodes of grid $\mathcal{T}_h$. The schematic diagram of the basis functions in 1-D and 2-D are shown in Fig. \ref{basis}.
On the other hand, if we choose the global basis function such as Fourier basis or Legendre basis \cite{Shen2011Spectral}, we call R-G method spectral method.

\begin{figure}[h!]
\centering
\vspace{8pt}
\begin{minipage}[h]{0.45\linewidth}
\begin{tikzpicture}[font=\large,scale=0.5]
\centering
     \tikzset{to/.style={->,>=stealth',line width=.5pt}}
      \node(v1) at (0,0) {$\bigcdot$}; \node[yshift=-0.2cm]  at (v1.south) {$x_{j-1}$};
      \node(v2) at (3,0) {$\bigcdot$}; \node[yshift=-0.2cm] at (v2.south) {$x_{j}$};
      \node(v3) at (6,0) {$\bigcdot$}; \node[yshift=-0.2cm]  at (v3.south) {$x_{j+1}$};
     \node(v4) at (3,5) {};
      \draw[thick] (-0.5,0.01)--(6.5,0.01); \draw[thick] (0,0)--(3,5); \draw[thick] (6,0)--(3,5);
      \draw[thick, dashed] (v2)--(v4);
\end{tikzpicture}
\end{minipage}
\hspace{0.6cm}
\begin{minipage}[h]{0.45\linewidth}
\begin{tikzpicture}[font=\large,scale=0.5]
\centering
     \tikzset{to/.style={->,>=stealth',line width=.5pt}}
     \coordinate (v1) at (0,0); \coordinate (v7) at (0,5);
     \coordinate (v2) at (-2,-0.5); \coordinate (v3) at (-0.5,-1);
     \coordinate (v4) at (2.,-0.5); \coordinate (v5) at (2,1.1);
     \coordinate (v6) at (-1,1);
     \draw[fill=yellow!20] (v2)--(v3)--(v4)--(v5)--(v6)--cycle;
      \node at (v1) {$\bigcdot$};   \node at (v2) {$\bigcdot$};
      \node at (v3) {$\bigcdot$};   \node at (v4) {$\bigcdot$};
      \node at (v5) {$\bigcdot$};   \node at (v6) {$\bigcdot$};
      \draw (v1)--(v2);  \draw (v1)--(v3);  \draw (v1)--(v4);  \draw (v1)--(v5);  \draw (v1)--(v6);
      \draw[dashed] (v1)--(v7); \draw (v2)--(v7); \draw (v3)--(v7); \draw (v4)--(v7); \draw (v5)--(v7);\draw (v6)--(v7);
      \coordinate (e1) at (-3,1.4); \coordinate (e2) at (-3.2,-0.3); \coordinate (e3) at (-2,-2); \coordinate (e4) at (0,-2.3);
      \coordinate (e5) at (1.5,-2); \coordinate (e6) at (3.5,-1.2); \coordinate (e7) at (4,0.5); \coordinate (e8) at (3.8,1.7);
       \node at (e1) {$\bigcdot$};   \node at (e2) {$\bigcdot$};
      \node at (e3) {$\bigcdot$};   \node at (e4) {$\bigcdot$};
      \node at (e5) {$\bigcdot$};   \node at (e6) {$\bigcdot$};   \node at (e7) {$\bigcdot$}; \node at (e8) {$\bigcdot$};
      \draw (e1)--(e2)--(e3)--(e4)--(e5)--(e6)--(e7)--(e8);
      \draw (e1)--(v6);  \draw (e1)--(v2);  \draw (e2)--(v2);  \draw (e3)--(v2);  \draw (e3)--(v3);
      \draw (e4)--(v3);  \draw (e5)--(v3);  \draw (e5)--(v4);  \draw (e6)--(v4);  \draw (e7)--(v4); \draw (e7)--(v5);
      \draw (e8)--(v5);
\end{tikzpicture}
\end{minipage}
      \caption{The finite element basis function in 1d and 2d.}
      \label{basis}
\vspace{8pt}
 \end{figure}

The error estimate theory of R-G method has been well established. Under suitable assumption on the regularity of solution,  the linear finite element solution $u_h$ has the following error estimate
$$\Vert u-u_h \Vert_{1} \leq C_1h|u|_{2},$$
where the constant $C_1$ is independent of grid size $h$. The spectral method has the following error estimate
$$\Vert u-u_h \Vert \leq \frac {C_2}{m^s},$$
where $C_2$ is a constant and the exponent $s$ depends only on the regularity (smoothness) of the solution $u$. If $u$ is smooth enough and satisfies certain boundary conditions, the spectral method has the spectral accuracy.

In this paper, we use the R-G method to solve the Poisson problem \eqref{Model} in a special setting, i.e. we only have the information of $f(\bm{x})$ at the $n$ sample points $\bm{x}_i$ $(i =1,\cdots,n)$. In this situation, the integral on the right hand side (r.h.s.) of R-G equation \eqref{RG} is hard to be computed exactly, so we need to compute it with the proper numerical method. For higher dimensional case, it is known the Monte Carlo (MC) integration \cite{Christian2004Monte} may be the only viable approach. Then replacing the integral on the r.h.s. of \eqref{RG} with the form of MC integral formula, we obtain
\begin{eqnarray} \label{VarEqM}
\sum_{k=1}^{m}c_k a(\phi_k,\phi_j)= \frac{1}{n}\sum_{i=1}^nf(\bm{x}_i)\phi_j(\bm{x}_i),\quad j=1,2,\cdots,m.
\end{eqnarray}
In fact, if we use the Gaussian quadrature rule to compute the integral on the r.h.s. of equation \eqref{RG}, we still have the similar form as \eqref{VarEqM}, except that $1/n$ is replaced by the  corresponding Gaussian quadrature weights $w_i$. Because of the inaccuracy of the right-hand side integral, equation \eqref{VarEqM} is actually different from the traditional R-G method. However, we can see clearly the bias of the R-G method under this special setting in the later numerical experiments.

\subsection{DNN method}
We now introduce the DNN method. The $L$-layer neural network is denoted by
\begin{equation}
u_{\bm{\theta}}(\bm{x})= \bm{W}^{[L-1]} \sigma\circ(\bm{W}^{[L-2]}\sigma\circ(\cdots (\bm{W}^{[0]} \bm{x} + \bm{b}^{[0]} )\cdots)+\bm{b}^{[L-2]})+\bm{b}^{[L-1]},\label{generalDnn}
\end{equation}
where $\bm{W}^{[l]} \in \mathbb{R}^{m_{l+1}\times m_{l}}$, $\bm{b}^{[l]}=\mathbb{R}^{m_{l+1}}$, $m_0=d$, $m_{L}=1$,
$\sigma$ is a scalar function and ``$\circ$'' means entry-wise operation.
We denote the set of parameters by \[
\bm{\theta}=(\bm{W}^{[0]},\bm{W}^{[1]},\ldots,\bm{W}^{[L-1]},\bm{b}^{[0]},\bm{b}^{[1]},\ldots,\bm{b}^{[L-1]}),
\]
and  an entry of $\bm{W}^{[l]}$ by   $\bm{W}^{[l]}_{ij}$.

Particularly, the one-hidden layer DNN with activation function $\sigma$ is given as
\begin{eqnarray}
u_{\theta}(\bm{x}) = \sum_{k=1}^{m} c_k{\sigma}({w}_k \cdot \bm{x}+ b_k),
\end{eqnarray}
where $w_k\in \mathbb{R}^d, c_k, b_k\in \mathbb{R}$ are parameters. If we denote $\sigma({w}_k \cdot \bm{x}+ b_k)=\phi_k(\bm{x})$, then we obtain the similar form to R-G solution \eqref{ucphi}, i.e.,
\begin{eqnarray}\label{relunn}
u_{\theta}(\bm{x}) =\sum_{k=1}^{m} c_k{\phi_k}(\bm{x}).
\end{eqnarray}
The difference between the expressions of the solutions of these two methods is that the basis functions of the R-G solution are known, while the  bases of the DNN solution are unknown, and need to be obtained together with the coefficients through the gradient descent algorithm with a loss function.

 The loss function corresponding to problem \eqref{Model} is given by
\begin{eqnarray}\label{dnnloss}
L_{0}(u_{\theta},f) = \frac{1}{n} \sum_{i=1}^n\left( \Delta u_{\theta}(\bm{x}_i)+f(\bm{x}_i) \right)^2+ \beta \int_{\partial\Omega} u_{\theta}(\bm{x})^2 ds,\label{eq:lossdirect}
\end{eqnarray}
 or a variation form \cite{weinan2017deep}
\begin{eqnarray}\label{dnnloss_variation}
L_{1}(u_{\theta},f) = \frac{1}{n} \sum_{i=1}^n\left(\frac{1}{2}|\nabla_{x}u_{\theta}(\bm{x}_i)|^{2}-f(\bm{x}_i)u_{\theta}(\bm{x}_i)\right)+ \beta \int_{\partial\Omega} u_{\theta}(\bm{x})^2 ds, \label{eq:Energy-1}
\end{eqnarray}
where the last term is for the boundary condition and $\beta$ is a hyper-parameter.

\subsection{Frequency Principle}
In this section, we illustrate and introduce a rigorous definition of the F-Principle.

We start from considering a two-layer neural network, following \cite{zhang2019explicitizing,luo2019on},
\begin{equation}
    f(\bm{x}, \bm{\theta}) = \sum_{j=1}^m a_j \sigma\left(\bm{w}_j^\intercal\bm{x} - \abs{\bm{w}_j}c_j\right), \label{eq:relunn2}
\end{equation}
where $\bm{w}_j, \bm{x} \in \mathbb{R}^d$, $\bm{\theta} = (\bm{a}^\intercal,\bm{w}_1^\intercal,\ldots,\bm{w}_m^\intercal,\bm{c}^\intercal)^\intercal$, $\bm{a},\bm{c}\in\mathbb{R}^{m}$
and $\bm{W}=(\bm{w}_1,\ldots,\bm{w}_m)^\intercal\in\mathbb{R}^{m\times d}$, and
$\sigma(z)=\max(z,0)$ ($z\in\mathbb{R}$) is the activation function of ReLU. Note that this two-layer model is slightly different from the model in (\ref{relunn}) for easy calculation in \cite{zhang2019explicitizing,luo2019on}.      The target
function is denoted by $f(\bm{x})$. The network is trained by  mean-squared error (MSE) loss function
\begin{equation}
  L=\int_{\mathbb{R}^d}\frac{1}{2}\abs{f(\bm{x},\bm{\theta})-f(\bm{x})}^{2}\rho(\bm{x}) \diff{\bm{x}}, \label{eq:mseloss}
\end{equation}
where $\rho(\bm{x})$ is a probability density.
 Considering finite samples, we have
 \begin{equation}
     \rho(\bm{x})=\frac{1}{n}\sum_{i=1}^n\delta(\bm{x}-\bm{x}_i).
 \end{equation}
 For any function $g$ defined on $\mathbb{R}^d$, we use the following convention of the Fourier transform and its inverse:
\begin{equation*}
    \textstyle{
    \mathcal{F}[g](\bm{\xi})=\int_{\mathbb{R}^d}g(\bm{x})\mathrm{e}^{-2\pi\mathrm{i} \bm{\xi}^\intercal\bm{x}}\diff{\bm{x}},\quad
    g(\bm{x})=\int_{\mathbb{R}^d}\mathcal{F}[g](\bm{\xi})    \mathrm{e}^{2\pi\mathrm{i} \bm{x}^\intercal\bm{\xi}}\diff{\bm{\xi}},
    }
\end{equation*}
where $\bm{\xi}\in\mathbb{R}^{d}$ denotes the frequency.

The study in \cite{zhang2019explicitizing,luo2019on} shows that when the neuron number $m$ is sufficient large, training the network in (\ref{eq:relunn2}) with gradient descent is described by the following differential equation
\begin{equation}
\partial _t \mathcal{F}[h](\bm{\xi}) = -\Gamma(\bm{\xi}) \mathcal{F}[(h-f)\rho](\bm{\xi}) \label{gdform}
\end{equation}
 with initial $\mathcal{F}[h_{{\rm ini}}](\bm{\xi})$.
The long time solution of \eqref{gdform} is equivalent to solve the following optimization problem
\begin{align}
    &\min_{h-h_{\mathrm{ini}}\in F_{\gamma}}\int_{\mathbb{R}^d}\Gamma^{-1}(\bm{\xi})\abs{\mathcal{F}[h-h_{{\rm ini}}](\bm{\xi})}^{2}\diff{\bm{\xi}},\label{eq: minFPnorm}\\
    &{\rm s.t. } \quad  h(\bm{x}_{i})=f(\bm{x}_i)  \quad  {\rm for}  \quad  i=1,\cdots,n,  \label{sampleconstraint}
\end{align}
where
\begin{equation}
    \Gamma(\bm{\xi})=\frac{\frac{1}{m}\sum_{j=1}^{m}\left(\norm{\bm{w}_{j}(0)}^{2}+a_{j}(0)^{2}\right)}{\norm{\bm{\xi}}^{d+3}}+\frac{4\pi^{2}\frac{1}{m}\sum_{j=1}^{m}\left(\norm{\bm{w}_{j}(0)}^{2}a_{i}(0)^{2}\right)}{\norm{\bm{\xi}}^{d+1}},
\end{equation}
here $\norm{\cdot}$ represents the $L^2$-norm, $w_{j}(0)$ and $a_{j}(0)$ represent initial parameters before training, and
\begin{equation}
    F_{\gamma}=\{h|\int_{\mathbb{R}^d}\Gamma^{-1}(\bm{\xi})\abs{\mathcal{F}[h](\bm{\xi})}^{2}\diff{\bm{\xi}}<\infty\}.
\end{equation}
Since $\Gamma(\bm{\xi})$ monotonically decreases with $\bm{\xi}$, the gradient flow in (\ref{gdform}) rigorously defines the F-Principle, i.e., low frequency converges faster. The minimization in (\ref{eq: minFPnorm}) clearly shows that the DNN has an implicit bias in addition to the sample constraint in (\ref{sampleconstraint}). As $(\Gamma(\bm{\xi}))^{-1}$ monotonically increases with $\bm{\xi}$, the optimization problem prefers to choose a function that has less high frequency components, which explicates the implicit bias of the F-Principle --- DNN prefers low frequency  \cite{xu2019training,xu2019frequency}.

\section{Main results}

\subsection{R-G method in solving PDE}

In the classical case, $f(\bm{x})$ is a given function, so we can compute exactly the integral on the right-hand side of the R-G equation \eqref{RG}. As the number of basis functions $m$ approaches infinity, the numerical solution obtained by R-G method \eqref{RG} approximates the exact solution of problem \eqref{Model}.  It is interesting to ask if we only have the information of $f$ at the finite $n$ points, what could happen to numerical solution obtained by \eqref{VarEqM} when $m \rightarrow \infty$?

Fixing the number of sample points $n$, we study the property of the solution of the numerical method \eqref{VarEqM}. We have the following theorem.

\begin{thm}\label{thm1}
When $m\rightarrow \infty$, the numerical method \eqref{VarEqM} is solving the problem
\begin{eqnarray}\label{Th1Eq}
\left\{\begin{array}{c}
\displaystyle -\Delta u(\bm{x}) = \frac{1}{n}\sum_{i=1}^n \delta(\bm{x}-\bm{x}_i)f(\bm{x}_i), \quad \bm{x}\in \Omega, \\
 u(\bm{x})=0, \quad \bm{x} \in \partial\Omega,
\end{array}
\right.
\end{eqnarray}
where $\delta(x)$ represents the Dirac delta function.
\end{thm}

\begin{proof}
According to the filtering property of delta function, the formula for the integral on the right hand side (r.h.s.) of the equation \eqref{VarEqM} is the exact integral between the function of the r.h.s. of equation \eqref{Th1Eq} and the basis function $\phi_j(x)$, i.e.,
$$ \frac{1}{n}\sum_{i=1}^n f(\bm{x}_i) \phi_j(\bm{x}_i)=\int_{\Omega}\frac{1}{n}\sum_{i=1}^n f(\bm{x}_i) \delta(\bm{x}-\bm{x}_i)\phi_j(\bm{x}) d\bm{x},\quad j=1,2,\cdots.$$
Note that $\delta(x): \mathbb{R}^d \rightarrow \mathbb{R}$ is a continuous linear functional. According to the error estimation theory \cite{Brenner2008The,Shen2011Spectral}, the finite dimensional system \eqref{VarEqM} evidently approximates the problem \eqref{Th1Eq} when $m\rightarrow \infty$.
\end{proof}

{\bf Remark:}
For the 1D case, the analytic solution to problem \eqref{Th1Eq} defined in $[a,b]$ can be given as  a piecewise linear function, namely
\begin{eqnarray}\label{exactSol}
u(x)= \displaystyle \frac{1}{n}\sum_{i=1}^n f(x_i)(b-x_i)\frac{x-a}{b-a} -\frac{1}{n}\sum_{i=1}^n f(x_i)(x-x_i)H(x-x_i),
\end{eqnarray}
where $H(x)$ is the Heaviside step function
\begin{eqnarray*}
H(x)=\left\{ \begin{array}{cc}
0,&x<0,\\
1,&x\ge 0.
\end{array}
\right.
\end{eqnarray*}
For the 2D case, \cite{Polyanin2002Handbook} gives the exact solution in $[0,a]\times[0,b]$ by Green's function
\begin{eqnarray}
u(x,y)=\frac{4}{nab}\sum_{i=1}^nf_i\sum_{k=1}^{\infty}\sum_{l=1}^{\infty}\frac{\sin(p_kx)\sin(q_ly)\sin(p_kx_i)\sin(q_ly_i)}{p_k^2+q_l^2}.
\end{eqnarray}
where $f_i=f(x_i,y_i), p_k=\pi k/a, q_l=\pi l/b$. We can prove that this series diverges at the sampling point $(x_i, y_i) (i=1,2,\cdots,n)$ and converges at other points. Therefore, the 2d exact solution $u(x,y)$ is highly singular.

\subsection{Numerical experiments}
Although R-G method and DNN method can be equivalent to each other in the sense of approximation, in this section, we present three examples to investigate the difference between the solution obtained by the R-G method and the one obtained by the DNN with gradient descent optimization. For simplicity, we consider the following 1D Poisson problem
\begin{eqnarray}\label{ExModel}
\left\{\begin{array}{c}
-u''(x)=f(x),\quad x\in(-1,1),\\
u(-1)=u(1)=0,
\end{array}
\right.
\end{eqnarray}
where we only know what the value of $f(x)$ is at $n$ points, i.e. $f(x_i)~(i=1,2,\cdots,n)$. In experiments, $f(x_i)$ are sampled from the function $f(x) =-(4x^3-6x)\exp(-x^2)$.

\bigskip
\noindent {\bf Example 1:}  Fixing the number of sampling points $n=5$, we use R-G method and DNN method to solve the problem \eqref{ExModel}, respectively. The reason why we choose fewer sample points here is that in this situation we can investigate the property of the solution more clearly. The results are shown as follows.

\noindent{\bf R-G  method.}
First, we use R-G method to solve the problem \eqref{ExModel}, specially the spectral method with the Fourier basis function given as
$$\phi_i(x) = \sin(k\pi x),\quad  k = 1,2,\cdots,m.$$
We set the numbers of basis functions $m=5,10, 50, 500$, respectively. Fig. \ref{RGM5} plots the numerical solutions and the exact solution \eqref{exactSol} of problem \eqref{Th1Eq} with different $m$. One can see that the R-G solution approximates the piecewise linear function \eqref{exactSol}  when $m \rightarrow \infty$. This result is consistent with the solution property analyzed in Theorem \ref{thm1}.

 \begin{figure}
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.45\textwidth]{Fig1.eps} \hspace{0.2in}
	\includegraphics[width=0.45\textwidth]{Fig2.eps} \vspace{0.1in}\\
	\includegraphics[width=0.45\textwidth]{Fig3.eps} \hspace{0.2in}
	\includegraphics[width=0.45\textwidth]{Fig4.eps}
\end{minipage}
\caption{(Example 1): Numerical solutions in SM with 5 sampling points.}
\label{RGM5}
\end{figure}

\noindent{\bf DNN method.}
For a better comparison with R-G method, we choose the activation function by $\sin(x)$ in DNN with one hidden layer. And the number of neurons are taken as $m=5,10, 50, 500$. The loss function \eqref{dnnloss} is selected with the parameter $\beta=10$.  We reduce the loss to an order of 1e-4, and take learning rate by 1e-4. And 1000 test points are used to plot the figures.
The DNN solutions are shown in Fig. \ref{DNNM5}, in which we observe that the DNN solutions are always smooth even when $m$ is very large.

 \begin{figure}
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.45\textwidth]{Fig5.eps} \vspace{0.1in}
	\includegraphics[width=0.45\textwidth]{Fig6.eps} \vspace{0.1in}\\
	\includegraphics[width=0.45\textwidth]{Fig7.eps} \vspace{0.1in}
	\includegraphics[width=0.45\textwidth]{Fig8.eps} \vspace{0.1in}
\end{minipage}
\caption{(Example 1): Numerical solutions in DNN method with 5 sampling points.}
\label{DNNM5}
\end{figure}

\bigskip
\noindent{\bf Example 2:}
In this example, we use the ReLU function as the basis function in R-G method and the activation function in DNN method to repeat the experiments in Example 1. Here we randomly choose another 10 sampling points.

Since the linear finite element function $\phi_j(x)$ can be expressed by ReLU functions for one dimensional case, namely,
\begin{equation*}
\phi_j(x) = \frac{1}{h_{j-1}}\text{ReLU}(x-x_j)-(\frac{1}{h_{j-1}}+\frac{1}{h_j})\text{ReLU}(x-x_j)+\frac{1}{h_{j}}\text{ReLU}(x-x_{j+1}),
\end{equation*}
where $h_j=x_{j+1}-x_{j}$, we can use ReLU as the basis function for R-G method. For convenience, we just use the linear finite element function $\phi_j(x)$ instead of ReLU function as the basis function. Fig. \ref{FEMM5} shows that there is no doubt that the FEM solution approximates the piecewise linear solution \eqref{exactSol}.

In DNN method, we choose the number of neurons $m=5, 10,50,500$, respectively. And we use the variational from of the loss function \eqref{dnnloss_variation} because of the second order derivative of ReLU function is always zero. Fig. \ref{DNNrelu} shows that the DNN learns the data as a relatively smoother function than the R-G method.

\begin{figure}
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.45\textwidth]{Fig9.eps} \hspace{0.2in}
	\includegraphics[width=0.45\textwidth]{Fig10.eps} \vspace{0.1in}\\
	\includegraphics[width=0.45\textwidth]{Fig11.eps} \hspace{0.2in}
	\includegraphics[width=0.45\textwidth]{Fig12.eps}
\end{minipage}
\caption{(Example 2): Numerical solutions in FEM with 10 sampling points.}
\label{FEMM5}
\end{figure}

 \begin{figure}
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.45\textwidth]{Fig13.eps} \vspace{0.1in}
	\includegraphics[width=0.45\textwidth]{Fig14.eps} \vspace{0.1in}\\
	\includegraphics[width=0.45\textwidth]{Fig15.eps} \vspace{0.1in}
	\includegraphics[width=0.45\textwidth]{Fig16.eps} \vspace{0.1in}
\end{minipage}
\caption{(Example 2): Numerical solutions in DNN method with ReLU activation function and 10 sampling points.}
\label{DNNrelu}
\end{figure}

\bigskip
\noindent{\bf Example 3:} We  consider the 2D case
\begin{eqnarray*}
\left\{\begin{array}{c}
 - \Delta u(\bm{x})=f(\bm{x}),\quad \bm{x}\in(0,1)^2,\\
 u(\bm{x})=0, \quad \bm{x} \in \partial(0,1)^2,
\end{array}
\right.
\end{eqnarray*}
where $\bm{x}=(x, y)$ and we know the values of $f$ at $n$ points sampled from the function $f(\bm{x}):=f(x, y) = 2\pi^2\sin(\pi x)\sin(\pi y).$
We fix the number of sample points $n=5^2$.
The sampling points in the $x$ direction and the $y$ direction are both at $x_h=[0.1,0.25,0.5,0.8,0.9]$.
We test the solution with the number of basis $m=5,50,100,200$, respectively. Fig. \ref{2d} plots the R-G solutions with Legendre basis and piecewise linear basis function. It can be seen that the numerical solution is a function with strong singularity.  Fig. \ref{2d1} shows the profile of R-G solutions at $y=0.5$ for various $m$, in which we can see that the values of numerical solutions at the sampling points get larger and larger with the increase of $m$. However, Fig. \ref{2dDNN} shows that the DNN solutions are stable without singularity for large $m$.

 \begin{figure}[ht!]
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.23\textwidth]{Fig17.eps}\hspace{0.1in}
	\includegraphics[width=0.23\textwidth]{Fig18.eps}\hspace{0.1in}
	\includegraphics[width=0.23\textwidth]{Fig19.eps}\hspace{0.1in}
	\includegraphics[width=0.23 \textwidth]{Fig20.eps}\vspace{0.2in} \\
	\includegraphics[width=0.23\textwidth]{Fig21.eps}\hspace{0.1in}
	\includegraphics[width=0.23\textwidth]{Fig22.eps}\hspace{0.1in}
	\includegraphics[width=0.23\textwidth]{Fig23.eps}\hspace{0.1in}
	\includegraphics[width=0.23 \textwidth]{Fig24.eps}\\
\end{minipage}
\caption{\label{2d} (Example 3): R-G solutions with different $m$. The basis functions for the first and the second row are Legendre basis function and piecewise  linear  basis  function, respectively.}
\end{figure}

 \begin{figure}[ht!]
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.45\textwidth]{Fig25.eps}\hspace{0.2in}
	\includegraphics[width=0.45\textwidth]{Fig26.eps}
\end{minipage}
\caption{\label{2d1} (Example 3): Profile of R-G solutions with different $m$.}
\end{figure}

 \begin{figure}[ht!]
\centering
\begin{minipage}[]{\textwidth}
	\includegraphics[width=0.24\textwidth]{Fig27.eps}
	\includegraphics[width=0.24\textwidth]{Fig28.eps}
	\includegraphics[width=0.24\textwidth]{Fig29.eps}
	\includegraphics[width=0.24 \textwidth]{Fig30.eps}\vspace{0.2in} \\
	\includegraphics[width=0.24\textwidth]{Fig31.eps}
	\includegraphics[width=0.24\textwidth]{Fig32.eps}
	\includegraphics[width=0.24\textwidth]{Fig33.eps}
	\includegraphics[width=0.24 \textwidth]{Fig34.eps}\\
\end{minipage}
\caption{\label{2dDNN} (Example 3): DNN solutions with different $m$. The activation functions for the first and the second row are ${\rm ReLU} (x)$ and $\sin (x)$, respectively.}
\end{figure}

\section{Discussion of DNN method in solving PDE}

DNNs are widely used in solving PDEs, especially for high-dimensional problems. The optimizing the loss functions in Eqs. \eqref{eq:lossdirect} and \eqref{eq:Energy-1} are equivalent to solving (\ref{RG}) except that the bases in \eqref{eq:lossdirect} and \eqref{eq:Energy-1} are adaptive. In addition, the DNN problem is optimized by (stochastic) gradient descent. The experiments in the previous section have shown that when the number of bases goes to infinity, DNN methods solve (\ref{Model}) by a relatively smooth and stable function compared with the one obtained by Theorem \ref{thm1}. We now utilize the F-Principle to understand what leads to the smoothness.

For two-layer wide DNNs with $d=1$, the two terms of $\Gamma(\bm{\xi})$ in the minimization problem of (\ref{eq: minFPnorm}) yield different fitting results. Note that $\min \int_{R} ||\bm{\xi}||^{-2}|\mathcal{F}[h](\bm{\xi})|^{2}\mathrm{d}\bm{\xi}$ leads to a piecewise linear function, while $\min \int_{R} ||\bm{\xi}||^{-4}|\mathcal{F}[h](\bm{\xi})|^{2}\mathrm{d}\bm{\xi}$ leads to a cubic spline. Since the DNN is a combination of both terms, therefore, the DNN would yields to a much smoother function than the piecewise linear function. For a general DNN, the coefficient  $\Gamma(\bm{\xi})$  in (\ref{gdform}) cannot be obtained exactly, however,  the monotonically decreasing property of  $\Gamma(\bm{\xi})$ with respect to $\bm{\xi}$ can be postulated based on the F-Principle.

\section{Conclusion}
This paper compares the different behaviors of Ritz-Galerkin method and DNN method through solving PDEs to better understand the working principle of DNNs. We consider a particular Poisson problem \eqref{Model}, where the r.h.s. term $f$ is a discrete function. We analyze why the two numerical methods behave differently in theory. R-G method deals with the discrete $f$ as the linear combination of Dirac delta functions, while DNN methods implicitly bias towards functions with more low-frequency components to interpolate the discrete sampling points due to the F-Principle. Furthermore, from the numerical experiments, as the number of bases increases, one can see that the solutions obtained by R-G method approximate piecewise linear functions for 1d case and singular function for the 2d case, regardless of the basis function, but the solutions obtained by DNN method are smoother for 1d case and stable for the 2d case. In conclusion, based on the theoretical and numerical study in comparison to traditional methods in solving PDEs, DNN method possesses special implicit bias towards low frequencies, which leads to a well-bahaved solution even in a heavily over parameterized setting.

\section*{Acknowledgments}
Zhiqin Xu is supported by National Key R\&D Program of China (2019YFA0709503), Shanghai Sailing Program, Natural Science Foundation of Shanghai (20ZR1429000), and partially supported by HPC of School of Mathematical Sciences at Shanghai Jiao Tong University. Jihong Wang and Jiwei Zhang is partially supported by NSFC under No. 11771035 and NSAF U1930402, and the Natural Science Foundation of Hubei Province No. 2019CFA007, and Xiangtan University 2018ICIP01.


On Tusi's Classification of Cubic Equations and its Connections to Cardano's Formula and Khayyam's Geometric Solution

Abstract: Omar Khayyam's studies on cubic equations inspired the 12th century Persian mathematician Sharaf al-Din Tusi to investigate the number of positive roots. According to the noted mathematical historian Rashed, Tusi analyzed the problem for five different types of equations. In fact all cubic equations are reducible to a form {\it Tusi form} $x^2-x^3=c$. Tusi determined that the maximum of $x^2-x^3$ on $(0,1)$ occurs at $\frac{2}{3}$ and concluded when $c=\frac{4}{27} \delta$, $\delta \in (0,1)$, there are roots in $(0, \frac{2}{3})$ and $(\frac{2}{3},1)$, ignoring the root in $(-\frac{1}{3},0)$. Given a {\it reduced form} $x^3+px+q=0$, when $p <0$, we show it is reducible to a Tusi form with $\delta = \frac{1}{2} + {3\sqrt{3} q}/{4\sqrt{-p^3}}$. It follows there are three real roots if and only if $\Delta =-(\frac{q^2}{4}+\frac{p^3}{27})$ is positive. This gives an explicit connection between $\delta$ in Tusi form and $\Delta$ in Cardano's formula. Thus when $\delta \in (0,1)$, rather than using Cardano's formula in complex numbers one can approximate the roots iteratively. On the other hand, for a reduced form with $p >0$ we give a novel proof of Cardono's formula. While Rashed attributes Tusi's computation of the maximum to the use of derivatives, according to Hogendijk, Tusi was probably influenced by Euclid. Here we show the maximizer in Tusi form is computable via elementary algebraic manipulations. Indeed for a {\it quadratic Tusi form}, $x-x^2=\delta/4$, Tusi's approach results in a simple derivation of the quadratic formula, comparable with the pedagogical approach of Po-Shen Loh. Moreover, we derive analogous results for the {\it general Tusi form}. Finally, we present a novel derivation of Khayyam's geometric solution. The results complement previous findings on Tusi's work and reveal further facts on history, mathematics and pedagogy in solving cubic equations.

\section{Introduction} \label{sec1} In this article we examine the problem of solving for the real roots of a cubic equation
but in the context of the work of the 12th century Persian mathematician Sharaf al-Din Tusi.  In the process we offer novel insights, including canonical representation of cubic equations, strategies for the approximation of the real roots, connections between the work of Tusi and Cardano's formula discovered several centuries later, as well as connections to Omar Khayyam's geometric solution.
To summarise, we believe the article bridges three significant historic works on cubic equations: Khayyam's geometric solution, Tusi's classification and Cardano's formula, turning these connections into relevant subjects of study in today's curricula.

It is now well known that any cubic equation with real coefficients via affine transformation
can be written in the {\it reduced form} (also called {\it depressed form}):
\begin{equation}
x^3+px+q=0, \quad p, q \in \mathbb{R}.
\end{equation}
In fact  we may assume $p=0, \pm 1$. The case of $p=0$ is trivial. When $p= \pm 1$ we refer to the equation as the {\it normal form}. Any reduced form must have at least one real root, a consequence of the {\it Intermediate Value Theorem}, a fact that most likely was intuitively known at the time of Tusi and even sooner. Given the reduced form, {\it Cardano's formula} for the roots  takes the form
$$
\bigg (-\frac{q}{2} + \sqrt{-\Delta} \bigg )^{1/3} + \bigg (-\frac{q}{2} - \sqrt{-\Delta} \bigg )^{1/3}, \quad \Delta = - \bigg (\frac{q^2}{4} + \frac{p^3}{27} \bigg ).$$

Cardano's formula, apparently first due to del Ferro (1465-1562), was finally published by Cardano in 1545. Others credited to the formula are, Tartaglia and Ferrari.  For an account of the history of cubic equations see e.g., Irving \cite{Irving}.  The discovery of the formula for the solutions of a cubic equation is no doubt very significant by itself, even if one ignores all other consequences, such as the discovery of complex numbers and ultimately Galois theory.  Nevertheless, it does not imply that a formula is always superior to a numerical approximation methods.  This is obvious even in solving a quadratic equation.  A closed formula for roots of $x^2-2=0$ does not provide numerical approximation to $\pm \sqrt{2}$.  But in the case of Cardano's formula other oddities can happen.
When there are three distinct real roots  the {\it discriminant} $\Delta$ is positive so that the formula necessarily passes to complex numbers, a fact that led to the invention of complex number. In this case, if there is no rational root, it is impossible to express the roots in real radicals, see \cite{Warden}.  In other words Cardano's formula is necessarily expressed in terms of the cube roots of two complex numbers. This according to Turnbull \cite{Turn}, see also Zucker \cite{Zucker}, is ``paradoxical.'' He goes on to say,

``{\it To mathematicians of the 16th and 17th centuries this feature was mysterious: they spoke of the {\it irreducible} case. DeMoivre's theorem allows us to negotiate a calculation of the roots; but it remains a curious fact that from a real cubic three real roots cannot be extracted by Cardan's algebraic formula without a circuitous passage into, and out of, the domain of complex numbers.}''

Using DeMoivre's theorem we can avoid the complex plane but at the cost of using transcendental functions with transcendental arguments. Zucker \cite{Zucker} gives a way to bypass the use of trigonometric functions but at the cost of using hypergeometric functions.

Whether we consider solving a cubic equation from  historical point of view,  mathematical, philosophical, practical, or pedagogical point of view, it is undoubtedly a fascinating subject. In this article we refer to the work of Tusi and show it  connects with the work resulting in Cardono's formula and  complements
it in several ways, revealing interesting facts about cubic equations.  The work of Sharaf al-Din Tusi on cubic equations has been analyzed and documented in detail by the noted historian of mathematics of the Golden Age of Islam, Roshdi Rashed \cite{Rashed1, Rashed2}. In this article we rely on Rashed's work and build on it.
Tusi's findings followed the work of Omar Khayyam on cubic equations, both on classifying the number of  positive zeros of a cubic equation and determining some roots. Negative numbers were avoided at the time. Also, equations were written
in such a way that would make the coefficients positive.  In so doing, according to Rashed, Khayyam had considered $25$ forms of polynomials of degree at most three. Quadratic equations were classified by Khwarizmi \cite{Khar} several centuries earlier.  For a history of quadratic and cubic equations see e.g., Katz \cite{Katz} and Irving \cite{Irving}. Khayyam also had derived geometric solutions for positive roots of cubic polynomials. Tusi's treatise in the first part covers $20$ forms of the $25$ polynomials with more rigor than Khayyam. But for the last $5$ forms he analyzes whether or not there are positive roots by means of computation of maximum of the relevant polynomials when the constant term is discarded. The five cubic equations Tusi considers, all with positive coefficients, were,  $x^3 + c = ax^2$, $x^3 + c = bx$, $x^3 + ax^2 +c = bx$,
$x^3 + bx +c = ax^2$, and $x^3 +c = ax^2 + bx$. While mathematical notations where not invented, they could manipulated symbols that  represented these unknowns. Indeed already Khayyam (even Khwarizmi) had names for the unknown $x$ as well as for $x^2$, $x^3$, etc. The fact that they did not allow negative coefficients does not mean they did not deal with negative numbers implicitly. After all, terms with negative coefficients could be moved to the other side of the equation.

The first of the five cubic e1quations Tusi considered, $x^3 + c = ax^2$, can be reduced to the form $x^3+c=x^2$. According to Rashed's examination, in determining the number of positive roots Tusi considered the roots of $x^2 - x^3$ and its maximum value, which Tusi calls ``the greatest number'', by looking at the roots of its derivative, without giving a name for it. Rashed claims Tusi argued the maximum occurs when $x = 2/3$ and concluded the equation $x^2 - x^3 = c$ has exactly one positive solution when $c = 4/27$, and two positive solutions when $0 < c < 4/27$, one in the intervals $(0, \frac{2}{3})$ and another in $(\frac{2}{3},1)$. A third root  in  $(-\frac{1}{3},0)$ was not considered. Also, the case of negative $c$ was not considered. Rashed emphasizes this is not the first time Tusi uses the concept of derivative and that he had already used it for numerical solutions of equations. Rashed's conclusion on the use of derivative has been contested by other scholars who argue that Tusi could have obtained the result on the number of positive roots by other methods, not requiring derivatives, see for example Berggren \cite{Berg}.  Furthermore, Houzel \cite{Houz} has given a different possibility for the use of derivative by Tusi, even in the treatment of numerical solution of equations.  Indeed, Houzel has discussed several examples given by Tusi with his algorithm for finding a positive integer solution of a cubic equation using a polygon which could somehow resemble Newton's polygon for a polynomial in two variables (see \cite{Christ} for an account on Newton's method for approximating roots and resolution of affected equations).  Nevertheless, Rashed's translation of Tusi's work is universally praised.  For example, Hogendijk \cite{Hogen} considers  Rashed's translation significant, saying

\vspace{.25cm}

``{\it Until recently Omar Khayyam was supposed to have given the most advanced medieval treatment of cubic equations. Thanks to Rashed's publication \cite{Rashed1, Rashed2} we now know al-Tusi went considerably further.}''

\vspace{.25cm}

Yet Hogendijk suggests that since cubic curves were never drawn by medieval mathematicians, nor derivatives  mentioned explicitly in
any known medieval Arabic text, the question arises whether Tusi's
methods and motivation can also be explained in terms of standard ancient and
medieval mathematics. He proposes such an alternative explanation and concludes,

\vspace{.25cm}

``{\it Tusi probably found his results by means of manipulations of squares and rectangles on the basis of Book II of Euclid’s Elements.}''

\vspace{.25cm}

Our initial interest was to see if we could find an easy argument using the knowledge of the time that would verifiably and unambiguously compute the maximum value arising in Tusi's analysis. The fact that we are not historians of math does not preclude us from such an investigation, even if we restrict it to the analysis of historians on Tusi's work.  We were able to conclude that the maximizer in Tusi form can be computed via elementary algebraic manipulation that were possible at Tusi's time.  Even geometric-based arguments and manipulations require working with inequalities and equalities so that even if modern notations were not present at Tusi's time, algebraic manipulations were possible.

On the one hand, we show how to directly compute the maximizer. On the other hand, we argue it is easy to guess the location of the maximizer and then verify whether or not a guessed value is the correct maximizer.  Using the maximizer is one component in Tusi's characterization of positive zeros.  A second component that cannot be ignored is that even if in Tusi's time the notion of real numbers was not present, an intuitive notion of the {\it Intermediate Value Theorem} was necessary to conclude the existence of roots in the designated intervals.  In this sense geometric arguments alone are not sufficient.  More importantly, in our investigations we were able to derive further results, including an explicit connection between Tusi's classification and Cardano's formula discovered  centuries later, and even a motivation to give a novel derivation of this formula, as well as a concise and simple  derivation of Khayyam's geometric solution for all cubic equations.  These finding also give rise to algorithms for approximations of  the roots of a cubic equation. In fact by extending Tusi form, we gain insights on the quadratic formula and even high degree Tusi forms.  In summary, our results complement previous findings on Tusi's work and show novelties about solving cubic equations that will be of interest, not just to historians of mathematics but the community of mathematicians, mathematics educators and students.

Studying Tusi's work gives rise to classification of all cubic equations with real coefficients taking one of the two exclusive forms
\begin{equation}
x^3-x^2+\frac{4}{27}\delta =0, \quad \delta \in (0,1); \quad {\rm ~~and~~}
x^3 + x+q=0.
\end{equation}
We shall refer to the first equation without any restrictions on $\delta$  as {\it Tusi form}. In this article we show every reduced cubic equation with $p <0$ is in turn reducible to a  Tusi form with $\delta = \frac{1}{2} +  \frac{3\sqrt{3}q}{4 \sqrt{-p^3}}$ and then from Tusi's classification it follows that it has three real roots if and only if $\Delta >0$.  In particular, characterization of zeros of Tusi form gives rise to the use of $\Delta$ present in Cardano's formula. When the discriminant is positive, Cardano's formula is necessarily expressed in complex numbers. However, Tusi form with $\delta \in (0,1)$ necessarily will have a root in each of the three intervals, $(0,2/3)$, $(2/3,1)$ and $(-1/3, 0)$.  This information can be used to approximation the roots, e.g., by using the  bisection method or  Newton method.  Indeed even a precomputed table of discrete  values of $x^2-x^3$ in the interval $[-1/3,1]$ (an interval containing the three roots) to a desired precision suffices in the approximation of the three roots of a Tusi form with $\delta \in (0,1)$. In summary, Tusi form simplifies solving a cubic equation by their formulation into a corresponding Tusi form, $x^3-x^2+4\delta/27=0$, where there are three distinct real roots if and only if $\delta \in (0,1)$.
The normal form $x^3+x+q=0$ covers all other cases. We may conclude a real cubic has a single real root if and only if it is either reducible to Tusi form with $\delta \not \in (0,1)$, or reducible to a reduced form with $p=1$.

The remaining sections are organized as follows. In Section \ref{sec2} we consider Tusi form and characterize its zeros. In Section \ref{sec3} we characterize the zeros of reduced and normal forms.  In Section \ref{sec4} we first derive Cardano's formula for normal forms and then extends it to reduced forms.  In Section \ref{sec5} we derive Khayyam's geometric solution of cubic equation for normal forms and describe an algorithm for approximation of the roots utilizing this formulation.  In Section \ref{sec6} we consider solving quadratic equations, showing  all real quadratic equations are reducible to the following {\it quadratic Tusi form},
\begin{equation}
x^2-x+ \frac{\delta}{4}=0, \quad \delta \in \mathbb{R}.
\end{equation}
This trivially leads to the quadratic formula.  Knowing how to solve this single quadratic equation is enough to solve  all quadratic equations. We contrast this approach to solving a quadratic equation with Po-Shen Loh's \cite{Loh} derivation of the quadratic formula (also featured in The New York Times, see \cite{NYT}), considered novel and pedagogically advantageous to the standard method based on completing the square. In Section \ref{sec7} we extend relevant results to the {\it general Tusi form}
\begin{equation}
x^{n}-x^{n-1}+ \frac{{(n-1)}^{n-1}}{n^n} \delta =0, \quad n \geq 2, \quad \delta \in \mathbb{R}
\end{equation}
while using  much the same reasoning as the case of cubic equation. We end with brief concluding remarks.

\section{Tusi Form and Characterization of its Zeros} \label{sec2} Tusi considered the number of positive  zeros of
\begin{equation}
p(x)=x^3-bx^2+c=0,   \quad b >0.
\end{equation}
He assumed $c >0$, however we consider $c$ to be arbitrary. The above equation is equivalent to
\begin{equation}
g(x)= bx^2 - x^3= x^2(b-x)=c.
\end{equation}
Graphically, the problem seeks the number of intersections of the horizontal line $y=c$ and the curve defined by $g(x)$. Clearly, $q(x)=0$ at $x=0$ and $x=b$, while it stays positive on $(0,b)$ and  negative on $(0, \infty)$.  Since negative zeros were ignored at the time, the focus of Tusi's search was the interval $(0,b)$. Apparently Tusi reasoned that in order to determine how many solutions are possible for a given $c$, he had to determine the largest value of $g(x)$ on the interval $(0,b)$. Using derivatives, trivially the maximum occurs at $2b/3$ and is $4b^3/27$. Moreover, $g(x)$ is monotonically increasing on $(0,2b/3)$, and decreasing on $(2b/3,b)$. Thus for any $c \in (0,4b^3/27)$ there are two positive solutions to the cubic equation. The details of Tusi's reasoning, as interpreted by  Rashed, is given in \cite{Rashed2}.  We offer a new interpretation. We can reformulate Tusi's cubic by replacing $x$ with $\alpha b$, reducing it into a canonical form. Letting
\begin{equation}
\phi(\alpha) = \alpha^{2}- \alpha^3,
\end{equation}
then  $g(\alpha b)= b^3 \phi(\alpha)$.
Thus  $g(\alpha b)=c$ if and only if $\phi(\alpha)= c/b^3$ if and only if $p(\alpha b)=0$.

To solve $\phi(\alpha) = constant$ for positive solutions, we observe that $\phi$ is zero at $\alpha=0, 1$.  Thus if we can determine the location of the maximizer, $\alpha^*$,  of $\phi(\alpha)$ between zero and one, then by changing the $constant$ value between zero and the maximum value, $\phi^*= \phi(\alpha^*)$, we may conclude that positive roots of $\phi(\alpha) = constant$  must lie in $(0,\alpha^*)$ and $(\alpha^*,1)$.  In Proposition \ref{prop0} we derive $\alpha^*$ via a simple argument without differentiation.
However, one may ask: Can we guess the value of $\alpha^*$? After all, nowadays,  as well as throughout the history, guessing the answer to math problems is one of the significant techniques to solving them. But guessing must be followed by rigorous proof. Even if an initial guess is wrong, trial and error will soon lead to the correct answer. Note that $\alpha^2-\alpha^3=\alpha^2(1-\alpha)$. Thus  $\alpha^* \geq 1/2$.  One would try $1/2$, $3/4$, $2/3$, etc.  The fact that $\alpha - \alpha^*$ must be a factor of $\phi(\alpha) - \phi(\alpha^*)$ provides the mechanism for verification of the correctness of a guessed value for $\alpha^*$. Lemma \ref{lem3z} proves the maximum value is $4/27$, attained at $2/3$. Thus we set $constant =\delta 4/27$ and when $\delta \in (0,1)$ the solutions to $\phi(\alpha) = constant$ lie in $(0,1)$.

\begin{definition}
We say a cubic equation is in {\it Tusi form} if it is given as $\alpha^3-\alpha^2+\delta \frac{4}{27}=0$, $\delta \in \mathbb{R}$.
\end{definition}

\begin{prop}   \label{prop0} The maximum value of  $\phi(\alpha)$ on $[0, 1]$ is attained at $\frac{2}{3}$.
\end{prop}

\begin{proof} Let $\alpha^*$ be the maximizer. It must be a root of
$$h(\alpha)=\phi(\alpha)-\phi(\alpha^*)=(\alpha^2-{\alpha^*}^2) - (\alpha^3-{\alpha^*}^3).$$
But $h(\alpha)$ can be written as
$$h(\alpha)=-(\alpha-\alpha^*)q(\alpha), \quad q(\alpha)=\alpha^2+(\alpha^* -1)\alpha+\alpha^*(\alpha^*-1).$$
Now $q(0)=\alpha^*(\alpha^*- 1) <0$, $q(1)={\alpha^*}^2 >0$ so that $h(\alpha)$ has another root $\beta^* \in (0,1)$. Solving $q(\alpha)=0$ via the quadratic formula it is easy to see there is also a negative root.
Thus if $\alpha^*=\beta^*$ we get
$$\sqrt{(\alpha^*-1)^2-4 \alpha^*(\alpha^* -1)}=(3 \alpha^* -1).$$
Squaring and solving for $\alpha^*$, we get $\alpha^* =2/3$. Suppose $\alpha^* \not = \beta^*$. We argue
$\phi((\alpha^*+ \beta^*)/2)$ cannot be larger, equal or smaller than  $\phi(\alpha^*)$.  It cannot be larger because $\alpha^*$ is maximizer. It cannot be equal because then $h(\alpha)=0$ has three positive roots but we know it has a negative root.  If it is less, then for any value $c$ between the $\phi((\alpha^*+ \beta^*)/2)$ and $\phi(\alpha^*)$ then because of fluctuation of $\phi$ the equation  $\phi(\alpha)=c$ must have more than three roots in $(0,1)$, a contradiction.
\end{proof}

\begin{remark} One may claim that Tusi did not have algebraic notations and for him $x^3$ and $x^2$ were solids. However, even so he must have manipulated symbols that  represented these unknowns. Indeed already Khayyam (even Khwarizmi) had names for the unknown $x$ as well as for $x^2$, $x^3$, etc.
In fact Hogendijk  who thinks  Tusi ``probably'' found his results by means of manipulation of squares and rectangles on the basis of Book II of Euclid's Elements, still argues (pages 74,75) that Tusi defines the maximizer algebraically.  Though the true derivation of the value of maximizer is unclear.     Note that  from Proposition \ref{prop0} the derivation of the maximizer does  not automatically follow from factorization of $\phi(\alpha)-\phi(\alpha^*)$. Additional arguments are needed for it.   In this sense Tusi's derivation needs more than Euclid's geometric arguments to derive the maximizer.   As will be shown in the next lemma,  another approach starts by guessing the value for the maximizer.  Either approach of Proposition \ref{prop0} or Lemma \ref{lem3z} requires factorization as a first step in the proof, a process that was certainly possible at Tusi's time, even in the absence of formal mathematical notations.
\end{remark}

\begin{lemma}   \label{lem3z} The maximum value of  $\phi(\alpha)$ on $[0, \infty)$ is $\phi^*=\frac{4}{27}$, attained at $\alpha^*= \frac{2}{3}$.
Moreover,

$$
\phi(\alpha)
\begin{cases}
\rightarrow \infty, & \text{as~} \alpha  \rightarrow -\infty\\
\nearrow   \text{on~} [0, \frac{2}{3}]\\
\searrow  \text{on~} [\frac{2}{3}, \infty)
\end{cases}
$$
where $\nearrow$ and $\searrow$ mean strictly increasing and decreasing, respectively.
\end{lemma}

\begin{proof} Clearly $\phi(\alpha)$  approaches $+\infty$ as $\alpha$ approaches $-\infty$.  Dividing $\phi(\alpha) - \phi^*$  by $(\alpha -2/3)$, twice, it is straightforward to show
\begin{equation} \label{eqcub1}
\alpha^2-\alpha^3-\frac{4}{27}=-(\alpha - \frac{2}{3})^2(\alpha +\frac{1}{3}).
\end{equation}
For $\alpha > 2/3$ the above is strictly decreasing.   When $0 \leq \alpha_1 <\alpha_2 \leq 2/3$,
$-(\alpha_1 - \frac{2}{3})^2 < - (\alpha_2 - \frac{2}{3})^2$. From this inequality and (\ref{eqcub1}) it follows that $\alpha^2-\alpha^3-\frac{4}{27}$ is strictly increasing on $[0,2/3]$.
\end{proof}

\begin{remark}  While in Tusi's time formal mathematical notations where not in use, he was aware of what is now called Horner or Ruffini-Horner method which can be used to factor a cubic equation. Historians who have studied Tusi's work have spoken of his knowledge of the method.  Thus the above proof was possible at his time.
\end{remark}

\begin{prop} \label{prop11} {\rm (Intermediate Value Theorem)} If $\phi(\alpha_1) = c_1$ for some $\alpha_1$ and $c_1$ and
$\phi(\alpha_2) = c_2$ for some $\alpha_2$ and $c_2$, $c_1 < c_2$, then for any $c' \in (c_1,c_2)$, there exists $\alpha'$ such that $\phi(\alpha')=c'$. \qed
\end{prop}

\begin{remark} While the formalization of Intermediate Value Theorem uses calculus and continuity, it is intuitive and must have been taken as granted at Tusi's time.
\end{remark}

Theorem \ref{Tusithm} below follows from Lemma \ref{lem3z} and shows the status of zeros of a Tusi form.  Figure 1 shows graphs of $\alpha^2-\alpha^3$ and $\alpha^3+\alpha$.  The latter polynomial, to be analyzed in the next section, is complementary to Tusi form in the sense that any cubic equation is reducible, either to $\alpha^3-\alpha^2+ \delta 4/27=0$, $\delta \in (0,1)$, or to $\alpha^3+\alpha+q=0$. The figure thus gives a visual summary for solving a general cubic equation by reducing it to intersecting one of only two curves and the
horizontal line defined by the constant term of the equation.

\begin{theorem} \label{Tusithm} {\rm (Tusi Theorem)} Given a real constant $\delta$, the number of distinct real solutions and the location of the solutions of the equation  $\alpha^3- \alpha^2+\delta \frac{4}{27}=0$ satisfy the following (the roots are designated as $\underline \alpha$, $\alpha^*$, etc.)
$$
\begin{cases}
1, \quad \underline \alpha \in (-\infty, -\frac{1}{3}),& \text{if ~} \delta > 1\\
2, \quad  \alpha^*=\frac{2}{3}, \quad \overline \alpha^*=-\frac{1}{3}, & \text{if ~} \delta =1\\
3, \quad 0 < \alpha_1 < \frac{2}{3} <\alpha_2  <1, \quad \alpha_3 \in (-\frac{1}{3},0),& \text{if ~} 0 < \delta < 1\\
2, \quad \alpha_1=0,  \quad  \alpha_2=1,& \text{if ~} \delta =0\\
1, \quad \overline \alpha  \in (1, \infty), & \text{if ~} \delta < 0.
\end{cases}
$$
\qed
\end{theorem}

\begin{figure}[htpb] \label{Figone}
\centering
\begin{tikzpicture}[scale=1.]
\begin{axis}[xmin=-1.5,xmax=1.5,ymin=-1.5,ymax=1.5, samples=200,minor tick num=1,xticklabels = {,,},axis lines = middle, legend pos = south east]
\addplot[blue, thick] (x,x*x - x*x*x);
\addplot[green, thick] (x,x*x*x + x);
\addplot[red, thick] (x,4/27);
\addplot[black, mark=*] coordinates {(2/3,0)};
\addplot[black, mark=*] coordinates {(2/3,4/27)} node[below = .3cm] {$\alpha^* = \frac{2}{3}$};
\addplot[black, mark=*] coordinates {(-1/3,4/27)} node[above = .3cm] {~~~~~~~~$\alpha^2-\alpha^3$~~~~~~~~~~~~~~~~~~~~~$\alpha^3+\alpha$};
\addplot[black, mark=*] coordinates{(-1/3,4/27)} node[below = .3cm] {$\overline \alpha^* = \frac{-1}{3}$};
\addplot[black, mark=*] coordinates{(-1/3,0)};
\end{axis}
\end{tikzpicture}
\caption{Any cubic equation is reducible either to $\alpha^2-\alpha ^3=\frac{4}{27}\delta$, $\delta \in (0,1)$,  or $\alpha^3+\alpha=-q$, $q \in \mathbb{R}$.}
\end{figure}

From the relationship between $\phi$, $g$ and $p$, we get the  more general form of Tusi Theorem

\begin{theorem} \label{TusiGthm} Given the real cubic equation $x^3-bx^2+c=0$, $b >0$, the number of distinct real solutions and the location of the solutions satisfy
$$
\begin{cases}
1, \quad \underline x \in (-\infty, -\frac{b}{3}),& \text{if ~} c > \frac{4b^3}{27}\\
2,  \quad x^*=\frac{2b}{3}, \quad \overline x^*=-\frac{b}{3},  & \text{if ~} c=\frac{4b^3}{27}\\
3,  \quad 0 < x_1 < \frac{2b}{3} < x_2 < b, \quad
x_3 \in (-\frac{b}{3},0),  & \text{if ~} 0 < c <\frac{4b^3}{27}\\
2, \quad x_1=0,  \quad  x_2=b,& \text{if ~} c =0\\
1, \quad \overline x \in (b, \infty), & \text{if ~} c <0.
\end{cases}
$$
\qed
\end{theorem}

\begin{remark} We see that using Tusi's methodology one can easily determine the number of real roots of $x^3-bx^2+c=0$ with $b >0$.  Simply by converting this into its Tusi form, not only we can determine the number of real roots as being one or three but also intervals containing the roots (Theorem \ref{TusiGthm}). In the case of $\delta \in (0,1)$  there are three real roots and for each one an interval containing it is at hand. Using the straightforward bisection method, we can approximate the roots to within $\varepsilon$ precision in $\log 1/\varepsilon$ iterations. To get the corresponding approximations with respect to the original equation, we simply multiply by $b$.  This makes the precision to within $\varepsilon b$.  Indeed given a precomputed table of discrete values for $\alpha^2-\alpha^3$ to within a reasonable precision, we can approximate the roots to within that precision simply by looking up the table for $\alpha$ values corresponding to the given $\delta \in (0,1)$. In a sense when a cubic equation has three roots Tusi's analysis turns the task of approximation of roots into a mechanical process. One can imagine that in Tusi's time approximations up to reasonable precision could have been attained for such cubic equations.  When $\delta \not \in [0,1]$, Tusi's methodology still provides information on where the single root in this case would fall and estimates of the interval containing the root can be easily derived. In the next section we show any cubic equation not reducible to Tusi form with $\delta \in [0,1]$ must be reducible to the form $\alpha^3+\alpha+q=0$ (see Figure 1).
\end{remark}

 \section{Characterization of Zeros of Reduced and Normal Forms} \label{sec3}

\begin{prop} Every nontrivial cubic equation can be written in a reduced form, $x^3+px+q=0$, where $p \not =0$. A reduced form with positive $p$ cannot be reduced to one with negative $p$ and conversely. Moreover, a reduced form with $p \not =0$ can be written in {\it normal form}, i.e. $p=\pm 1$.
\end{prop}

\begin{proof} A cubic equation can be written as $x^3+bx^2+cx+d=0$. Replacing $x$ with $x-t$ results in a cubic equation with the coefficient of quadratic term equal to $(3t+b)$. Thus setting $t=-b/3$ gives a reduced form.  Suppose we have two reduced forms for the same equation, say $x^3+px+q=0$ and $y^3+p'y+q'=0$, where $p >0$ but $p' <0$.  The first cubic function is one-to-one while the second is not (also deducible from Tusi Theorem \ref{Tusithm}).  But such property would be preserved under affine transformations, a contradiction.
To show reduction to normal forms, consider  $x^3+px+q=0$. Replacing $x$ by ${|p|}^{1/2} \beta$ results in the equation $|p|^{3/2}(\beta^3 + {\rm sign} (p) \beta) +q=0$, where sign$(p)$ is the sign of $p$.
\end{proof}

\begin{theorem}  \label{thmdelta} A reduced form $x^3+px+q=0$ with  $p <0$ can be written in Tusi form:
$$
\alpha^3 - \alpha^2+ \delta \frac{4}{27}=0, \quad
\delta = \frac{1}{2} +  \frac{3\sqrt{3}q}{4 \sqrt{-p^3}}.
$$
Conversely, given the Tusi form, its reduced form is
$$
x^3 - \frac{1}{3}x + \frac{4\delta -2}{27}=0.
$$
\end{theorem}
\begin{proof} Replacing $x$ in the reduced form with $x-t$, we get
$$
x^3-3tx^2+(3t^2+p)x-t^3-pt+q =0.
$$
Since $p <0$ we can set $t=\sqrt{\frac{-p}{3}}$ to get
$$
x^3- \sqrt{-3p}x^2+ \frac{2\sqrt{-p^3}}{3\sqrt{3}}+q=0.
$$
Replacing $x$ with $\sqrt{-3p}\alpha$ we get
$$
3 \sqrt{3}\sqrt{-p^3}(\alpha^3- \alpha^2)+ \frac{2\sqrt{-p^3}}{3\sqrt{3}}+q=0.
$$
This gives the first statement of the theorem. Replacing $\alpha$ with $\alpha+\frac{1}{3}$ in a Tusi form proves the converse.
\end{proof}

\begin{cor}  \label{cor1} The equation $x^3+px+q=0$ has three distinct real roots if and only if
$\Delta =-(\frac{q^2}{4}+\frac{p^3}{27}) >0$.
\end{cor}
\begin{proof} From Theorem \ref{Tusithm} there are three distinct real roots if and only if $\delta \in (0,1)$.  Then from Theorem \ref{thmdelta} it follows that $p$ must be negative and the following must hold
$$
0 < \delta = \frac{1}{2} +  \frac{3\sqrt{3}q}{4 \sqrt{-p^3}} <1.
$$
The above is equivalent to
$$
 -\frac{1}{2} < \frac{3\sqrt{3}q}{4 \sqrt{-p^3}} < \frac{1}{2}.
$$
Equivalently,
\begin{equation} \label{corbdd}
\bigg |\frac{3\sqrt{3}q}{4 \sqrt{-p^3}} \bigg | < \frac{1}{2}.
\end{equation}
Squaring the above and moving terms around gives $\Delta >0$.
\end{proof}

\section{Cardano's Formula for Normal and Reduced Forms} \label{sec4}

\begin{theorem} \label{cardano}  Given $x^3+x+q=0$, there exists a positive number $s$ such that the unique real solution $r$ is
$$
r=\bigg (-\frac{q}{2} + s \bigg )^{1/3} + \bigg (-\frac{q}{2} - s \bigg )^{1/3}.
$$
Moreover, $s$ can be expressed explcitly
$$s= \sqrt{\frac{q^2}{4}+ \frac{1}{27}}.$$
\end{theorem}
\begin{proof}
Existence of a real root follows from the Intermediate Value Theorem and its uniqueness follows from the monotonicity of $x^3+x$. Let $A=(-{q}/{2}+ s)^{1/3}$, $B=(-{q}/{2}- s)^{1/3}$. If there is $s >0$ such that $r$ above is a root,
using the identity $(A+B)^3=A^3+B^3 + 3AB(A+B)$,  and $r=A +B$, we get
$$r ^3 + r=
-\frac{q}{2}+ s -\frac{q}{2}- s + 3 \bigg (\frac{q^2}{4}- s^2 \bigg )^{1/3} r + r =- q.$$
This implies $3({q^2}/{4}- s^2)^{1/3} +1=0$. Equivalently
${q^2}/{4}- s^2= -{1}/{27}$. We solve for $s$.
\end{proof}

\begin{cor} \label{cardcor} The reduced equation $x^3+px+q=0$, $p >0$, has a unique real solution
$$
\overline r= \bigg (-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}} \bigg )^{1/3} + \bigg (-\frac{q}{2} - \sqrt{\frac{q^2}{4} + \frac{p^3}{27}} \bigg )^{1/3}.
$$
\end{cor}

\begin{proof} Replacing $x$ by $\sqrt{p}y$ reduces the equation to the normal form $y^3+y +\frac{q}{p^{3/2}}=0$. Let $r'$ be the solution to the normal form.  Applying the formula in Theorem \ref{cardano} for $r'$,   $\overline r= \sqrt{p} r'$ gives the formula in the corollary as the only real solution of the  reduced equation.
\end{proof}

\begin{theorem}  The reduced form $x^3+px+q=0$ with $p <0$ has a unique real solution if and only if $\Delta = -(q^2/4+p^3/27) <0$. Moreover, this solution is given by the formula in Corollary \ref{cardcor}.
\end{theorem}

\begin{proof} The proof of the first part of the theorem follows from Tusi Theorem (Theorem \ref{Tusithm}) and Corollary \ref{cardcor}. Next, as in proof of Theorem \ref{cardano} it can be shown that choosing  $s= \sqrt{{q^2}/{4} - {1}/{27}}$, the same formula for $r$ applies. Next, replacing $x$ by $\sqrt{p} x$, as in Corollary \ref{cardcor}, the formula for the reduced equation follows.
\end{proof}

\begin{remark} We contrast the way Cardano's formula is derived in Theorem  \ref{cardano} and in standard approach. The standard approach for  solving $x^3+px+q=0$ takes a solution as $x=u+v$. Substituting for $x$ in the equation, we get $u^3+v^3+(u+v)(3uv+p)+q=0$. Next, it sets $3uv+p=0$, a non-intuitive guess, so as to get a second equation $u^3+v^3=-q$. Next, using the two equations, it recognizes that $u^3$ and $v^3$ must be the solutions to the quadratic equation $x^2+qx-p^3/27=0$. Finally, solving via the quadratic formula gives Cardano's formula.  Theorem  \ref{cardano} does not require solving a  quadratic equation and while it verifies  Cardano's formula, it is not far from an actual derivation as argued next. Suppose $q <0$ ($q >0$ can be argued similarly).
Then $r <-q^{1/3}$, otherwise $r^3+r >-q$.  Thus we may guess as solution $r=(-q - s)^{1/3}$  for some $s >0$. But it can easily be shown this does not lead to a solution. Next we may consider $r$ as the sum of two terms of the form   $(-\gamma_1 q + s )^{1/3}$ and $(-\gamma_2 q - s)^{1/3}$, where  $\gamma_1$  and $\gamma_2$ are positive numbers summing up to one. The natural choice is to take $\gamma_1=\gamma_2$ which leads to the correct solution. In other words in our approach we first guess the form of the solution in terms of $s$, then solve for the unknown value of $s$.
\end{remark}

\begin{remark}
There are other ways to derive Cardano's formula.  For instance, Nickalls \cite{Nickalls} associates parameters to the cubic equation  and shows how they lead to modification of the standard method of Cardano’s solution. He feels the standard approach should be abandoned in favour of the use of parameters which reveal how the algebraic solution is related to the geometry of the cubic. However, from the  pedagogical point of view, considering the normal form instead of the general form is more convenient in remembering the development of the solution, arriving at it directly via simple  algebraic manipulations.  Its extension to the general reduced form is a matter of another algebraic manipulation, shown in the next theorem. Cardano's formula can also be developed via much technical subject of Galois theory, see Janson \cite{Janson}.
\end{remark}

\section{Khayyam's Geometric Solution and Tusi Form} \label{sec5} Omar Khayyam (1048-1131) is well known internationally for his poetry and philosophical thoughts that so compactly emanate through his rubayiat.  His contributions to the study of solution of cubic equations  profoundly influenced the work of future Islamic mathematicians and through them, the mathematicians of Renaissance Europe.  Khayyam's work on cubic equations describes their solution as the intersection of conic sections.  Despite numerous citations of Khayyam's work, when it gets to its description, it always focuses on specific cubic equations, leaving it ambiguous how the geometric method works for the general cubic equation.  Some citations state that Khayyam described geometric ways for solving ``all'' cubic equations while some other citations state the work as applicable to ``some'' cubic equations.

Given that the analysis of Tusi's work has led us to the reduced forms with $p=\pm 1$, it is enough to  describe Khayyam's work for these two types. In fact we will develop Khayyam's approach for these two types in parallel. Consider the positive and negative normal forms
$$x^3+x+q=0, \quad x^3-x+q'=0.$$
Multiplying these by $x$ and letting $y=x^2$ we get
$$y^2+x^2+qx=0, \quad y^2-x^2+q'x=0.$$
Adding $q^2/4$ to both sides of the first equation and $-q'^2/4$ to both sides of the second equation gives
\begin{equation} \label{bothK}
\bigg (x+\frac{q}{2} \bigg )^2+ y^2= \frac{q^2}{4}, \quad \bigg (x-\frac{q'}{2} \bigg )^2-y^2=\frac{{q'}^2}{4}.
\end{equation}

Replacing $x$ by $-x$ changes $x^3 \pm x$ to $-(x^3 \pm x)$ and thus we may assume $q$ and $q'$ have arbitrary signs. We assume $q <0$ and $q' >0$.  The assumption $q< 0$ makes the only root of the positive normal form to be positive. In contrast if $q' >0$, when the negative normal form has a single real root it will be positive and when the equation has three real roots, two of them will be positive (as in Tusi form with $\delta \in (0,1)$).  Thus the first  equation in (\ref{bothK}) describes a circle centered at $(-q/2,0)$ while the second equation in (\ref{bothK}) is a hyperbola centered at $(q'/2,0)$. Both pass through the origin. Since $y=x^2$, solving the normal forms can thus be seen as finding the (nontrivial) intersection of the parabola $y=x^2$ with the circle and the hyperbola, respectively. While Omar Khayyam's actual proof may not have been as simple as above, it completely characterizes Khayyam's work on all nontrivial real cubic equations. The simplicity here is due to the fact that there are only two types of cubic equations, namely the normal forms.  Figures 2 and 3 demonstrate the cases of circle and parabola, respectively.

\begin{remark}  The  above derivation of Khayyam's geometric solution to cubic equations is different from typical proofs, see e.g., Amir-Moez \cite{Amir}.  Our approach is algebraic but gives geometric interpretation at the end. To show the difference with typical derivations of Khayyam's method, consider the equation $x^3+Bx-C=0$, $B >0$, $C >0$.  The quantity $B$ is replaced with $b^2$ and $C$ with $b^2c$. Next, the equation is multiplied by $x$ and divided by $b^2$ to get $x^4/b^2+x^2-cx=0$.  Next, the substitution $y=x^2/b$ is applied, also $c^2/4$ is added to both sides of the equation to complete the square. The resulting equation is $(x-c/2)^2 +y^2=c^2/4$, a circle with center at $(c/2,0)$ of radius $c/2$.  It remains to prove that a nontrivial intersection of the circle with the parabola $y=x^2/b$ is a solution to the original cubic equation. This requires an argument and is proved via similarity of triangles and Pythagorean theorem, see e.g., \cite{Amir}. In contrast our approach bypasses the need for these and works whether we seek nontrivial intersection of the parabola with a circle or with a hyperbola.
\end{remark}

Figure 2 shows three different cases occurring for a positive normal form, when the intersection of parabola and circle is to the right of the center of the circle, at the center, and to the left of the center, corresponding to when $-q =1, 2, 3$, respectively. Figure 3 shows three different cases for the negative normal form corresponding to $q'=0.1, 2/3 \sqrt{3}, 0.7$. These cases are derived from Corollary \ref{cor1}, see  (\ref{corbdd}), from which there are three distinct roots if and only if ${3\sqrt{3}q'}/{4} < {1}/{2}$ (equivalently when $q' < 2/3\sqrt{3}$). When $q'=2/3\sqrt{3}$ it correspond to the case with $\delta =1$ in Tusi form and we see in the figure that the hyperbola and the parabola touch at one point on the right-hand-side corresponding to a double root. There is also a negative root in this case.

\begin{figure}[htpb] \label{FigK1}
\centering
\begin{tikzpicture}[scale=1.]
\begin{axis}[xmin=-1.5, xmax=1.5, ymin=-1., ymax=1.6, samples=200, minor tick num=1, axis lines = middle, legend style={nodes={scale=0.7, transform shape},at={(1.2, 1.1)},anchor=north east}]

 \addplot[variable=t, domain=0:360, red, thick] ({sin(t)/2 + .5}, {cos(t)/2});
  \addplot[variable=t, domain=0:360, green, thick] ({sin(t) + 1.0}, {cos(t)});
   \addplot[variable=t, domain=0:360, blue, thick] ({1.5*sin(t) + 1.5}, {1.5*cos(t)});
  \addplot[black, thick] (x,x*x);
  \addplot[red, mark=*] coordinates{(0.682328, 0.465571)};
    \addplot[green, mark=*] coordinates{(1.0, 1.0)};
    \addplot[blue, mark=*] coordinates{(1.23140, 1.47237)};
  \addplot[black, mark=*] coordinates{(0, 0)};

\end{axis}
\end{tikzpicture}
\caption{The case of $x^3+x+q=0$: Intersection of $y=x^2$ and  $(x+q/2)^2+y^2=q^2/4$, $-q=1, 2, 3$, corresponding to red, green and blue circles, respectively.}
\end{figure}

\begin{figure}[htpb] \label{FigK2}
\centering
\begin{tikzpicture}[scale=1.]
\begin{axis}[xmin=-1.5, xmax=1.5, ymin=-1, ymax=1.6, samples=200, minor tick num=1, axis lines = middle, legend style={nodes={scale=0.7, transform shape},at={(1.2, 1.1)},anchor=north east}, restrict x to domain=-1.5:1.5]

  \addplot[variable=t, domain=0:360, green, thick] ({0.19245*sec(t)+0.19245}, {0.037037^.5*tan(t)});
   \addplot[variable=t, domain=0:360, red, thick] ({(sec(t)/10 +0.1)}, {tan(t)/10});
    \addplot[variable=t, domain=0:360, blue, thick] ({(.35*sec(t) + .35)}, {.35*tan(t)});
  \addplot[black, thick] (x,x*x);
  \addplot[green, mark=*] coordinates{(-1.1547, 1.3333)};
   \addplot[red, mark=*] coordinates{(-1.08803, 1.18382)};
    \addplot[blue, mark=*] coordinates{(-1.250803, 1.57082)};
  \addplot[black, mark=*] coordinates{(0, 0)};
  \addplot[green, mark=*] coordinates{(0.577024, 0.332957)};
  \addplot[green, mark=*] coordinates{(0.577676, 0.33371)};
   \addplot[red, mark=*] coordinates{(0.209149, 0.0437432)};
  \addplot[red, mark=*] coordinates{(0.878885, 0.772439)};

\end{axis}
\end{tikzpicture}
\caption{The case of $x^3-x+q'=0$: Intersection of $y=x^2$ and hyperbola $(x-q'/2)^2-y^2={q'}^2/4$,  $q'=0.1, 2/3 \sqrt{3}, 0.7$, corresponding to red (three distinct roots), green (double root on the right, also a root on the left), blue (one root on the left) hyperbolas, respectively.}
\end{figure}

Khayyam's geometric description of the solutions does not by itself provide an approximation to a solution. Nor does Tusi's classification of zeros. However, we can actually combine the knowledge from both to devise algorithms that can approximate the real roots of arbitrary real cubic equations to arbitrary precision. We have already seen how Tusi form can help in identifying the number of roots and the intervals containing them. Here we show how Khayyam's classification can give rise to an algorithm. Consider the normal form $x^3+x+q=0$ and assume $q <0$.  The only real solution is the intersection of the parabola $y=x^2$ and the circle $(x+q/2)^2+y^2=q^2/4$. Since the solution is positive, we search for the intersection of the parabola and the half-circle $y=\sqrt{q^2/4-(x+q/2)^2}=\sqrt{-x^2-qx}$.  The only root lies in the interval $(0,-q)$.  The proposed iterative algorithm works as follows:  Depending upon the value of $-q$ being less than one or bigger than one, the  root lies in $(0,-q/2)$ or $(-q/2, -q)$, respectively.
Now assume we have two points $A$, $B$ both belonging to one of the intervals such that at $A$ the parabola lies above the circle and at $B$ it lies below the circle and it is known the root lies in the interval with endpoints $A,B$. The line segment passing through the points $(A,A^2)$ and $(B, B^2)$ intersects the circle at a point with $x$-coordinate $C$.
Since the equation of the line passing through the two points is given by $y=(A+B)x-AB$, $C$ is the positive solution to the equation $\sqrt{-x^2-qx}=(A+B)x-AB$. Equivalently, it is the positive solution to the quadratic equation
$$((A+B)^2+1)x^2 +(q -2AB(A+B))x+A^2B^2=0.$$
This will require the computation of a square-root.  Rather, we could also use instead of $C$ the Newton iterate for solving this quadratic equation with respect to the iterate at $C'=(A+B)/2$, the midpoint of the interval with endpoint $A,B$.  Having computed $C$ or $C'$, depending  on whether the parabola lies over or under the circle at this point, we replace it either with $A$ or $B$ and repeat the process. Such an algorithm could certainly have been conceived by Khayyam, including the use of Newton's iterate for approximation of square roots, known to the Babylonians. The convergence of this procedure would most likely be faster than using only the bisection method. We will however not pursue this here.

For dealing with the negative normal form $x^3-x+q'=0$, $q' >0$, intervals can be derived containing the single root or the three roots as follows. Suppose $r$ is a positive root. Then $r^3-r =-q' <0$.  This implies $r^3 < r$. Since $r >0$, it follows that $r < 1$.  Suppose $r <0$.  If $r \leq -\sqrt{2}$, then $r^2 \geq 2$ implying $r^3/2 \leq  r$. From this we get, $q'= -r^3+r \geq -r^3+r^3/2 =-r^3/2$. Thus $r \geq -{2q'}^{1/3}$. Thus if $r <0$ it must be at least $L=\min \{-\sqrt{2}, -{2q'}^{1/3}\}$.
So any root of the negative normal form must lie in the interval $[L, 1)$. We can thus give a similar algorithm to the one described for positive normal form for approximating roots of negative normal form.

\section{Quadratic Tuis Form} \label{sec6} Here we consider the Tusi methodology for a quadratic equation.

\begin{definition}  The reduced form of a quadratic equation and the corresponding Tusi form are, respectively,
$$
x^2-bx + c =0, \quad b >0, \quad  \alpha^2- \alpha +\frac{\delta}{4}=0, \quad \delta \in \mathbb{R}.$$
\end{definition}

The above forms are analogous to  Tusi formulation for cubic. Unlike the cubic case, there is only one reduced form. Setting $\phi(\alpha)= \alpha - \alpha^2$,
to get its maximum in the interval $[0,1]$, we write $\alpha - \alpha^2=\alpha (1- \alpha)$.  This makes it easy to guess the maximizer to be $\alpha^*=1/2$.  To prove this, set $\alpha^* =1/2 \pm \varepsilon$ for some $\varepsilon \in [0,1/2]$. Then $\alpha^*(1 - \alpha^*)=(1/2-\varepsilon)((1/2+\varepsilon)=1/4 - \varepsilon ^2$. It follows that the maximum $\phi^*$ of $\phi(\alpha)$ over the interval $(- \infty, \infty)$ occurs at $1/2$ and is $1/4$. Figure 4 gives the corresponding graph.

\begin{theorem}

The number of solutions and solutions of the equation  $\alpha^2- \alpha+\frac{\delta}{4}=0$ and $x^2-bx+c=0$ ($b >0$) satisfy, respectively

$$
\begin{cases}
0, \quad  & \text{if ~} \delta > 1\\
1, \quad  \alpha^*=\frac{1}{2}, & \text{if ~} \delta=1\\
2, \quad \frac{1}{2}\pm \frac{\sqrt{1-\delta}}{2}, & \text{if ~} \delta < 1
\end{cases}, \quad  \begin{cases}
0,  \quad  & \text{if ~} c > \frac{b^2}{4}\\
1, \quad  x^*=\frac{b}{2}, & \text{if ~} c=\frac{b^2}{4}\\
2, \quad  \frac{b}{2}\pm \frac{\sqrt{b^2-4c}}{2}, & \text{if ~} c < \frac{b^2}{4}.
\end{cases}
$$
\end{theorem}

\begin{proof}  Analogous to the cubic case, by factoring,
$
\phi(\alpha)-\phi^*= \alpha - \alpha^2- \frac{1}{4}=-(\alpha-\frac{1}{2})^2.
$
Thus to solve the equation $\alpha- \alpha^2- \delta/4 =0$ for a given $\delta \leq 1$, we add and subtract $1/4$ to get
$
(\alpha- \frac{1}{2})^2=\frac{1-\delta}{4}.
$
Then take square-root to solve for $\alpha$.  This proves the first equation. To get the roots of $x^2-bx+c$, we simply multiply the roots of Tusi form by $b$ and replace $\delta$ with $4c/b^2$:
$$
b \bigg ( \frac{1}{2}\pm \frac{\sqrt{1-\delta}}{2} \bigg )= \frac{b}{2} \pm  \frac{b}{2} \sqrt{1- \frac{4c}{b^2}}= \frac{b}{2}\pm \frac{\sqrt{b^2-4c}}{2}.
$$
\end{proof}

\begin{figure}[htpb] \label{Figquad}
\centering
\begin{tikzpicture}[scale=1.2]
\begin{axis}[xmin=-1.5,xmax=1.5,ymin=-1.5,ymax=1.5, samples=200,minor tick num=1,xticklabels = {,,},axis lines = middle, legend pos = south east]
\addplot[blue, thick] (x,x - x*x);
\addplot[red, thick] (x,1/4);
\addplot[black, mark=*] coordinates {(1/2,0)};
\addplot[black, mark=*] coordinates {(1/2,1/4)} node[below = .3cm] {$\alpha^* = \frac{1}{2}$};
\addplot[black, mark=*] coordinates {(1/2,0)} node[above = .5cm] {~~~$\alpha-\alpha^2$};
\end{axis}
\end{tikzpicture}
\caption{Any quadratic equation is reducible to $\alpha-\alpha^2=\delta/4$.}
\end{figure}

\begin{remark}

Po-Shen Loh \cite{Loh} develops a new way to derive the quadratic formula, also
featured in the New York Times \cite{NYT}.  Here we wish to mention a resemblance between his derivation of the quadratic formula and what Tusi's methodology gives, when applied to a quadratic equation. Loh considers the quadratic equation $x^2+Bx+C=0$, where $B$ and $C$ are complex numbers.  To solve the equation using factorization gives
$$x^2+Bx+C=(x-R)(x-S),$$
where we solve for $R$ and $S$ by recognizing that $R+S=-B$ and $RS=C$.  He writes,\\

``Two numbers sum to $-B$ precisely when their average is $-B/2$, and so it suffices to find two numbers of the form $-B/2\pm z$ which multiply to $C$, where $z$ is a single unknown quantity, because they will automatically have the desired average.''\\

This implies $(-B/2-z)(-B/2+z)=-B^2/4-z^2=C$ from which it follows $z=\pm \sqrt{B^2/4-C}$. Hence the roots are $-B/2 \pm \sqrt{B^2/4-C}$.

We see that when solving quadratic equations with real coefficients there is some resemblance between Loh's approach and what is derivable from the Tusi form of a quadratic, at least in that symmetry of the solutions around $1/2$, the maximizer of $\alpha-\alpha^2$, is easily witnessed. Indeed when solving a quadratic equation with real coefficients, from pedagogical point of view  it is constructive to reduce it into the Tusi form.  Simply by keeping in mind the graph of $\alpha-\alpha^2$ and by reducing the particular equation to the form  $\alpha- \alpha^2=\delta/4$, one immediately gets a sense of the solvability of the equation and the symmetry of the solutions around $1/2$.  In summary, understanding the shape of one quadratic function is enough to grasp the way we solve all quadratic equations.
\end{remark}

\section{Generalized Tusi Form} \label{sec7}

By a {\it generalized Tusi form} we mean the polynomial  equation,
$p_n(\alpha)=\alpha^n-\alpha^{n-1}+c=0$, $n \geq 2$. The following is obvious and analogous to the case of $n=3$. Letting $\phi_n(\alpha) = \alpha^{n-1}- \alpha^n$,
a real number $r$ satisfies $p_n(r)=0$ if and only if  $\phi_n(r)=c$.

\begin{lemma}  \label{lem2}

$$
\phi_n(\alpha)=
\begin{cases}
>0, & \text{if $n$ is odd and ~} \alpha < 0\\
<0, & \text{if $n$ is even and ~} \alpha < 0\\
0, & \text{if ~} \alpha=0\\
>0 , & \text{if ~} 0 < \alpha < 1 \\
0, & \text{if ~} \alpha =1\\
< 0, & \text{if~} \alpha >1
\end{cases},
\quad
\phi_n(\alpha)
\begin{cases}
\rightarrow -\infty, & \text{as~} \alpha  \rightarrow +\infty\\
\rightarrow +\infty,  & \text{as~} \alpha \rightarrow -\infty~ \text{if n is odd}\\
\rightarrow -\infty,  & \text{as~} \alpha \rightarrow -\infty~  \text{if n is even}.
\end{cases}
$$
\end{lemma}

\begin{proof}
When $\alpha <0$, $\phi_n(\alpha)$ is positive for $n$ odd and negative for $n$ even. On  the other hand, $\phi_n(\alpha)=0$ for $\alpha=0$ and $\alpha=1$,  $\phi_n(\alpha) >0$ if $\alpha \in (0,1)$ and $\phi_n(\alpha) <0$ for $\alpha >1$.  This verifies the first part.  The proof of the second part follows from the equation $\phi_n(\alpha)=\alpha^{n-1}(1-\alpha)$.
\end{proof}

Analogous to the case of $n=2$ and $n=3$, without using differentiation one can guess the location of the maximizer, $\alpha_n^*$ of $\phi_n$ on $(0,1)$. In fact recalling that $\alpha_2^*=1/2$ and $\alpha_3^*=2/3$, it is straightforward to guess $\alpha_n^*$ to be $(n-1)/n$. Analogous to the case of $n=3$, Lemma \ref{lem3} verifies the correctness of this guess. Subsequently, the theorem uses the lemma to classify the number of zeros of $\phi_n$ and containing intervals.

\begin{lemma}   \label{lem3} $\phi_n^* = \max \{\phi_n(\alpha): \alpha \in [0, \infty)\} = \phi(\alpha_n^*)$, where
$\alpha _n^*= \frac{n-1}{n}$. Hence $\phi_n^*=\frac{(n-1)^{n-1}}{n^n}$. Moreover,

\begin{equation} \label{lem1eq2}
\phi_n(\alpha)
\begin{cases}
\nearrow   \text{on~} (-\infty, 0], & \text{if n is even}\\
\searrow   \text{on~} (-\infty, 0], & \text{if n is odd}\\
\nearrow   \text{on~} [0, \alpha_n^*]\\
\searrow  \text{on~} [\alpha_n^*, \infty).
\end{cases}
\end{equation}
\end{lemma}

\begin{proof} We first prove  the maximum of
$\alpha^{n-1}-\alpha^n - \phi_n^*$ on $[0,\infty)$ is zero. Dividing by
 $(\alpha - \alpha_n^*)$ we get the factorization
\begin{equation} \label{eq11}
\alpha^{n-1}-\alpha^n - \phi_n^*=(\alpha_n^*- \alpha ) U_n(\alpha),
\end{equation}
where
\begin{equation}
U_n(\alpha)=\alpha^{n-1}- \frac{1}{n}\alpha^{n-2}-\frac{n-1}{n^2}\alpha^{n-3} - \cdots - \frac{(n-1)^{n-3}}{n^{n-2}}\alpha- \frac{(n-1)^{n-2}}{n^{n-1}}.
\end{equation}
The factorization is easily verifiable by multiplying the terms and simplifying. We claim $U_n(\alpha_n^*)=0$.  The first term of $U_n(\alpha_n^*)$  is $(n-1)^{n-1}/n^{n-1}$ while each of the remaining $n-1$ terms is $-(n-1)^{n-2}/n^{n-1}$. Thus the $n$ terms sum to zero. Suppose $\alpha > \alpha_n^*$. Then for each $i=2, \dots, n$,
\begin{equation}
-\frac{(n-1)^{i-2}}{n^{i-1}}\alpha^{n-i} \leq -\frac{(n-1)^{n-2}}{n^{n-1}}.
\end{equation}
It follows that
\begin{equation} \label{eq13}
U_n(\alpha) \geq
\alpha^{n-1} - \frac{(n-1)^{n-1}}{n^{n-1}} =\alpha^{n-1}- {\alpha_n^*}^{n-1}  >0.
\end{equation}
Thus from (\ref{eq11}) and (\ref{eq13}) it follows that $\alpha > \alpha_n^*$ implies $\alpha^{n-1}-\alpha^n - \phi_n^* <0$. Similarly,  $\alpha \in [0, \alpha_n^*)$ implies $\alpha^{n-1}-\alpha^n - \phi_n^* >0$. Hence the proof that $\alpha_n^*$ is the maximizer of $\phi_n(\alpha)$ on $[0, \infty)$.  To prove monotonicity we factor $U_n(\alpha)$.  It is straightforward to verify
\begin{equation}
U_n(\alpha)= (\alpha - \alpha_n^*) V_n(\alpha),
\end{equation}
\begin{equation}
V_n(\alpha)=\alpha^{n-2}+ \frac{(n-1)^0(n-2)}{n}\alpha^{n-3}+\frac{(n-1)(n-3)}{n^2}\alpha^{n-4} +
\cdots + \frac{(n-1)^{n-4} \times 2}{n^{n-3}}\alpha+ \frac{(n-1)^{n-3}}{n^{n-2}}.
\end{equation}
Thus
\begin{equation} \label{eqfactor}
 \alpha^{n-1}-\alpha^n- \phi_n^* = -(\alpha - \alpha_n^*)^2 V_n(\alpha).
\end{equation}
All coefficients in $V_n(\alpha)$ are positive so that $0 \leq \alpha_1 < \alpha_2$ implies $V_n(\alpha_1) < V_n(\alpha_2)$.  When $0 \leq \alpha_1 <\alpha_2 \leq \alpha_n^*$,
\begin{equation}
-(\alpha_1 - \alpha_n^*)^2 < - (\alpha_2 - \alpha_n^*)^2.
\end{equation}
From these and (\ref{eqfactor}) it follows that $\phi_n(\alpha)$ is strictly increasing on $[0, \alpha_n^*]$.  When
 $\alpha_n^* \leq \alpha_1 <\alpha_2$,
\begin{equation}
 (\alpha_1 - \alpha_n^*)^2 <  (\alpha_2-\alpha_n^* )^2.
 \end{equation}
Thus
\begin{equation}
 (\alpha_1-\alpha_n^*)^2 V_n(\alpha_1) <  (\alpha_2 -\alpha_n^*)^2 V_n(\alpha_2).
 \end{equation}
This and (\ref{eqfactor}) imply $\phi_n(\alpha)$ is strictly decreasing on $[\alpha_n^*,\infty)$.  To prove the first two parts of (\ref{lem1eq2}), from Lemma \ref{lem2},  $|\phi_n(\alpha)|$ approaches infinity as $\alpha$ approaches $-\infty$. Suppose $\alpha_1 < \alpha_2 \leq 0$. Then
\begin{equation}
|\alpha_1^{n-1}| > |\alpha_2^{n-1}|, \quad (1-\alpha_1) > (1-\alpha_2).
\end{equation}
Thus $|\phi_n(\alpha_1)| >  |\phi_n(\alpha_2)|$ so that
on the interval $(-\infty, 0]$ for any $\alpha_1 \not = \alpha_2$,  $\phi_n(\alpha_1) \not = \phi_n(\alpha_2)$. This implies strict monotonicity.
\end{proof}

\begin{prop} \label{prop1} {\rm (Intermediate Value Theorem)} If $\phi_n(\alpha_1) = c_1$ for some $\alpha_1$ and $c_1$ and
$\phi_n(\alpha_2) = c_2$ for some $\alpha_2$ and $c_2$, $c_1 < c_2$, then for any $c' \in (c_1,c_2)$, there exists $\alpha'$ such that $\phi_n(\alpha')=c'$. \qed
\end{prop}

The following theorem characterizes the solutions of $\phi_n(\alpha)=\delta \phi_n^*$ which depend on $n$ as a parameter and $\delta$.  Using this  characterization the theorem can then characterize roots of  $p_n(\alpha)=0$ (omitted).

\begin{theorem} \label{thm1} Given a real $\delta$, the number of solutions and the solutions  of the equation $\phi_n(\alpha)=\delta \phi_n^*$ satisfy
$$
\begin{cases}
1, \quad  \overline \alpha \in (1, \infty),& \text{if $n$ odd, ~} \delta < 0\\
2, \quad \underline \alpha_1 \in (-\infty,0), \quad \overline \alpha_2 \in (1, \infty), & \text{if $n$ even, ~} \delta < 0\\
2, \quad \alpha_1 =0, \quad \alpha_2=1, & \text{if ~} \delta = 0\\
3, \quad  0 < \alpha_1 < \alpha_n^* < \alpha_2 < 1, \quad
\alpha_3 \in (-\alpha_n^*,0),& \text{if $n$ odd,~} 0 < \delta < 1\\
2, \quad  0 < \alpha_1 < \alpha_n^* < \alpha_2 < 1, & \text{if $n$ even~} 0 <  \delta < 1\\
2, \quad  \alpha_n^*, \quad  \underline \alpha_n^* \in [-\alpha_n^*,0), & \text{if $n$  odd,~} \delta=1\\
1, \quad \alpha_n^*, & \text{if $n$ even, ~} \delta=1\\
1, \quad \underline \alpha \in (-\infty, -\alpha_n^*),   & \text{if $n$  odd, ~} \delta >1\\
0, \quad  & \text{if $n$ even, ~} \delta > 1.
\end{cases}
$$
\end{theorem}

\begin{proof} The proof of the theorem uses Lemmas \ref{lem2}, \ref{lem3} as well as Proposition \ref{prop1}.  The proof of the first item  follows from Lemma \ref{lem2} and Proposition \ref{prop1}:  $\phi_n$ is negative on the interval $(1, \infty)$ and it approaches $-\infty$ as $\alpha$ approaches $\infty$. Thus by  Proposition \ref{prop1} the corresponding equation has a root and by strict monotonicity it is a unique root. Analogous argument applies to the second statement. The proof of the third statement uses Lemma \ref{lem2}, Lemma \ref{lem3} and Proposition \ref{prop1} to conclude there is a root $\alpha_1$ in the interval $[0, \alpha_n^*)$ and another $\alpha_2$ in $(\alpha_n^*,1)$. To prove the existence of the third root $\alpha_3$ for $n$ odd,  since  $\phi_n(0)=0$ and  $\phi_n(\alpha)=\alpha^{n-1}(1-\alpha)$, we have
$$
\phi_n(-\alpha_n^*) =\frac{(n-1)^{n-1}}{n^{n-1}} \bigg ( 1+ \frac{n-1}{n} \bigg )=
\frac{(n-1)^{n-1}}{n^{n}}(2n-1) > \phi_n^*.
$$
Hence by Proposition \ref{prop1} there is a root in the indicated interval.
The proof of the forth statement is similar to the previous one but there is no third root. The proof of the fifth statement also uses Lemma \ref{lem2} and the factorization in Lemma \ref{lem3}, showing $\alpha_n^*$ is a double root.
When $n$ is odd by Proposition \ref{prop1} there is another root in the indicated interval (sixth statement) but when $n$ is even there are no other roots (seventh statement). The proof of eight and ninth statements follow analogously.
\end{proof}

Figure 5 shows the graph of $\alpha^{n-1}-\alpha^n$ for the first few values of $n$. We see the maximum value drops as $n$ increases and the maximizer moves toward one.  Using Theorem \ref{thm1} an exact formula for solutions of $\phi_n(\alpha)=\delta \phi_n^*$ directly gives an exact formula for roots of $p_n(\alpha)$.  To find  positive roots of $p_n$ we only need to look at the range of $\alpha, \delta \in [0,1]$.  If $\delta$ is outside of the range $[0,1]$, we conclude there is no positive solution.  As in the quadratic or cubic case, using binary search or in combination with Newton's method we can approximate the roots to any precision.

\begin{figure}[htpb] \label{Fig4}
\centering
\begin{tikzpicture}[scale=1.]
\begin{axis}[xmin=-0.3, xmax=1.2, ymin=-0.3, ymax=0.3, samples=200, minor tick num=1, axis lines = middle, legend style={nodes={scale=0.7, transform shape},at={(1.2, 1.1)},anchor=north east}, restrict x to domain=-1.5:1.5]

  \addplot[blue, thick] (x, {-(x-1)*x});
  \addplot[green, thick] (x, {-(x-1)*x*x});
  \addplot[red, thick] (x, {-(x-1)*x*x*x});
  \addplot[purple, thick] (x, {-(x-1)*x*x*x*x});

\end{axis}
\end{tikzpicture}
\caption{Graphs of $\alpha^{n-1}-\alpha^n$, $n=2,3,4,5$, blue, green, red, purple, respectively.}
\end{figure}

\section*{Concluding Remarks} In this article we have examined the work of Sharaf al-Din Tusi of the 12th century on cubic equations, not only from a historical point of view but from a contemporary point of view in terms of its connections to the well known Cardano's formula and its application in approximation of real zeros.  Using Tusi's methodology we characterized all real cubic equations by reducing them into two disjoint forms, a Tusi form with  $\delta \in (0,1)$  and  a reduced form with $p=1$. This characterization not only helps determine the number of real zeros but tight  containing intervals when there are three roots. This in turn  allows their numerical approximation using the bisection and/or Newton methods, bypassing the use a Cardano's formula expressed in complex numbers which itself require numerical approximation. We showed the discriminant present in Cardano's formula, is inherent in Tusi form. In fact we gave a novel proof of
Cardano's formula for a reduced form with $p >0$.  Gaining insights from the study of Tusi form, we gave  a concise derivation of Khayyam's geometric solution. Characterization  of cubic equations into two canonical forms simplifies computing their solution. In fact using Tusi's methodology we showed solving a quadratic equation is reducible  to a quadratic Tusi form from which the quadratic formula is derivable trivially.  Such canonical classifications for quartic, quintic and general  polynomial equations may also prove to be useful.  We also extended Tusi forms to arbitrary degree, showing analogous properties. We believe our results based on the study of Tusi form complement previous findings on Tusi's work and reveal further facts on history, mathematics and pedagogy in solving cubic equations.
Hence the results should be of interest to general mathematical community, historians, educators and students.

\section*{Acknowledgements}
The authors wish to thank Professor Roshdi Rashed for some references.