latex

# nth root latex

We have calculated the square root of many values in many situations within mathematics. We have also learned that the power of the square root is always “1/2”. But, what about the other powers? Therefore, we have decided to cover the general power of a root on a value, i.e., the “nth” value. This nth root can be taken as any natural number in general.

Therefore, we will learn some examples to create a mathematical expression with the “nth” root in a latex document. Let’s take a quick start on the Ubuntu 20.04 system.

Start from the system login. Open the Ubuntu’s console application by its activity area search bar. Write terminal and press Enter. The application will be shown on your screen. Click on the application to open it. Within a few seconds, your terminal will be shown.

Write “texmaker” and hit the “Enter” key to open the Latex editor for files in the query area.

The texmaker file tool will be opened in the Latex as presented in the image beneath. Create a new file by tapping on the “File” option followed by the “Create” or “New” option.

## Example 01:

As we know that the “nth” root is a value that has no exact value as 1,2,3, and so on. But, we also know that the nth root must contain some natural value from the numbers. To start this example, you must prepare your document first.

Use the \documentclass command taking {article} as an argument. It illustrates that our file will be of an article-type document. Any document in latex must contain the \begin and \end command within it. Without these two commands, our data will not be displayed in the document format. Therefore, we have been using both with the argument {document}.

We will be doing our work within the \begin and \end command. So, we have been using the \sqrt command in the text area bounded by the “$” sign at both its ends. The dollar sign is used to represent the mathematical expression. The \sqrt contains two parameters. Ist one is the root value in the square brackets. While the other one is the base value within the curly brackets. As we want to know the nth root of some expressions, therefore we have been using the value “n” as root in [] brackets and “x” as a base value. Now, our latex code file is ready to get executed. You have to use the texmaker arrow signs from its taskbar to execute the code file and then open it within the latex supported file formats. We prefer the DVI file format to open the latex document so far. \documentclass{article} \begin{document} Z=$\sqrt[n]{x}$\end{document} We have been presented with the below-shown output on our latex DVI file screen on running this code. You can see the root symbol on the value “x”, while the “n” has been shown as the nth root of base value “x”. ## Example 02: Let’s have a new illustration to get the expression of an “nth” root in the latex command. Open the same old latex document to make it updated. Let’s suppose you want to take an “nth” root of the value “x-y” in the mathematical expression. Therefore, you have to use the same \sqrt command once more. You have to write “x-y” in the place of argument value within the curly brackets. Also, you must add the value “n” as root within the square brackets after the \sqrt command in the expression. The expression must be added between the dollar symbol. \documentclass{article} \begin{document} Z=$\sqrt[n]{x-y}$\end{document} Let’s run the above code after its execution. The output for this updated latex code shows us the nth root of a value “x-y” in a standard document format. ## Example 03: Let’s take a cube root of our very-known quadratic formula. We will be updating the same latex file from the text area. Start the \sqrt command after the “$” sign with the root value [n]. The argument value has been started with curly brackets taking the \frac command to make a formula in its standard form.

The numeratoris started with “-b” followed by the \pm command to add plus, minus sign. The \sqrt command came up again to add a square root on the value “b^2-4ac”. The denominator only takes a single value {2a}. Let’s just quickly execute this code to see its results.

\documentclass{article}

\begin{document}

Z=$\sqrt[n]{\frac{-b\pm\sqrt{b^2-4ac}}{2a}}$

\end{document}

You can see we have got the quadratic formula under the nth root.

You can also take an “nth” root of fractional values within the same mathematical expression. Therefore, we have been using three \frac commands to add three fractional values and adding nth root on all these fractional values separately using the \sqrt command.

The dollar sign has been used before and after every \sqrt command. Let’s save our newly made code to see the results.

\documentclass{article}

\begin{document}

Z=$\sqrt[n]{\frac{a^2}{b^2}}$+

$\sqrt[n]{\frac{c^2}{d^2}}$+

$\sqrt[n]{\frac{e^2}{f^2}}$

\end{document}

You can see how the DVI file format presents a standard type of fractional mathematical expression taking nth root on each.

## Conclusion:

This article has tried to cover simple and easy examples to present the “nth” root for mathematical expression in latex files. The \sqrt and \frac commands have been most used in this article. All the examples are fully usable at any Latex version on any operating system, most preferably on Ubuntu 20.04 Linux system. We hope that our readers will learn something from this article.