Math: Difference between revisions
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
=== Superscript & Subscript === | === Superscript & Subscript === | ||
Superscript: <syntaxhighlight lang="html5" inline><math>x^{5+y}</math></syntaxhighlight> | Superscript: <syntaxhighlight lang="html5" inline><math>x^{5+y}</math></syntaxhighlight> gives <math>x^{5+y}</math><br> | ||
Subscript: <syntaxhighlight lang="html5" inline><math>x_{5+t}</math></syntaxhighlight> | Subscript: <syntaxhighlight lang="html5" inline><math>x_{5+t}</math></syntaxhighlight> gives <math>x_{5+t}</math><br> | ||
Both at the same time: <syntaxhighlight lang="html5" inline><math>x_{5+t}^{5+y}</math></syntaxhighlight> | Both at the same time: <syntaxhighlight lang="html5" inline><math>x_{5+t}^{5+y}</math></syntaxhighlight> gives <math>x_{5+t}^{5+y}</math> | ||
=== Fractions and radicals === | |||
Fractions: <syntaxhighlight lang="html5" inline><math>\frac{numerator}{denominator}</math></syntaxhighlight> gives <math>\frac{numerator}{denominator}</math><br> | |||
---- | ---- | ||
Revision as of 15:24, 25 August 2022
Basics
To render any math equation, the math equation must be between <math></math> i.e., <math>f(x)=x^2</math> gives Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f(x)=x^2}
.
Common math commands
Superscript & Subscript
Superscript: <math>x^{5+y}</math> gives
Subscript: <math>x_{5+t}</math> gives Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle x_{5+t}}
Both at the same time: <math>x_{5+t}^{5+y}</math> gives Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle x_{5+t}^{5+y}}
Fractions and radicals
Fractions: <math>\frac{numerator}{denominator}</math> gives Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \frac{numerator}{denominator}}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \begin{align} \int_{0}^{1}\left(3+x\sqrt{x}\right)dx &= \int_{0}^{1}\left(3+x^{1}{x}^{\frac{1}{2}}\right)dx = \int_{0}^{1}\left(3+x^{1+\frac{1}{2}}\right)dx = \int_{0}^{1}\left(3+x^{\frac{3}{2}}\right)dx \\[2ex] &= 3x+\frac{x^{\frac{3}{2}+1}}{\frac{3}{2}+1}\bigg|_{0}^{1} = 3x+\frac{x^{\tfrac{5}{2}}}{\frac{5}{2}}\bigg|_{0}^{1} = 3x+\frac{2x^{\frac{5}{2}}}{5}\bigg|_{0}^{1} \\[2ex] &= \left[3(1)+\frac{2(1)^{5/2}}{5}\right]-\left[3(0)+\frac{2(0)^{5/2}}{5}\right] \\[2ex] &= 3+\frac{2}{5} = \frac{15}{5}+\frac{2}{5} = \frac{17}{5} \end{align} }
123Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle }