Three famous mathematical formulas
==================================

* Previous
* Overview: First steps

|  |  |
| --- | --- |
| Prerequisites: | 
 Before attempting this assessment you should have already worked through
 all the articles in this module, and also have an understanding of HTML
 basics (study
 Introduction to HTML).
  |
| Objective: | 
 To have a play with some MathML and test your new-found
 knowledge.
  |

A small math article
--------------------

The goal is to rewrite the following math article using HTML and MathML:

![Screenshot of the PDF output generated by XeLaTeX](/en-US/docs/Learn/MathML/First_steps/Three_famous_mathematical_formulas/xelatex-output.png)

Although you don't need to be familiar with LaTeX, it might be useful to know the LaTeX source from which it was generated:


```latex
\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

To solve the cubic equation $t^3 + pt + q = 0$ (where the real numbers
$p, q$ satisfy ${4p^3 + 27q^2} > 0$) one can use Cardano's formula:

\[
 \sqrt[{3}]{
 -\frac{q}{2}
 +\sqrt{\frac{q^2}{4} + {\frac{p^{3}}{27}}}
 }+
 \sqrt[{3}]{
 -\frac{q}{2}
 -\sqrt{\frac{q^2}{4} + {\frac{p^{3}}{27}}}
 }
\]

For any $u\_1, \dots, u\_n \in \mathbb{C}$ and
$v\_1, \dots, v\_n \in \mathbb{C}$, the Cauchy–Bunyakovsky–Schwarz
inequality can be written as follows:

\[
 \left| \sum\_{k=1}^n {u\_k \bar{v\_k}} \right|^2
 \leq
 {
 \left( \sum\_{k=1}^n {|u\_k|} \right)^2
 \left( \sum\_{k=1}^n {|v\_k|} \right)^2
 }
\]

Finally, the determinant of a Vandermonde matrix can be calculated
using the following expression:

\[
 \begin{vmatrix}
 1 & x\_1 & x\_1^2 & \dots & x\_1^{n-1} \\
 1 & x\_2 & x\_2^2 & \dots & x\_2^{n-1} \\
 1 & x\_3 & x\_3^2 & \dots & x\_3^{n-1} \\
 \vdots & \vdots & \vdots & \ddots & \vdots \\
 1 & x\_n & x\_n^2 & \dots & x\_n^{n-1} \\
 \end{vmatrix}
 = {\prod\_{1 \leq {i,j} \leq n} {(x\_i - x\_j)}}
\]

\end{document}
```

Starting point
--------------

To get this assessment started, you can rely on our usual HTML template. By default it uses UTF-8 encoding, special Web fonts for the `<body>` and `<math>` tags (with similar look & feel as the LaTeX output). The goal is to replace the question marks `???` with actual MathML content.


```html
<!doctype html>
<html lang="en-US">
  <head>
    <meta charset="utf-8" />
    <title>Three famous mathematical formulas</title>
    <link
 rel="stylesheet"
 href="https://fred-wang.github.io/MathFonts/LatinModern/mathfonts.css" />
  </head>
  <body class="htmlmathparagraph">
    <p>
      To solve the cubic equation ??? (where the real numbers ??? satisfy ???)
      one can use Cardano's formula: ???
    </p>

    <p>
      For any ??? and ???, the Cauchy–Bunyakovsky–Schwarz inequality can be
      written as follows: ???
    </p>

    <p>
      Finally, the determinant of a Vandermonde matrix can be calculated using
      the following expression: ???
    </p>
  </body>
</html>
```

Hints and tips
--------------

* Start by inserting empty `<math>` tags, deciding whether they should have a `display="block"` attribute or not.
* Check the text used and find their Unicode characters ("−", "ℂ", "∑", ...).
* Analyze the semantics of each portion of text (variable? operator? number?) and determine the proper token element to use for each of them.
* Look for advanced constructions (fractions? roots? scripts? matrices?) and determine the proper MathML element to use for each of them.
* Don't forget to rely on `<mrow>` for grouping subexpressions.
* Pay attention to stretchy and large operators!
* Use the W3C validator to catch unintended mistakes in your HTML/MathML markup.
* If you are stuck, or realize how painful it is to write MathML by hand, feel free to use tools to help write MathML such as TeXZilla.
* Previous
* Overview: First steps