\documentclass{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\title{A Beginner's Guide to LaTeX for Mathematics}
\author{Your Name}
\date{\today}

\begin{document}

\maketitle

\section{Introduction}
LaTeX is widely used for academic writing, particularly in mathematics and sciences. This guide provides an introduction to basic LaTeX features useful for mathematics students.

\section{Inline vs Displayed Mathematics}
\textbf{Inline mathematics} is included within a line of text, using dollar signs (\$). For example, the code \verb|$a^2 + b^2 = c^2$| renders as $a^2 + b^2 = c^2$ within a text.

\textbf{Displayed mathematics} appears on its own line. Use \verb|\[| and \verb|\]| for unnumbered equations, or the \verb|equation| environment for numbered equations.

\section{Basic Mathematical Operations}
\subsection{Fractions, Sums, and Integrals}
\begin{itemize}
    \item \textbf{Fraction:} \verb|\frac{a}{b}| renders as \(\frac{a}{b}\).
    \item \textbf{Summation:} \verb|\sum_{i=1}^{n} i^2| renders as \(\sum_{i=1}^{n} i^2\).
    \item \textbf{Integral:} \verb|\int_{a}^{b} x^2 dx| renders as \(\int_{a}^{b} x^2 \, dx\).
\end{itemize}

\subsection{Trigonometric and Exponential Functions}
\begin{itemize}
    \item \textbf{Sine:} \verb|\sin(\theta)| renders as \(\sin(\theta)\).
    \item \textbf{Cosine:} \verb|\cos(\theta)| renders as \(\cos(\theta)\).
    \item \textbf{Exponential:} \verb|e^{x}| or \verb|\exp(x)| renders as \(e^{x}\) or \(\exp(x)\).
\end{itemize}

\section{Displayed Mathematics Examples}
\subsection{Unnumbered Equations}
\begin{verbatim}
\[
    \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
\]
\end{verbatim}
This code will render as:
\[
    \int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}
\]

\subsection{Numbered Equations}
\begin{verbatim}
\begin{equation}
    \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
\end{equation}
\end{verbatim}
This code will render as:
\begin{equation}
    \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
\end{equation}

\section{A Complex Example}
Euler's identity is a beautiful and profound equation in mathematics. Here's how to write it in LaTeX:
\begin{verbatim}
\begin{equation}
    e^{i\pi} + 1 = 0
\end{equation}
\end{verbatim}
This will render as:
\begin{equation}
    e^{i\pi} + 1 = 0
\end{equation}

\section{Conclusion}
This document is a basic introduction to LaTeX for mathematical expressions. LaTeX's capabilities extend far beyond these basics, enabling detailed typesetting for complex documents.

\end{document}
