User Tools

Site Tools


tanszek:oktatas:techcomm:mathematical_expressions_in_tex_language

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tanszek:oktatas:techcomm:mathematical_expressions_in_tex_language [2024/09/02 15:19] kissatanszek:oktatas:techcomm:mathematical_expressions_in_tex_language [2025/09/04 12:45] (current) – [5. Aligning Equations] kissa
Line 1: Line 1:
 ===== Introduction to LaTeX for Mathematical Expressions ===== ===== Introduction to LaTeX for Mathematical Expressions =====
  
-The goal of the lesson is to become familiar with the TeX language, specifically for the purpose of writing mathematical expressions.+The goal of the lesson is to become familiar with LaTeX, specifically for the purpose of writing mathematical expressions.
  
 ==== 1. Introduction to LaTeX ==== ==== 1. Introduction to LaTeX ====
Line 7: Line 7:
 **What is LaTeX?** **What is LaTeX?**
  
-  - LaTeX is a high-quality typesetting system, primarily used for technical and scientific documents. It is particularly powerful for formatting complex mathematical equations and formulas, making it a preferred choice in academia and research.+LaTeX is a high-quality typesetting system, primarily used for technical and scientific documents. It is particularly powerful for formatting complex mathematical equations and formulas, making it a preferred choice in academia and research.
  
 **What are the advantages of LaTeX?** **What are the advantages of LaTeX?**
  
-  **Precision and Control**: LaTeX allows precise formatting of documents and mathematical expressions+  * **Handling Complex Documents**: It is ideal for mathematical formulas, citations, and cross-referencing in technical writing. 
-  **Consistency**: LaTeX automatically manages references, labels, and numbering, ensuring consistency throughout your document+  * **Consistent Layout**: Automatically ensures a uniform, professional design by separating content from formatting. 
-  - **Professional Quality**: Documents created in LaTeX look professional and are publication-ready.+  * **Scalability**: Suitable for large projectsallowing version control and modular structure
 +  * **Longevity**: LaTeX's plain text format ensures long-term compatibility and durability. 
 +  * **Academic Preference**: Often required in academic and scientific publishing.
  
 **Getting Started:** **Getting Started:**
Line 33: Line 35:
   - **\begin{document}** and **\end{document}**: Everything between these commands will be included in the output document.   - **\begin{document}** and **\end{document}**: Everything between these commands will be included in the output document.
  
----- 
 ==== 2. Writing Basic Mathematical Expressions ==== ==== 2. Writing Basic Mathematical Expressions ====
  
Line 54: Line 55:
 </code> </code>
  
-This code will became:+This code will become:
  
 {{:tanszek:oktatas:techcomm:pasted:20240902-141219.png}} {{:tanszek:oktatas:techcomm:pasted:20240902-141219.png}}
Line 89: Line 90:
 {{:tanszek:oktatas:techcomm:pasted:20240902-141644.png}} {{:tanszek:oktatas:techcomm:pasted:20240902-141644.png}}
  
-==== 3. Special Mathematical Symbols in LaTeX ====+==== 3. Basic Text Formatting in LaTeX ==== 
 + 
 +LaTeX also allows you to format text, which is useful for emphasizing certain parts of your documents. 
 + 
 +**Bold text** 
 + 
 +Use the ''\textbf{...}'' command:   
 +  - Example: ''\textbf{This is bold}'' → **This is bold** 
 + 
 +**Italic text** 
 + 
 +Use the ''\textit{...}'' command:   
 +  - Example: ''\textit{This is italic}'' → //This is italic// 
 + 
 +**Underline text** 
 + 
 +Use the ''\underline{...}'' command:   
 +  - Example: ''\underline{This is underlined}'' → __This is underlined__ 
 + 
 +**Combining formats** 
 + 
 +You can even combine them:   
 +  - Example: ''\textbf{\textit{Bold and italic}}'' → **//Bold and italic//** 
 +  - Example: 
 + 
 +<code LaTeX> 
 +\documentclass{article} 
 +\begin{document} 
 + 
 +Here is some \textbf{bold text}, some \textit{italic text}, and some \underline{underlined text}. 
 + 
 +You can also combine them, like \textbf{\textit{bold and italic}}. 
 + 
 +\end{document} 
 +</code> 
 + 
 +This will become: 
 + 
 +{{:tanszek:oktatas:techcomm:pasted:20250904-122112.png}} 
 + 
 +==== 4. Special Mathematical Symbols in LaTeX ====
  
 LaTeX provides a variety of symbols to accurately represent mathematical expressions. LaTeX provides a variety of symbols to accurately represent mathematical expressions.
Line 98: Line 139:
   - Another common symbol is the **infinity symbol**, represented as ''\infty'', and it is displayed as $\infty$    - Another common symbol is the **infinity symbol**, represented as ''\infty'', and it is displayed as $\infty$ 
   - For **greater than or equal to** and **less than or equal to** symbols, use ''\geq'' and ''\leq'', which render as $\geq$ and $\leq$, respectively.   - For **greater than or equal to** and **less than or equal to** symbols, use ''\geq'' and ''\leq'', which render as $\geq$ and $\leq$, respectively.
-==== 4. Aligning Equations ====+ 
 +=== Summation === 
 + 
 +The general form of summation in LaTeX is written using the ''\sum'' command. For example, the sum from $i=1$ to $n$ is given by: 
 + 
 +$$\sum_{i=1}^{n} i^2$$ 
 + 
 +This expression sums the squares of integers from 1 to $n$. 
 + 
 +=== Derivative === 
 + 
 +The derivative of a function $f(x)$ with respect to $x$ is represented in LaTeX using the ''\frac'' command for fractions. The notation for the derivative of $f(x)$ with respect to $x$ is: 
 + 
 +$$\frac{d}{dx} f(x)$$ 
 + 
 +This gives the rate of change of $f(x)$ with respect to $x$. 
 + 
 +=== Partial Derivative === 
 + 
 +For partial derivatives, the ''\partial'' command is used. The partial derivative of a function $f(x, y)$ with respect to $x$ is: 
 + 
 +$$\frac{\partial}{\partial x} f(x, y)$$ 
 + 
 +This expression gives the partial derivative of $f$ with respect to $x$, holding other variables constant. 
 + 
 +=== Partial Integration === 
 + 
 +Partial integration, also known as integration by parts, can be expressed in LaTeX. For the specific example of integrating $x \sin(x)$ from $a$ to $b$, the integral is written as: 
 + 
 +\[ 
 +\int_{a}^{b} x \sin(x) \, dx 
 +\] 
 + 
 +This represents the definite integral of $x \sin(x)$ with respect to $x$ from $a$ to $b$. 
 + 
 +==== 5. Aligning Equations ====
  
 === Align Environment === === Align Environment ===
Line 124: Line 200:
  
 **Explanation:** **Explanation:**
-  - **\usepackage{amsmath}**: The `amsmathpackage is required for advanced mathematical typesetting features, including the `alignenvironment. +  - **\usepackage{amsmath}**: The ''amsmath'' package is required for advanced mathematical typesetting features, including the ''align'' environment. 
-  - **&**: This symbol is used to align equations at the specified point, usually before an operator like `=`.+  - **&**: This symbol is used to align equations at the specified point, usually before an operator like ''=''.
  
 **Tips:** **Tips:**
Line 140: Line 216:
  
  
-==== 5. Exercise ====+==== 6. Exercise ====
  
 Reproduce the following mathematical proof in LaTeX. Use inline and display math, as well as basic and special symbols! Save the result in PDF format! Reproduce the following mathematical proof in LaTeX. Use inline and display math, as well as basic and special symbols! Save the result in PDF format!
Line 149: Line 225:
 Raw text: Raw text:
  
-<code LaTeX+<code> 
-Proof: √2 is Irrational}+Proof: √2 is Irrational
  
-Assume, for contradiction, that 2 is rational. Then it can be expressed as a fraction a/b, where a and b are coprime integers.+Assume, for contradiction, that 2 is rational. Then it can be expressed as a fraction a/b, where a and b are coprime integers.
  
 Then: Then:
Line 173: Line 249:
 This implies that b2 is even, so b must also be even. This implies that b2 is even, so b must also be even.
  
-But if both a and b are even, they are not coprime, which contradicts our original assumption. Therefore, 2 must be irrational.+But if both a and b are even, they are not coprime, which contradicts our original assumption. Therefore, 2 must be irrational.
 </code> </code>
  
tanszek/oktatas/techcomm/mathematical_expressions_in_tex_language.1725290360.txt.gz · Last modified: 2024/09/02 15:19 by kissa