# Connexions

You are here: Home » Content » Connexions Guide to MathML » Content MathML Cookbook

### Recently Viewed

This feature requires Javascript to be enabled.

Inside Collection (Manual):

Manual by: Connexions, Kyle Barnhart. E-mail the authors

# Content MathML Cookbook

Module by: Connexions, Kyle Barnhart. E-mail the authors

Summary: 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 2 2 4

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

### x2+2⁢x+3=(x−1)⁢(x+3) x 2 2 x 3 x 1 x 3

$<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>$

### x=c−ba x c b a

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

### b3=log 2 a 3 b 2 a

$<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>$

## Trigonometry

### sin2θ+cos2θ=1 θ 2 θ 2 1

$<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>$

## Calculus

### limit   h → 0 f⁢x+h−f⁢xh h 0 f x h f x h

$<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>$

### F⁢x=∫axf⁢td t F x t a x f t

$<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>$

## Differential Equations

### dd x f ⁢ y x f y

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

### ∂2f⁢xy∂ x ∂ y x y f x y

$<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>$

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

#### Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

#### Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks