Difference between revisions of "Comments:LaTeX-code for the most common formulas"

From GeoGebra Manual
Jump to: navigation, search
m (remove old Java / HTML5 reference)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
''If you have somewhere a very long formula, please share it with us. This will save time for everybody!'' Just edit this page and paste you code at inside the input-box, if you don't know how to use the wiki-code correctly.
+
{{DISPLAYTITLE:LaTeX code for the most common formulas}}
 
+
If you have somewhere a very long formula, please share it with us. This will save time for everybody!'' Just edit this page and paste you code at inside the input-box, if you don't know how to use the wiki-code correctly.
 
==How to use the formulas==
 
==How to use the formulas==
 
Just copy the text from the column '''LaTex Input''' into your text-object input-box. If the formula should be dynamic you need to insert the object instead of the variables that are used here.
 
Just copy the text from the column '''LaTex Input''' into your text-object input-box. If the formula should be dynamic you need to insert the object instead of the variables that are used here.
 
 
==Preview==
 
==Preview==
Check how they look in Java (http://www.geogebra.org/student/m33487?mobile=false) and HTML5 (http://www.geogebra.org/student/m33487?mobile=true)
+
Examples in GeoGebra [https://www.geogebra.org/m/jvXBfFY6 https://www.geogebra.org/m/jvXBfFY6]
  
 
==Useful Formulas==
 
==Useful Formulas==
 
+
<small>
 
{| class="pretty"
 
{| class="pretty"
! Usage !! LaTex Input !! LaTex Output
+
! Usage !! LaTex Input !! LaTex Output
|-  
+
|-
| Square-root symbol
+
| Square-root symbol
| \sqrt{x}
+
| \sqrt{x}
| <math>\sqrt{x}</math>
+
| <math>\sqrt{x}</math>
|-  
+
|-
| Fractions
+
| Fractions
| \frac{a}{b+c}
+
| \frac{a}{b+c}
| <math>\frac{a}{b+c}</math>
+
| <math>\frac{a}{b+c}</math>
|-  
+
|-
| \left( and \right) for large brackets
+
| \left( and \right) for large brackets
| \left( \frac{a}{b} \right) ^{2}
+
| \left( \frac{a}{b} \right) ^{2}
| <math>\left( \frac{a}{b} \right) ^{2}</math>
+
| <math>\left( \frac{a}{b} \right) ^{2}</math>
|-  
+
|-
| Use \textcolor for color
+
| Use \textcolor for color
| x^{\textcolor{#FF00FF}{2}}
+
| x^{\textcolor{#FF00FF}{2}}
|  
+
|
|-  
+
|-
| Use \cr for a line break
+
| Use \cr for a line break
| x=3 \cr y=2
+
| x=3 \cr y=2
| <math>\begin{array} x x=3 \\ y=2 \end{array}</math>
+
| <math>\begin{array} x=3 \\ y=2 \end{array}</math>
|-  
+
|-
| Use \text{ } to mix text and expressions
+
| Use \text{ } to mix text and expressions
| \text{The quadratic formula is }x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
+
| \text{Roots of }ax^2 + bx + c= 0\text{ are }x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
| <math>\text{The quadratic formula is }x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}</math>
+
| <math>\text{Roots of }ax^2 + bx + c= 0 \text{ are }</math><br><math>x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}</math>
|-  
+
|-
| Slope for  a straight line
+
| Slope for  a straight line
| m=\frac{y_2-y_1}{x_2-x_1}
+
| m=\frac{y_2-y_1}{x_2-x_1}
| <math>m=\frac{y_2-y_1}{x_2-x_1}</math>
+
| <math>m=\frac{y_2-y_1}{x_2-x_1}</math>
|-  
+
|-
| Slope for  a straight line (2)
+
| Slope for  a straight line (2)
| m= \frac{Δy}{Δx}=\frac{y_A-y_B}{x_A-x_B}
+
| m= \frac{Δy}{Δx}=\frac{y_A-y_B}{x_A-x_B}
| <math> m= \frac{Δy}{Δx}=\frac{y_A-y_B}{x_A-x_B}</math>
+
| <math>m= \frac{Δy}{Δx}=\frac{y_A-y_B}{x_A-x_B}</math>
|-  
+
|-
| Compound Interest
+
| Compound Interest
| Amount = Principal \cdot \left( 1 + \frac {rate}{periods}  \right)  ^ {time\; \cdot\; periods}
+
| Amount = Principal \cdot \left( 1 + \frac {rate}{periods}  \right)  ^ {time \cdot periods}
|<math>Amount = Principal \cdot \left( 1 + \frac {rate}{periods}  \right)  ^ {time\; \cdot\; periods}</math>
+
|<math>Amount = Principal \cdot \left( 1 + \frac {rate}{periods}  \right)  ^ {time \cdot periods}</math>
|-
+
|-
| Quadratic Equation
+
| Quadratic Equation
| a x^2\; +\; b x\; +\; c\; =\; 0
+
| a x^2 + b x + c = 0
| <math>a x^2\; +\; b x\; +\; c\; =\; 0</math>
+
| <math>a x^2 + b x + c = 0</math>
|-
+
|-
| Simplified Quadratic Equation
+
| Simplified Quadratic Equation
| x^2\; +\; p x\; +\; q\; =\; 0
+
| x^2 + p x + q = 0
| <math>x^2\; +\; p x\; +\; q\; =\; 0</math>
+
| <math>x^2 + p x + q = 0</math>
|-
+
|-
| Vertex Form
+
| Vertex Form
|  f(x)\; =\; a(x\; -\; h)^2\; +\; k
+
|  f(x) = a(x - h)^2 + k
| <math> f(x)\; =\; a(x\; -\; h)^2\; +\; k</math>
+
| <math> f(x) = a(x - h)^2 + k</math>
|-
+
|-
| Factored Form
+
| Factored Form
| f(x)\; =\; (x\; +\; a)\;(x\; +\; b)
+
| f(x) = (x + a)(x + b)
| <math>f(x)\; =\; (x\; +\; a)\;(x\; +\; b)</math>
+
| <math>f(x) = (x + a)(x + b)</math>
|-
+
|-
| Quadratic Formula
+
| Quadratic Formula
| x\; =\; \frac {-b\; \pm\; \sqrt {b^2\; -\; 4ac}}{2a}
+
| x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
| <math>x\; =\; \frac {-b\; \pm\; \sqrt {b^2\; -\; 4ac}}{2a}</math>
+
| <math>x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}</math>
|-
+
|-
| Quadratic Formula
+
| Quadratic Formula
| x_{1/2}\; =\; \frac {-b\; \pm\; \sqrt {b^2\; -\; 4ac}}{2a}
+
| x_{1/2} = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
| <math>x_{1/2}\; =\; \frac {-b\; \pm\; \sqrt {b^2\; -\; 4ac}}{2a}</math>
+
| <math>x_{1/2} = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}</math>
|-
+
|-
| Quadratic Formula for Simplified Quadratic Equation
+
| Quadratic Formula for Simplified Quadratic Equation
| x_{1/2}\; =\; - \frac{p}{2}{\; \pm\; \sqrt {\left( \frac{p}{2} \right)^2\; -\; q}}
+
| x_{1/2} = - \frac{p}{2}{ \pm \sqrt {\left( \frac{p}{2} \right)^2 - q}}
| <math>x_{1/2}\; =\; - \frac{p}{2}{\; \pm\; \sqrt {\left( \frac{p}{2} \right)^2\; -\; q}}</math>
+
| <math>x_{1/2} = - \frac{p}{2}{ \pm \sqrt {\left( \frac{p}{2} \right)^2 - q}}</math>
|-
+
|-
| Quadratic Formula for Simplified Quadratic Equation
+
| Quadratic Formula for Simplified Quadratic Equation
| x_{1/2}\; =\; - \frac{p}{2}{\; \pm\; \sqrt {\left( \frac{p}{2} \right)^2\; -\; q}}
+
| x_{1/2} = - \frac{p}{2}{ \pm \sqrt {\left( \frac{p}{2} \right)^2 - q}}
| <math>x_{1/2}\; =\; - \frac{p}{2}{\; \pm\; \sqrt { \frac{p^2}{4} \; -\; q}}</math>
+
| <math>x_{1/2} = - \frac{p}{2}{ \pm \sqrt { \frac{p^2}{4}   - q}}</math>
|-
+
|-
| Cubic Equation
+
| Cubic Equation
| a x^3\; +\; b x^2\; +\; c x\; +\; d\; =\; 0
+
| a x^3 + b x^2 + c x + d = 0
| <math>a x^3\; +\; b x^2\; +\; c x\; +\; d\; =\; 0</math>
+
| <math>a x^3 + b x^2 + c x + d = 0</math>
|-
+
|-
| Basic Trigonometry Forms
+
| Basic Trigonometry Forms
| \sin A = \frac {opp}{hyp} = \frac {a}{c} = (a/c)
+
| \sin A = \frac {opp}{hyp} = \frac {a}{c} = (a/c)
| <math>\sin A = \frac {opp}{hyp} = \frac {a}{c} = (a/c)</math>
+
| <math>\sin A = \frac {opp}{hyp} = \frac {a}{c} = (a/c)</math>
|-
+
|-
|  
+
|
| f(x)\; =\; a\; \sin\; b\;(x\; -\; h)\; +\; k
+
| f(x) = a \sin b (x - h) + k
| <math>f(x)\; =\; a\; \sin\; b\;(x\; -\; h)\; +\; k</math>
+
| <math>f(x) = a \sin b (x - h) + k</math>
|-
+
|-
|  
+
|
| f(x)\; =\; a\; sin\; (B x + C) + k
+
| f(x) = a sin (B x + C) + k
| <math>f(x)\; =\; a\; \sin\; (B x + C) + k</math>
+
| <math>f(x) = a \sin (B x + C) + k</math>
|-
+
|-
|  
+
|
| b\;(x\; -\; h)\; = B\; \left( x\; -\; \frac {-C}{B} \right)
+
| b (x - h) = B \left( x - \frac {-C}{B} \right)
| <math>b\;(x\; -\; h)\; = B\; \left( x\; -\; \frac {-C}{B} \right)</math>
+
| <math>b (x - h) = B \left( x - \frac {-C}{B} \right)</math>
|-
+
|-
|  
+
|
| h\; = \frac {-C}{B}
+
| h = \frac {-C}{B}
| <math>h\; = \frac {-C}{B}</math>
+
| <math>h = \frac {-C}{B}</math>
|-
+
|-
| Limit (corrected to work in HTML5 as well as Java)
+
| Limit (corrected to work in HTML5 as well as Java)
| \lim_{x \to \infty} \left( \frac{1}{x} \right)
+
| \lim_{x \to \infty} \left( \frac{1}{x} \right)
| <math>\lim_{x \to \infty} \left( \frac{1}{x} \right)</math>
+
| <math>\lim_{x \to \infty} \left( \frac{1}{x} \right)</math>
|-
+
|-
| Distance Formula
+
| Distance Formula
| \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}
+
| \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}
| <math>\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}</math>
+
| <math>\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}</math>
|-
 
|
 
|
 
| <math></math>
 
|-
 
|
 
|
 
| <math></math>
 
|-
 
|
 
|
 
| <math></math>
 
|-
 
 
|}
 
|}
  
[[es:Código_LaTeX_para_las_fórmulas_más_comunes]]
+
==Text formatting==
[[it:Sintassi LaTeX per le formule di uso più comune]]
+
<small>
 +
{| class="pretty"
 +
! Usage !! LaTex Input !! LaTex Output
 +
|-
 +
| Text with spacing
 +
| \text{some words with spaces}
 +
| <math>\text{some words with spaces}</math>
 +
|-
 +
| Italic text
 +
| \mathit{italic text}
 +
| <math>\mathit{italic text}</math>
 +
|-
 +
| Bold text
 +
| \mathbf{bold text}
 +
| <math>\mathbf{bold text}</math>
 +
|-
 +
</small>

Latest revision as of 10:54, 11 January 2020

If you have somewhere a very long formula, please share it with us. This will save time for everybody! Just edit this page and paste you code at inside the input-box, if you don't know how to use the wiki-code correctly.

How to use the formulas

Just copy the text from the column LaTex Input into your text-object input-box. If the formula should be dynamic you need to insert the object instead of the variables that are used here.

Preview

Examples in GeoGebra https://www.geogebra.org/m/jvXBfFY6

Useful Formulas

Usage LaTex Input LaTex Output
Square-root symbol \sqrt{x} \sqrt{x}
Fractions \frac{a}{b+c} \frac{a}{b+c}
\left( and \right) for large brackets \left( \frac{a}{b} \right) ^{2} \left( \frac{a}{b} \right) ^{2}
Use \textcolor for color x^{\textcolor{#FF00FF}{2}}
Use \cr for a line break x=3 \cr y=2 \begin{array} x=3 \\ y=2 \end{array}
Use \text{ } to mix text and expressions \text{Roots of }ax^2 + bx + c= 0\text{ are }x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a} \text{Roots of }ax^2 + bx + c= 0 \text{ are }
x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
Slope for a straight line m=\frac{y_2-y_1}{x_2-x_1} m=\frac{y_2-y_1}{x_2-x_1}
Slope for a straight line (2) m= \frac{Δy}{Δx}=\frac{y_A-y_B}{x_A-x_B} m= \frac{Δy}{Δx}=\frac{y_A-y_B}{x_A-x_B}
Compound Interest Amount = Principal \cdot \left( 1 + \frac {rate}{periods} \right) ^ {time \cdot periods} Amount = Principal \cdot \left( 1 + \frac {rate}{periods} \right) ^ {time \cdot periods}
Quadratic Equation a x^2 + b x + c = 0 a x^2 + b x + c = 0
Simplified Quadratic Equation x^2 + p x + q = 0 x^2 + p x + q = 0
Vertex Form f(x) = a(x - h)^2 + k f(x) = a(x - h)^2 + k
Factored Form f(x) = (x + a)(x + b) f(x) = (x + a)(x + b)
Quadratic Formula x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a} x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
Quadratic Formula x_{1/2} = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a} x_{1/2} = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}
Quadratic Formula for Simplified Quadratic Equation x_{1/2} = - \frac{p}{2}{ \pm \sqrt {\left( \frac{p}{2} \right)^2 - q}} x_{1/2} = - \frac{p}{2}{ \pm \sqrt {\left( \frac{p}{2} \right)^2 - q}}
Quadratic Formula for Simplified Quadratic Equation x_{1/2} = - \frac{p}{2}{ \pm \sqrt {\left( \frac{p}{2} \right)^2 - q}} x_{1/2} = - \frac{p}{2}{ \pm \sqrt { \frac{p^2}{4} - q}}
Cubic Equation a x^3 + b x^2 + c x + d = 0 a x^3 + b x^2 + c x + d = 0
Basic Trigonometry Forms \sin A = \frac {opp}{hyp} = \frac {a}{c} = (a/c) \sin A = \frac {opp}{hyp} = \frac {a}{c} = (a/c)
f(x) = a \sin b (x - h) + k f(x) = a \sin b (x - h) + k
f(x) = a sin (B x + C) + k f(x) = a \sin (B x + C) + k
b (x - h) = B \left( x - \frac {-C}{B} \right) b (x - h) = B \left( x - \frac {-C}{B} \right)
h = \frac {-C}{B} h = \frac {-C}{B}
Limit (corrected to work in HTML5 as well as Java) \lim_{x \to \infty} \left( \frac{1}{x} \right) \lim_{x \to \infty} \left( \frac{1}{x} \right)
Distance Formula \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}

Text formatting

Usage LaTex Input LaTex Output
Text with spacing \text{some words with spaces} \text{some words with spaces}
Italic text \mathit{italic text} \mathit{italic text}
Bold text \mathbf{bold text} \mathbf{bold text}
© 2024 International GeoGebra Institute