Calculus

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

The following content elements represent various operators or functions used in calculus: int, diff, partialdiff, grad, divergence, curl, and laplacian. The following sections provide examples of how these elements are used.

Integrals

Integrals are represented using the int element. The variable of integration is specified using the qualifier element bvar. Here is an example:

Integrals: equation 1

<apply>
  <int/>
  <bvar><ci>x</ci></bvar>
  <ci>x</ci>
</apply>

For definite integrals, the upper and lower limits of integration can be represented using the qualifier elements lowlimit and uplimit, as shown here:

Integrals: equation 2

<apply>
  <int/>
  <bvar><ci>x</ci></bvar>
  <lowlimit><cn>0</cn></lowlimit>
  <uplimit><pi/></uplimit>
  <apply><sin/><ci>x</ci></apply>
</apply>

The limits of integration can also be specified using the interval element, while integration over a general domain can be specified using the condition element. Examples of using the interval and condition elements to represent the range of integration are provided in the discussion of these elements under Constructor elements.

Derivatives

The diff element is used to represent derivatives of functions of a single variable, as shown below:

Derivatives: equation 1

<diff>
  <ci>f</ci>
</diff>

The qualifier element bvar is used to specify the variable of integration. The bvar element can include a degree element to specify the degree of differentiation, as shown below:

Derivatives: equation 2

<apply>
  <diff/>
  <bvar><ci>x</ci></bvar>
  <degree><cn>2</cn></degree>
  <apply>
    <ci type="fn">f</ci>
    <ci>x</ci>
  </apply>
</apply>

Partial derivatives

The partialdiff element is used to represent partial derivatives of multivariable functions. Here is an example:

Partial derivatives: equation 1

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

You can specify the degree of differentiation with respect to any of the variables by including a degree element inside the bvar element that corresponds to that variable. You can also include a degree element directly as a child element of the enclosing apply element to specify the total degree of differentiation, as shown here:

Partial derivatives: equation 2

<apply>
  <partialdiff/>
  <bvar>
    <ci>x</ci>
    <degree><ci>m</ci></degree>
  </bvar>
  <bvar>
    <ci>y</ci>
    <degree><ci>n</ci></degree>
  </bvar>
  <apply>
    <ci type="fn">f</ci>
    <ci>x</ci>
    <ci>y</ci>
  </apply>
</apply>

Vector calculus

The elements grad, divergence, curl, and laplacian represent the gradient, divergence, curl, and Laplacian operators of vector calculus, respectively. For example, here is one of Maxwell's equations of electrodynamics; it describes the divergence of the magnetic field:

Vector calculus

<apply>
  <eq/>
  <apply>
    <divergence/>
    <ci type="vector">B</ci>
  </apply>
  <cn>0</cn>
</apply>

   

<< back next >>

 

 

 


 

Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.


CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America