MathML in action
Here is a demonstration of MathML, using, as an example, the Taylor series for f at a, where f is a function which has derivatives of all orders on an open interval containing the real numbers a and x.
LibreOffice Math provides a language to enable complicated mathematical formulae to be displayed in LibreOffice documents. To display the equation above in LibreOffice, it is written in this language as
f(x) = sum from { n = 0 } to infinity { { f^(n)(a) } over { n! } (x - a)^n }
To display formulae in a browser, another language, the Mathematical
Markup Language or MathML, is used. For full details on the language,
see the
W3C specification
.
The MathML for the example equation is shown below; it was generated
by LibreOffice and, as you can see, it takes up a bit more space!
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<semantics>
<mrow>
<mi>f</mi>
<mrow>
<mrow>
<mo fence="true" stretchy="false">(</mo>
<mrow><mi>x</mi></mrow>
<mo fence="true" stretchy="false">)</mo>
</mrow>
<mo stretchy="false">=</mo>
<mrow>
<munderover>
<mo stretchy="false">∑</mo>
<mrow><mi>n</mi><mo stretchy="false">=</mo><mn>0</mn></mrow>
<mi mathvariant="normal">∞</mi>
</munderover>
<mrow>
<mfrac>
<mrow>
<msup>
<mi>f</mi>
<mrow>
<mo fence="true" stretchy="false">(</mo>
<mrow><mi>n</mi></mrow>
<mo fence="true" stretchy="false">)</mo>
</mrow>
</msup>
<mrow>
<mo fence="true" stretchy="false">(</mo>
<mrow><mi>a</mi></mrow>
<mo fence="true" stretchy="false">)</mo>
</mrow>
</mrow>
<mrow><mi>n</mi><mi>!</mi></mrow>
</mfrac>
<msup>
<mrow>
<mo fence="true" stretchy="false">(</mo>
<mrow>
<mrow><mi>x</mi><mo stretchy="false">−</mo><mi>a</mi></mrow>
</mrow>
<mo fence="true" stretchy="false">)</mo>
</mrow>
<mi>n</mi>
</msup>
</mrow>
</mrow>
</mrow>
</mrow>
<annotation encoding="StarMath 5.0">
f(x) = sum from { n = 0 } to infinity { { f^(n)(a) } over { n! } (x - a)^n }
</annotation>
</semantics>
</math>
