<< Chapter < Page Chapter >> Page >
A series of code examples explaining how to build basic algebra, calculus, trigonometry, and differential expressions using Content MathML

Content MathML, like any language, is difficult to "learn" completely. Becoming comfortable with the semantics and structure of Content MathML is a lot easier than memorizing every possible element

This MathML "cookbook" provides you with the "ingredients" (or helpful examples) to begin writing your own MathML expressions. Namespaces are not included, so please be sure to include an appropriate namespace if combining these snippets with other XML languages.

Algebra

2 2 4

<math><apply><eq/><apply><plus/><cn>2</cn><cn>2</cn></apply><cn>4</cn></apply></math>

x 2 2 x 3 x 1 x 3

<math><apply><eq/><apply><plus/><apply><power/><ci>x</ci><cn>2</cn></apply><apply><times/><cn>2</cn><ci>x</ci></apply><cn>3</cn></apply><apply><times/><apply><minus/><ci>x</ci><cn>1</cn></apply><apply><plus/><ci>x</ci><cn>3</cn></apply></apply></apply></math>

x c b a

<math><apply><eq/><ci>x</ci><apply><divide/><apply><minus/><ci>c</ci><ci>b</ci></apply><ci>a</ci></apply></apply></math>

3 b 2 logbase --> a

<math><apply><eq/><apply><root/><degree><cn>3</cn></degree><ci>b</ci></apply><apply><log/><logbase><cn>2</cn></logbase><ci>a</ci></apply></apply></math>

Trigonometry

θ 2 θ 2 1

<math><apply><eq/><apply><plus/><apply><power/><apply><sin/><ci>?</ci></apply><cn>2</cn></apply><apply><power/><apply><cos/><ci>?</ci></apply><cn>2</cn></apply></apply><cn>1</cn></apply></math>

Calculus

h 0 f x h f x h

<math><apply><limit/><bvar><ci>h</ci></bvar><lowlimit><cn>0</cn></lowlimit><apply><divide/><apply><minus/><apply><ci>f</ci><apply><plus/><ci>x</ci><ci>h</ci></apply></apply><apply><ci>f</ci><ci>x</ci></apply></apply><ci>h</ci></apply></apply></math>

F x t a x f t

<math><apply><eq/><apply><ci>F</ci><ci>x</ci></apply><apply><int/><bvar><ci>t</ci></bvar><lowlimit><ci>a</ci></lowlimit><uplimit><ci>x</ci></uplimit><apply><ci>f</ci><ci>t</ci></apply></apply></apply></math>

Differential equations

x f y

<math><apply><diff/><bvar><ci>x</ci></bvar><apply><ci>f</ci><ci>y</ci></apply></apply></math>

x y f x y

<math><apply><partialdiff/><bvar><ci>x</ci></bvar><bvar><ci>y</ci></bvar><apply><ci type="function">f</ci><ci>x</ci><ci>y</ci></apply></apply></math>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Connexions guide to mathml. OpenStax CNX. Aug 24, 2009 Download for free at http://cnx.org/content/col10963/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Connexions guide to mathml' conversation and receive update notifications?

Ask