An Algebraic Proof of Heron’s Formula

Heron’s formula concerning A, the area of any triangle states:

A = \sqrt{s(s-a)(s-b)(s-c)}\quad\quad\quad\quad\quad\quad\quad(1)

where a,b,c are the three sides of the triangle and, s=\frac{a+b+c}{2}.

We are going to prove it with the aid of a CAS:

Substituting s into (1), the formula becomes

A = \frac{\sqrt{(a+b+c)(b+c-a)(a+c-b)(a+b-c)}}{4}\quad\quad\quad\quad\quad(2)

A triangle with three known sides is shown in Fig.1 where x is part of the base of the triangle.

Screen Shot 2017-05-28 at 11.48.57 PM.png

Fig. 1

By Pythagorean theorem,



To obtain h^2, we will use Omega CAS Explorer (see Fig. 2)

The function ‘eliminate’ eliminates variable x, returns the value of h^2

Screen Shot 2017-05-28 at 9.35.40 PM.png

Fig. 2

The result is h^2 = \frac{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}{4a^2}, i.e.,

h = \frac{\sqrt{(a+b+c)(b+c-a)(a+c-b)(a+b-c)}}{2a}.

Therefore, using the standard formula for triangle,

A = \frac{1}{2}a h =\frac{ \sqrt{(a+b+c)(b+c-a)(a+c-b)(a+b-c)}}{4}

which is (2)

This is the 1st example in my presentation at ACA 2013 titled “An Algebraic Approach to Geometric Proof Using a Computer Algebra System”.

In Fig. 3, BA \perp CA, BD \perp CD. Can you find the area of \Delta ACD?


Fig. 3


Integration, CAS vs human

To evaluate integral

\int x(1+x)^{19}\; dx,

the CAS I have tried (maxima, mathematica) expands (1+x)^{19} first, followed by multiply the expression by x. Finally, integrate term by term yields the result, a messy looking polynomial (see Fig. 1)

Screen Shot 2017-05-17 at 8.39.07 PM.png

Fig. 1

A human being however, will more likely to recognize the fact that (1+x)^{19} is the derivative of \frac{(1+x)^{20}}{20} and therefore use the method of integration by parts:

\int x (1+x)^{19}\;dx

=\int x (\frac{(1+x)^{20}}{20})'\;dx

=x \frac{(1+x)^{20}}{20}-\int x'\frac{(1+x)^{20}}{20}\;dx


=\frac{x(1+x)^{20}}{20}-\frac{(1+x)^{21}}{420}\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad (1)

An even better approach is:

\int x(1+x)^{19}\;dx

=\int (1+x-1) (1+x)^{19}\;dx

=\int ((1+x)-1) (1+x)^{19}\;dx

=\int (1+x)^{20}-(1+x)^{19}\;dx

=\int (1+x)^{20}\;dx-\int (1+x)^{19}\;dx

= \frac{(1+x)^{21}}{21}-\frac{(1+x)^{20}}{20}\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad(2)

The difference of result from CAS and (2) is a constant, as expected (see Fig. 2)

Screen Shot 2017-05-17 at 9.35.56 PM.png

Fig. 2