Which do you prefer more: 1/2 or ?
They both accomplish the job, but the is admittedly more attractive. To write mathematically in WordPress, the site employs the typesetting system LaTeX.
In my recent mathematics posts, in particular this one on Euler’s formula, I’ve resorted to LaTeX to properly format equations.
Writing LaTeX in WordPress is much the same as writing LaTeX in an outside document, with the exception that in order to WordPress to recognize the code, you must nest the word latex and your code between dollar signs, as follows:
$ latex enter code here $
(Note: A space is added between the first $ and latex. That is formatted so that the code displays. When writing in LaTeX, there is no space between $ and latex.)
A Short Guide to LaTeX Code
For arithmetic operations
$ latex 4 + 2 $  
$ latex 4 2 $  
$ latex 4 \cdot 2 $, $ latex 4 \times 2 $  , 
$ latex 4 \div 2 $ 
For fractions, exponents, subscripts, and logarithms
$ latex \frac{2}{3} $  
$ latex 2^3 $  
$ latex y_1 $  
$ latex \log_{10} 3 $ 
For relationships
$ latex 2 < 3 $  
$ latex 3 \leq 4 $  
$ latex 4 > 3 $  
$ latex 4 \geq 3.5 $  
$ latex 2 = 2 $  
$ latex 4 \neq 3 $ 
For trigonometry
$ latex \sin{45} $ or $ latex \sin(45) $  or 
Follow this same format for the other trigonometric functions, relating \sin with \cos, \tan, \csc\, \sec, \cot, \arcsin, \arccos, or \arctan. 
For Riemann sums, limits, and integrals
$ latex \sum_{n=1}^{\infty} {2 \cdot 3^x} $ $ latex \sum\limits_{n=1}^{\infty} {2 \cdot 3^x} $ 

$ latex \lim_{x\to\infty} f(x) $  
$ latex \int_{a}^{b} x^3 $ $ latex \int\limits_{a}^{b} x ^3 $ 
For special symbols, and the Greek symbols in particular, just write the name of the symbol with a backslash to the left. For example:
$ latex \theta $ 
To keep terms together, as in an exponent with more than one character, enclose the numbers/letters in brackets, {}. Brackets tell the LaTeX coder that a group of characters is together.
$ latex 2^{2x} $ 
Below is an example of LaTeX code adapted from my Euler’s formula post, to give you a feel of how a full equation looks.
$ latex f(x) = \sum\limits_{n=0}^\infty \frac{{f^n}{(a)}}{n!}\cdot (xa)^n $ 
I hope that this short look into LaTeX has been helpful. Happy coding!
I’m glad I don’t write about mathematical equations, but also glad now I know a way to do it and have them look correct. Thank you.
LikeLiked by 1 person
Thank you for stopping by and commenting, Richard. I knew I wanted to feature mathematical equations on my site, so I learned LaTeX not long after starting. If you do ever use it, I hope this guide helps.
LikeLike