MathML- Summation and Production

Written by @m_k_amin 30 May 2013

When large amount of data is used, it is not make sense to write all of them in the equations and formulas; instead we use some Greek symbols to show the summation (Sigma) and production (Pi) for shortening the formula. So it is necessary to know how to write them in documents and specially web pages. The following code shows HTML5 MathML structures for Summations and Productions. We have illustrated simple and complex examples below. So if you have large complicated equations which have fractions and other things inside summations and productions, don't worry and just follow the code below.

Code Snippet:

                                                
                                                <!-- this script is provided by https://www.html5freecode.com coded by: Kerixa Inc. -->
<!-- This Script is from www.html5freecode.com, Coded by: Kerixa Inc-->
<script type="text/javascript"
          src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<body style="font-size: 16pt;">

<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
  <munderover>
    <mo>&sum;</mo>
    <mrow>
        <mi>i</mi>
        <mo>=</mo>
        <mn>0</mn>
    </mrow>
    <mi>&infin;</mi>
  </munderover>
  <mi>sin</mi>
  <mfenced separators=' '>
	<mi>i</mi>
	<mi>x</mi>
  </mfenced>    

	<mspace width="80px"/>
  
  <munderover>
    <mo>&prod;</mo>
    <mrow>
        <mi>j</mi>
        <mo>=</mo>
        <mn>0</mn>
    </mrow>
    <mi>N</mi>
  </munderover>
  <mfenced separators=' '>  
	  <msup>
		  <mi>j</mi>
		  <mn>2</mn>
	  </msup>
	  <mo>+</mo>
	  <mi>j</mi>
   </mfenced>
</math>

<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
  <munderover>
    <mo>&sum;</mo>
    <mrow>
        <mi>i</mi>
        <mo>=</mo>
        <mn>0</mn>
    </mrow>
    <mi>&infin;</mi>
  </munderover>
  <mfenced separators=' '>
	<mfrac>
		<mrow>
		 	<mi>sin</mi>
		 	<mfenced separators=' '>
  				<mfrac bevelled="true">
    				<mrow>
     					<mi>i</mi>
     					<mi>&pi;</mi>
    				</mrow>
    				<mn>2</mn>
  				</mfrac>
		 	</mfenced>
		</mrow>
    	<mrow>
    		<mi>i</mi>
    		<mo>!</mo>
		</mrow>
	</mfrac>
  </mfenced>    

	<mspace width="50px" height="70px"/>
  
  <munderover>
    <mo>&prod;</mo>
    <mrow>
        <mi>j</mi>
        <mo>=</mo>
        <mn>0</mn>
    </mrow>
    <mi>N</mi>
  </munderover>
  <mfenced separators=' '>  
	  <mfrac>
	  	<mrow>
	  		<msub>
	  			<mi>&sigma;</mi>
	  			<mi>j</mi>
	  		</msub>
	  		<mo>+</mo>
	  		<mi>&phi;</mi>
	  	</mrow>
	  	<msup>
	  	<mrow>
	  		<mfenced separators=' '> 
	  			<mi>x</mi>
	  			<mo>+</mo>
	  			<mi>y</mi>
	  		</mfenced>
	  	</mrow>
	  	<mi>j</mi>
	  	</msup>
	  </mfrac>
	  <mo>+</mo>
	  <mi>j</mi>
   </mfenced>
</math>
</body>
<div style="text-align: center"><font face="Tahoma"><br><a target="_blank" href="http://www.html5freecode.com"><span style="font-size: 8pt; text-decoration: none">HTML5 Free Code</span></a></font></div><a target='_blank' href='https://www.html5freecode.com' style='font-size: 8pt; text-decoration: none'>Html5 Free Codes</a>                                                
                                            

Example:


About @m_k_amin

This user is pending a biography.

M

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: Afzal, FOTPU
advertisement 2