Show description
Calculus II - Infinite Series Deep Dive
Calculus II - Infinite Series Deep Dive
Calculus II
Infinite Series Deep Dive
Series Fundamentals
[ + ]
An infinite series is the sum of the terms of an infinite sequence $\{a_n\}$. The core question is whether this sum approaches a finite value (converges) or not (diverges).
Sequence of Partial Sums
The convergence of a series $\sum a_n$ is defined by the convergence of its sequence of partial sums, $S_k = \sum_{n=1}^{k} a_n = a_1 + a_2 + \dots + a_k$.
If $\lim_{k \to \infty} S_k = L$ (a finite number), the series converges to $L$. Otherwise, it diverges.
Geometric Series: The Foundation
A series of the form $\sum_{n=1}^{\infty} ar^{n-1}$. This is one of the few series where we can easily find the sum.
Converges if $|r| < 1$. The sum is $S = \frac{a}{1-r}$, where 'a' is the first term.
Diverges if $|r| \geq 1$.
The Test for Divergence
This should always be your first thought! For a series $\sum a_n$:
If $\lim_{n \to \infty} a_n \neq 0$ or the limit DNE, the series **diverges**.
Warning: If $\lim_{n \to \infty} a_n = 0$, this test is inconclusive. The series might converge or diverge. (e.g., The Harmonic Series $\sum \frac{1}{n}$ diverges, but its terms go to 0).
Tests for Positive Series
[ + ]
These tests apply to series with non-negative terms.
The Integral Test: If $f(x)$ is positive, continuous, and decreasing for $x \ge 1$ and $a_n = f(n)$, then $\sum a_n$ and $\int_1^\infty f(x)dx$ either both converge or both diverge.
The p-Series Test: A direct result of the Integral Test. The series $\sum \frac{1}{n^p}$ converges if $p > 1$ and diverges if $p \leq 1$.
Direct Comparison Test: If $0 \le a_n \le b_n$, if the "bigger" series $\sum b_n$ converges, so does $\sum a_n$. If the "smaller" series $\sum a_n$ diverges, so does $\sum b_n$.
Limit Comparison Test: For two positive series $\sum a_n$ and $\sum b_n$, if $\lim_{n \to \infty} \frac{a_n}{b_n} = L$ where $L$ is finite and positive ($0 < L < \infty$), then both series either converge or diverge together.…
Calculus II - Infinite Series Deep Dive
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculus II - Infinite Series Deep Dive</title>
<!-- Google Fonts for retro style -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Rajdhani:wght@400;600&display=swap" rel="stylesheet">
<!-- MathJax for rendering LaTeX -->
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\\[', '\\]']],
processEscapes: true
},
svg: {
fontCache: 'global'
}
};
</script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>
<style>
:root {
--bg-color: #0c0c0c; /* Near black */
--text-color: #e0e0e0; /* Light grey */
--header-color: #ff8c00; /* Dark Orange */
--accent-color-1: #d2691e; /* Chocolate */
--accent-color-2: #8b949e; /* Grey */
--border-color: #333;
--highlight-bg: #1a1a1a;
--pitfall-color: #ff4500; /* OrangeRed */
--font-header: 'Orbitron', sans-serif;
--font-body: 'Rajdhani', sans-serif;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-body);
font-size: 19px;
line-height: 1.7;
padding: 20px;
max-width: 950px;
margin: auto;
}
h1, h2, h3, h4 {
font-family: var(--font-header);
color: var(--header-color);
text-shadow: 0 0 8px rgba(255, 140, 0, 0.5);
letter-spacing: 1px;
margin-bottom: 20px;
}
h1 { font-size: 2.5rem; text-align: center; }
h2 { font-size: 1.8rem; margin-top: 40px; color: var(--accent-color-1); text-align: center;}
h3 { font-size: 1.4rem; color: var(--header-color); text-shadow: none;}
h4 { font-size: 1.2rem; color: var(--accent-color-1); text-shadow: none;}
.main-container {
border: 2px solid var(--border-color);
padding: 25px;
background-color: var(--bg-color);
box-shadow: 0 0 20px rgba(255, 140, 0, 0.2);
border-radius: 10px;
}
.module-section {
border: 1px solid var(--border-color);
margin-bottom: 25px;
padding: 20px;
border-radius: 8px;
background-color: var(--highlight-bg);
transition: all 0.3s ease-in-out;
}
.section-header {
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
}
.section-header h3 { margin: 0; }
.section-header span { font-size: 1.5rem; color: var(--header-color); transition: transform 0.3s ease; }
.section-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.6s ease-out, padding-top 0.6s ease-out;
padding: 0 15px;
}
.info-box, .pitfall-box {
border-left: 4px solid var(--accent-color-1);
padding: 15px;
margin: 20px 0;
background-color: rgba(210, 105, 30, 0.1);
border-radius: 0 8px 8px 0;
}
.pitfall-box {
border-left-color: var(--pitfall-color);
background-color: rgba(255, 69, 0, 0.1);
}
.box-title {
font-family: var(--font-header);
font-size: 1.1rem;
margin-top: 0;
margin-bottom: 15px;
color: var(--header-color);
border-bottom: 1px solid var(--border-color);
padding-bottom: 10px;
}
.pitfall-box .box-title { color: var(--pitfall-color); }
ul { list-style-type: none; padding-left: 0; }
li { padding-left: 25px; position: relative; margin-bottom: 10px; }
li::before { content: '»'; color: var(--header-color); font-weight: bold; position: absolute; left: 0; top: -2px; }
#visualizer-canvas {
width: 100%;
height: 400px;
background-color: #000;
border: 1px solid var(--border-color);
border-radius: 5px;
margin-top: 15px;
}
.controls {
padding: 15px;
background: var(--bg-color);
border-radius: 5px;
margin-top: 10px;
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
}
.controls label { font-family: var(--font-body); }
.controls select, .controls button {
background-color: var(--highlight-bg);
color: var(--text-color);
border: 1px solid var(--border-color);
padding: 8px 12px;
font-family: var(--font-body);
font-size: 16px;
border-radius: 5px;
}
.controls button:hover { background-color: var(--border-color); cursor: pointer; }
</style>
</head>
<body>
<div class="main-container">
<h1>Calculus II</h1>
<h2>Infinite Series Deep Dive</h2>
<div class="module-container">
<!-- SECTION 1: SERIES FUNDAMENTALS -->
<div class="module-section">
<div class="section-header" onclick="toggleSection(this)">
<h3>Series Fundamentals</h3>
<span class="toggle-indicator">[ + ]</span>
</div>
<div class="section-content">
<p>An infinite series is the sum of the terms of an infinite sequence $\{a_n\}$. The core question is whether this sum approaches a finite value (converges) or not (diverges).</p>
<div class="info-box">
<h4 class="box-title">Sequence of Partial Sums</h4>
<p>The convergence of a series $\sum a_n$ is defined by the convergence of its sequence of partial sums, $S_k = \sum_{n=1}^{k} a_n = a_1 + a_2 + \dots + a_k$.</p>
<p>If $\lim_{k \to \infty} S_k = L$ (a finite number), the series converges to $L$. Otherwise, it diverges.</p>
</div>
<div class="info-box">
<h4 class="box-title">Geometric Series: The Foundation</h4>
<p>A series of the form $\sum_{n=1}^{\infty} ar^{n-1}$. This is one of the few series where we can easily find the sum.</p>
<ul>
<li><strong>Converges</strong> if $|r| < 1$. The sum is $S = \frac{a}{1-r}$, where 'a' is the first term.</li>
<li><strong>Diverges</strong> if $|r| \geq 1$.</li>
</ul>
</div>
<div class="pitfall-box">
<h4 class="box-title">The Test for Divergence</h4>
<p>This should always be your first thought! For a series $\sum a_n$:</p>
<p>If $\lim_{n \to \infty} a_n \neq 0$ or the limit DNE, the series **diverges**.</p>
<p><strong>Warning:</strong> If $\lim_{n \to \infty} a_n = 0$, this test is <strong>inconclusive</strong>. The series might converge or diverge. (e.g., The Harmonic Series $\sum \frac{1}{n}$ diverges, but its terms go to 0).</p>
</div>
</div>
</div>
<!-- SECTION 2: TESTS FOR POSITIVE SERIES -->
<div class="module-section">
<div class="section-header" onclick="toggleSection(this)">
<h3>Tests for Positive Series</h3>
<span class="toggle-indicator">[ + ]</span>
</div>
<div class="section-content">
<p>These tests apply to series with non-negative terms.</p>
<ul>
<li><strong>The Integral Test:</strong> If $f(x)$ is positive, continuous, and decreasing for $x \ge 1$ and $a_n = f(n)$, then $\sum a_n$ and $\int_1^\infty f(x)dx$ either both converge or both diverge.</li>
<li><strong>The p-Series Test:</strong> A direct result of the Integral Test. The series $\sum \frac{1}{n^p}$ converges if $p > 1$ and diverges if $p \leq 1$.</li>
<li><strong>Direct Comparison Test:</strong> If $0 \le a_n \le b_n$, if the "bigger" series $\sum b_n$ converges, so does $\sum a_n$. If the "smaller" series $\sum a_n$ diverges, so does $\sum b_n$.</li>
<li><strong>Limit Comparison Test:</strong> For two positive series $\sum a_n$ and $\sum b_n$, if $\lim_{n \to \infty} \frac{a_n}{b_n} = L$ where $L$ is finite and positive ($0 < L < \infty$), then both series either converge or diverge together. This is often easier than the Direct Comparison Test.</li>
</ul>
</div>
</div>
<!-- SECTION 3: ALTERNATING SERIES & ABSOLUTE CONVERGENCE -->
<div class="module-section">
<div class="section-header" onclick="toggleSection(this)">
<h3>Alternating Series & Absolute Convergence</h3>
<span class="toggle-indicator">[ + ]</span>
</div>
<div class="section-content">
<div class="info-box">
<h4 class="box-title">The Alternating Series Test</h4>
<p>An alternating series $\sum (-1)^n b_n$ (with $b_n > 0$) converges if both conditions are met:</p>
<ol>
<li>$b_{n+1} \le b_n$ for all large $n$ (the terms are eventually decreasing).</li>
<li>$\lim_{n \to \infty} b_n = 0$.</li>
</ol>
</div>
<div class="info-box">
<h4 class="box-title">Absolute vs. Conditional Convergence</h4>
<ul>
<li>A series $\sum a_n$ is <strong>absolutely convergent</strong> if the series of absolute values, $\sum |a_n|$, converges. (This is a stronger form of convergence).</li>
<li>A series $\sum a_n$ is <strong>conditionally convergent</strong> if it converges, but $\sum |a_n|$ diverges. The Alternating Harmonic Series $\sum \frac{(-1)^{n-1}}{n}$ is the classic example.</li>
</ul>
<p><strong>Key Fact:</strong> If a series converges absolutely, then it converges.</p>
</div>
</div>
</div>
<!-- SECTION 4: RATIO & ROOT TESTS -->
<div class="module-section">
<div class="section-header" onclick="toggleSection(this)">
<h3>The Ratio & Root Tests</h3>
<span class="toggle-indicator">[ + ]</span>
</div>
<div class="section-content">
<p>These tests are powerful for series involving factorials ($n!$) or $n$-th powers.</p>
<div class="info-box">
<h4 class="box-title">Ratio Test</h4>
<p>Let $L = \lim_{n \to \infty} \left|\frac{a_{n+1}}{a_n}\right|$.</p>
<ul>
<li>If $L < 1$, the series is absolutely convergent.</li>
<li>If $L > 1$ or $L = \infty$, the series is divergent.</li>
<li>If $L = 1$, the test is inconclusive.</li>
</ul>
</div>
<div class="info-box">
<h4 class="box-title">Root Test</h4>
<p>Let $L = \lim_{n \to \infty} \sqrt[n]{|a_n|}$.</p>
<ul>
<li>The conclusions are identical to the Ratio Test based on the value of $L$.</li>
</ul>
</div>
</div>
</div>
<!-- SECTION 5: POWER, TAYLOR, & MACLAURIN SERIES -->
<div class="module-section">
<div class="section-header" onclick="toggleSection(this)">
<h3>Power, Taylor, & Maclaurin Series</h3>
<span class="toggle-indicator">[ + ]</span>
</div>
<div class="section-content">
<p>A <strong>Power Series</strong> is a series of the form $\sum c_n(x-a)^n$. Our goal is to find its <strong>Radius of Convergence (R)</strong> and <strong>Interval of Convergence (I.O.C.)</strong>.</p>
<p>A <strong>Taylor Series</strong> is a way to represent a function $f(x)$ as a power series centered at $x=a$. A <strong>Maclaurin Series</strong> is a Taylor Series centered at $a=0$.</p>
<div class="info-box">
<h4 class="box-title">Taylor Series Formula</h4>
$$ f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x-a)^n $$
</div>
<div class="info-box">
<h4 class="box-title">Key Maclaurin Series to Memorize</h4>
<ul>
<li>$e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \dots$</li>
<li>$\sin(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots$</li>
<li>$\cos(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots$</li>
<li>$\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n = 1 + x + x^2 + \dots$</li>
</ul>
</div>
</div>
</div>
<!-- SECTION 6: SERIES VISUALIZER -->
<div class="module-section">
<div class="section-header" onclick="toggleSection(this)">
<h3>Partial Sums Visualizer</h3>
<span class="toggle-indicator">[ + ]</span>
</div>
<div class="section-content">
<p>See how a series behaves by watching its sequence of partial sums ($S_k$) evolve. Select a series and watch the points $(k, S_k)$ get plotted.</p>
<div class="controls">
<label for="series-select">Choose a Series:</label>
<select id="series-select">
<option value="geo">Convergent Geometric: Σ (0.8)ⁿ</option>
<option value="p-series">Convergent p-Series: Σ 1/n²</option>
<option value="alt">Conditionally Convergent: Σ (-1)ⁿ/n</option>
<option value="harmonic">Divergent Harmonic: Σ 1/n</option>
</select>
<button id="start-viz-btn">Start Visualization</button>
</div>
<canvas id="visualizer-canvas"></canvas>
</div>
</div>
</div>
</div>
<script>
function toggleSection(headerElement) {
const content = headerElement.nextElementSibling;
const indicator = headerElement.querySelector('.toggle-indicator');
const isActive = content.classList.contains('active');
document.querySelectorAll('.section-content.active').forEach(activeContent => {
if (activeContent !== content) {
activeContent.classList.remove('active');
activeContent.style.maxHeight = '0';
activeContent.style.paddingTop = '0';
activeContent.previousElementSibling.querySelector('.toggle-indicator').textContent = '[ + ]';
}
});
if (!isActive) {
content.classList.add('active');
content.style.maxHeight = content.scrollHeight + "px";
content.style.paddingTop = '20px';
indicator.textContent = '[ - ]';
} else {
content.classList.remove('active');
content.style.maxHeight = '0';
content.style.paddingTop = '0';
indicator.textContent = '[ + ]';
}
}
// --- SERIES VISUALIZER SCRIPT ---
const canvas = document.getElementById('visualizer-canvas');
const ctx = canvas.getContext('2d');
const select = document.getElementById('series-select');
const startBtn = document.getElementById('start-viz-btn');
let animationFrameId;
const seriesFormulas = {
'geo': n => Math.pow(0.8, n),
'p-series': n => 1 / (n * n),
'alt': n => Math.pow(-1, n-1) / n,
'harmonic': n => 1 / n
};
const seriesProperties = {
'geo': { yMin: 0, yMax: 5, sum: 4 },
'p-series': { yMin: 0, yMax: 2, sum: Math.PI*Math.PI/6 },
'alt': { yMin: 0, yMax: 1.2, sum: Math.log(2) },
'harmonic': { yMin: 0, yMax: 5, sum: null }
};
function drawVisualization() {
if (animationFrameId) {
cancelAnimationFrame(animationFrameId);
}
const seriesKey = select.value;
const termFunc = seriesFormulas[seriesKey];
const props = seriesProperties[seriesKey];
const width = canvas.width = canvas.clientWidth;
const height = canvas.height = canvas.clientHeight;
let partialSum = 0;
let n = 1;
const maxN = 200;
function animate() {
if (n > maxN) {
cancelAnimationFrame(animationFrameId);
return;
}
ctx.clearRect(0, 0, width, height);
// Draw convergence line if it exists
if(props.sum !== null) {
const ySum = height - ((props.sum - props.yMin) / (props.yMax - props.yMin)) * height;
ctx.strokeStyle = 'rgba(255, 140, 0, 0.4)'; // Orange
ctx.lineWidth = 1;
ctx.setLineDash([5, 5]);
ctx.beginPath();
ctx.moveTo(0, ySum);
ctx.lineTo(width, ySum);
ctx.stroke();
ctx.setLineDash([]);
ctx.fillStyle = 'rgba(255, 140, 0, 0.8)'; // Orange
ctx.font = '14px Rajdhani';
ctx.textAlign = 'right';
ctx.fillText(`Sum ≈ ${props.sum.toFixed(4)}`, width - 10, ySum - 5);
}
// Draw points
let currentSumForDrawing = 0;
ctx.strokeStyle = '#ff8c00'; // Orange
ctx.lineWidth = 2;
ctx.beginPath();
for (let i = 1; i <= n; i++) {
currentSumForDrawing += termFunc(i);
const x = (i / maxN) * width;
const y = height - ((currentSumForDrawing - props.yMin) / (props.yMax - props.yMin)) * height;
if(i === 1) ctx.moveTo(x,y);
else ctx.lineTo(x,y);
}
ctx.stroke();
// Draw current point
const lastX = (n / maxN) * width;
const lastY = height - ((currentSumForDrawing - props.yMin) / (props.yMax - props.yMin)) * height;
ctx.fillStyle = '#e0e0e0';
ctx.beginPath();
ctx.arc(lastX, lastY, 4, 0, 2 * Math.PI);
ctx.fill();
// Draw text
ctx.fillStyle = '#e0e0e0';
ctx.font = '16px Rajdhani';
ctx.textAlign = 'left';
ctx.fillText(`n = ${n}`, 10, 20);
ctx.fillText(`S_n = ${currentSumForDrawing.toFixed(4)}`, 10, 40);
n++;
animationFrameId = requestAnimationFrame(animate);
}
animate();
}
startBtn.addEventListener('click', drawVisualization);
// Initial draw on load
setTimeout(() => {
if (canvas.clientWidth > 0) drawVisualization();
}, 200);
</script>
</body>
</html>