5 Fractions and Roots

Fractions

There are different ways to write fractions in LATEX . The easiest is just to use / as in x/y which yields [latex]x/y[/latex]. A much better way is to make use of the \frac{}{} command. The form of this command is \frac{numerator}{denominator}.

Example:

[latex]2+3\frac{1}{2}=\frac{11}{2}[/latex]

[latex]2+3\frac{1}{2}=\frac{11}{2}[/latex]

Example: Continued Fractions

[latex]\frac{1}{\sqrt{2}+\frac{1}{\sqrt{3}+\frac{1}{\sqrt{4}+\frac{1}{\dots}}}}[/latex]

[latex]\frac{1}{\sqrt{2}+\frac{1}{\sqrt{3}+\frac{1}{\sqrt{4}+\frac{1}{\dots}}}}[/latex]

You can also use fractions in subscripts and superscripts.

Example:

[latex]x^\frac{1}{4z}[/latex]

[latex]x^\frac{1}{4z}[/latex]

Roots

Square roots are pretty simple; we just type \sqrt{...}. For instance, [latex]\sqrt{2}[/latex] gives us [latex]\sqrt{2}[/latex].
Cube roots, fourth roots, and so on are only slightly more difficult; we type \sqrt[n]{...}. For instance, [latex]\sqrt[4]{x-y}[/latex] gives us [latex]\sqrt[4]{x-y}[/latex]

Exercises

Typeset the following expression:

[latex]\sqrt[3]{\frac {x}{y^{\frac{1}{2}}}}[/latex]

 

License

Icon for the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

Using Latex in Pressbooks Copyright © 2021 by Sanja Krajisnik and Jelena Loncar is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, except where otherwise noted.

Share This Book