Preview

CS 301 — Problem Set 4Alex Chen

Problem 1. Prove that the sum of the first n odd numbers is n².

Solution. By induction. Base case n=1: 1 = 1². Assume Σ(2i−1) = k². Then Σ = k² + (2k+1) = (k+1)². ∎

Problem 2. Compute ∫₀¹ x² dx.

Solution. ∫₀¹ x² dx = [x³/3]₀¹ = 1/3.

Student

Homework / Problem Set

Problem sets with clean math typesetting.

A problem-set template with numbered problems, solution environments, and math-friendly spacing. Great for weekly assignments and graded work.

Engine
pdfLaTeX
Typical length
2–6
Category
Student

What's included

  • Numbered problem blocks
  • Solution environment
  • amsmath set up
  • Header with course info
  • Fast single-file compile

The LaTeX source

\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[L]{CS 301 --- Problem Set 4}
\fancyhead[R]{Alex Chen}

\newtheorem{problem}{Problem}
\newenvironment{solution}{\par\noindent\textbf{Solution.}}{}

\begin{document}

\begin{problem}
Prove that the sum of the first $n$ odd numbers is $n^2$.
\end{problem}

\begin{solution}
By induction. Base case $n=1$: $1 = 1^2$. Assume
$\sum_{i=1}^{k}(2i-1) = k^2$. Then
\[
  \sum_{i=1}^{k+1}(2i-1) = k^2 + (2k+1) = (k+1)^2. \qed
\]
\end{solution}

\begin{problem}
Compute $\displaystyle \int_0^1 x^2 \, dx$.
\end{problem}

\begin{solution}
$\int_0^1 x^2\,dx = \left[\tfrac{x^3}{3}\right]_0^1 = \tfrac{1}{3}.$
\end{solution}

\end{document}

This is the starting point you get when you open the template. Edit any part of it in the Rudrise Latex Editor.

Questions

How do I hide solutions?

Wrap solutions in a custom environment you can toggle, or comment them out before submitting.

Ready to start your homework / problem set?

Open the template in the Rudrise editor and start writing right away.