Underleaf Logo
Underleaf
BlogPricing
Log InTry Free
All tools

Teaching & Faculty

Teaching & Faculty

Problem Set Generator (LaTeX)

A clean LaTeX problem-set template with problem and solution environments, built for math, physics, and CS courses.

Input

Problem set details

Live LaTeX preview as you edit

Math notation uses $...$, toggle solutions off to produce the student-facing copy.

Output

Problem set LaTeX

Toggle solutions before compiling for student/instructor versions

\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath, amssymb, amsthm} \usepackage{enumitem} \usepackage{xcolor} \usepackage{hyperref} \newcounter{problemnum} \newenvironment{problem}[1]{% \refstepcounter{problemnum}% \noindent\textbf{Problem #1.}\quad }{\vspace{1em}} \newenvironment{solution}{% \noindent\textit{\color{teal!70!black}Solution.}\quad }{\vspace{1em}} \title{Introduction to Real Analysis \ -- \ Problem Set 3} \author{MATH 131A} \date{Due: October 15, 2026} \begin{document} \maketitle \noindent\textbf{Topic:} Sequences, limits, and continuity \bigskip \begin{problem}{1} Prove that the sequence $a_n = (1 + 1/n)^n$ is monotonically increasing and bounded above by 3. Conclude that $a_n$ converges. \end{problem} \begin{solution} We show $a_n < a_{n+1}$ by applying the binomial theorem to both sides and comparing term by term. The bound follows from the geometric series estimate $\sum_{k=0}^n \frac{1}{k!} \le 1 + \sum_{k=1}^n \frac{1}{2^{k-1}} < 3$. \end{solution} \begin{problem}{2} Let $f: [a, b] \to \mathbb{R}$ be continuous. Prove that $f$ attains its maximum on $[a, b]$. \end{problem} \begin{solution} By boundedness of continuous functions on compact intervals, $M = \sup f$ exists and is finite. Take a sequence $x_n$ with $f(x_n) \to M$; by Bolzano-Weierstrass, $x_n$ has a convergent subsequence $x_{n_k} \to x^* \in [a, b]$. By continuity, $f(x^*) = M$. \end{solution} \begin{problem}{3} Suppose $f_n \to f$ pointwise on $[0, 1]$ and each $f_n$ is continuous. Give an example where $f$ is not continuous. \end{problem} \begin{solution} Take $f_n(x) = x^n$. Then $f_n \to f$ pointwise where $f(x) = 0$ for $x < 1$ and $f(1) = 1$, which is discontinuous at $x = 1$. \end{solution} \end{document}

Write problem sets in Underleaf

Underleaf is an AI LaTeX editor with inline writing help, image-to-LaTeX (handy for retyping board work), and a citation finder. Or use the Chrome extension right in your browser.

Try Underleaf free

Two versions, one source file

Every TA workflow has the same pain: write problems + solutions once, then maintain a second "student version" with the solutions blanked out. The toggle on this tool does that mechanically, keep your solutions next to the problems in the source, flip the switch to publish the student copy. No more accidentally posting the answer key.

The template uses standard math packages (amsmath, amssymb, amsthm) and defines a problem / solution environment pair. If you teach with a textbook that uses a specific theorem style, you can keep that, just paste your custom \newtheorem commands into the preamble.

Related tools

Syllabus generatorLecture notes → LaTeXLaTeX math symbols

Explore More Tools

Image to LaTeX

Convert images of notes, equations, or tables to LaTeX code.

Equation to LaTeX

Convert equations to LaTeX code from text or images.

Word to LaTeX

Upload a Word document (.docx) and get clean LaTeX source back.

Table to LaTeX

Convert tables to LaTeX code from text or images.

Free AI tools

Convert anything to LaTeX with AI.

PDFs, images, handwriting, and whiteboard photos — Underleaf turns them into clean, compilable LaTeX in seconds, with AI writing tools included. 10 free credits every month, no credit card required.

Get Started Free
Handwritten notes converted into a typeset LaTeX document
Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to appContact us

Company

PricingBlogTutorialsConference TemplatesConference Deadlines

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorLaTeX Table GeneratorCitation GeneratorThesis GeneratorChrome ExtensionAll Tools

Ask AI about Underleaf

Ask ChatGPTAsk ClaudeAsk Perplexity

© 2026 Underleaf. All rights reserved.