ES659 · Module B · Mathematics & Statistics for Environmental Engineering

Calculus from the class notes, with pictures

This page covers everything in the class notes (functions → linear systems) and all 7 questions of Assignment 1, due Wed 14 Oct 2026. Every section gives you the idea, a picture you can play with, the formulas to remember, and a short "how to teach it" box for explaining it to your classmate.

How the topics build on each other

Limits are the foundation. Continuity is defined with a limit, the derivative is a limit (of secant slopes), and the definite integral is a limit (of Riemann sums). Linear systems are the start of the next unit (Linear Algebra).

Which section each assignment question needs

QAsksStudyAnswer
1Domain of $f\circ g$§1§2$\mathbb R\setminus\{\tfrac23,\,2\}$
2Find $a,b$ for continuity§5$a=1,\ b=-1$
3Limit at $\infty$ ($\infty-\infty$)§4 (conjugate + bridge)$\tfrac12$
4IVT: is there a zero in $[1,5]$?§6Yes
5Differentiable at $x=1,2$?§7Not at 1; yes at 2
6$\int 2x\sin(x^2+1)\,dx$§8 (substitution bridge)$-\cos(x^2+1)+C$
7$\int_0^1 (4x-6\sqrt[3]{x^2})\,dx$§9$-\tfrac85$
Purple "bridge" boxesQ3 and Q6 each need one small idea the notes don't show explicitly: limits at infinity, and integration by substitution. Each one is a short step from something that is in the notes, and the purple boxes explain that step.
Section 1

Functions & combining them

A function is a rule that gives each input exactly one output. The domain is the set of inputs the rule accepts. In this course, only three things remove an input from the domain:

  1. Division by zero: $\frac{1}{x-1}$ rejects $x=1$.
  2. An even root of a negative number: $\sqrt{x}$ needs $x\ge 0$.
  3. The log of a number $\le 0$: $\ln x$ needs $x>0$ (this shows up in Q2).
Combining two functions $$(f\pm g)(x)=f(x)\pm g(x),\qquad (f\cdot g)(x)=f(x)\,g(x),\qquad (c\,f)(x)=c\,f(x),\qquad \Big(\frac fg\Big)(x)=\frac{f(x)}{g(x)}$$ Domain $= D(f)\cap D(g)$, meaning the inputs both functions accept. For $f/g$, also remove every $x$ where $g(x)=0$.

The example from the notes uses $f(x)=\sqrt x$ and $g(x)=\sqrt{1-x}$:

FunctionFormulaDomainWhy
$f$$\sqrt x$$[0,\infty)$$x\ge0$
$g$$\sqrt{1-x}$$(-\infty,1]$$1-x\ge 0$
$3g$$3\sqrt{1-x}$$(-\infty,1]$same as $g$
$f+g$, $f-g$, $f\cdot g$$\sqrt x\pm\sqrt{1-x}$, $\sqrt x\sqrt{1-x}$$[0,1]$$[0,\infty)\cap(-\infty,1]$
$f/g$$\sqrt x/\sqrt{1-x}$$[0,1)$$g(1)=0$, so drop $x=1$
$g/f$$\sqrt{1-x}/\sqrt x$$(0,1]$$f(0)=0$, so drop $x=0$
Domain = overlap of the two bars
How to teach it"The domain is every input that won't break the formula. When you combine two functions, an input has to work for both, so you take the overlap. If you divide, the bottom also can't be zero."
Section 2

Composite functions

$(f\circ g)(x)=f(g(x))$ means you apply $g$ first, then put its output into $f$. Think of two machines connected in a line:

x→gruns first→g(x)→fruns second→f(g(x))
Domain of f∘g: two checkpoints An input $x$ is allowed only if (1) $x\in D(g)$, so the first machine accepts it, and (2) $g(x)\in D(f)$, so the second machine accepts what the first one produced. $$D(f\circ g)=\{\,x\in D(g)\ :\ g(x)\in D(f)\,\}$$

The example from the notes uses $f(x)=\sqrt x$ (domain $[0,\infty)$) and $g(x)=x+1$ (domain $\mathbb R$). The notes leave $f\circ f$ and $g\circ g$ blank, so they're filled in here:

CompositeFormulaDomain
$f\circ g$$f(g(x))=\sqrt{x+1}$$[-1,\infty)$ because $x+1\ge0$
$g\circ f$$g(f(x))=\sqrt x+1$$[0,\infty)$ because $x\ge0$
$f\circ f$$\sqrt{\sqrt x}=x^{1/4}$$[0,\infty)$
$g\circ g$$(x+1)+1=x+2$$\mathbb R$

Order matters: $\sqrt{x+1}\ne\sqrt x+1$. In general $f\circ g\neq g\circ f$.

The machine: feed it an x
A red box means that machine rejects its input, so this $x$ is not in the domain.
Trap (this is exactly what Q1 tests)Find the domain before you simplify the formula. Simplifying can cancel the very term that was blocking an input, so the simplified formula looks defined at a point where the composite is not. Q1 below shows this happening at $x=\tfrac23$.
How to teach it"$f\circ g$ is a two-step pipeline. An input survives only if it passes both checkpoints: $g$ has to accept it, and then $f$ has to accept whatever $g$ gave back."
Section 3

Even, odd and piecewise functions

Even$f(-x)=f(x)$
The graph is a mirror image in the y-axis.
Examples: $x^2,\ x^4,\ \cos x,\ |x|$
Odd$f(-x)=-f(x)$
The graph is a mirror image through the origin (rotate it 180°).
Examples: $x^3,\ x,\ \sin x$

How to test: replace $x$ with $-x$ and simplify. If you get back $f(x)$, it's even. If you get $-f(x)$, it's odd. If you get neither, it's neither (most functions are, e.g. $x^2+x$).

Piecewise function: uses a different rule on different parts of the domain. The notes' example is $$|x|=\begin{cases}x,&x\ge 0\\-x,&x<0\end{cases}$$ Always check which piece owns the boundary point ($\le$ vs $<$). Q2 and Q5 both depend on it.

Mirror test + what happens to ∫ from −a to a
How to teach it"Even means you can fold the graph along the y-axis and the two halves line up. Odd means you can spin it half a turn around the origin and it lands on itself. You can see the payoff in the shading: an odd function's area on the left cancels its area on the right, so its integral from $-a$ to $a$ is 0."
Section 4

Limits

$\displaystyle\lim_{x\to c}f(x)=L$ means that as $x$ gets close to $c$ (without ever being equal to $c$), $f(x)$ gets close to $L$. The value of $f(c)$ itself doesn't matter, and $f(c)$ doesn't even need to exist.

One-sided limits$\lim_{x\to c^-}$ approaches $c$ from the left and $\lim_{x\to c^+}$ approaches from the right.
The two-sided limit exists only if both one-sided limits exist and are equal.

The example from the notes: $\displaystyle\lim_{x\to0}\frac{\sin 4x}{\sin 2x}=2$

Plugging in $x=0$ gives $\tfrac00$, which tells you nothing yet. Use the standard limit $\displaystyle\lim_{\theta\to0}\frac{\sin\theta}{\theta}=1$:

$$\frac{\sin4x}{\sin2x}=\underbrace{\frac{\sin 4x}{4x}}_{\to1}\cdot\underbrace{\frac{2x}{\sin2x}}_{\to1}\cdot\frac{4x}{2x}\ \longrightarrow\ 1\cdot1\cdot2=2$$

Alternatively, since $\sin4x=2\sin2x\cos2x$, the ratio equals $2\cos2x\to2$.

Watch f(x) approach 2. There's a hole at x = 0.

Toolkit for computing limits

  1. Direct substitution. If plugging in gives a normal number, that's the answer.
  2. Factor and cancel when you get $\tfrac00$.
  3. Multiply by the conjugate when you see a difference of square roots: $(\sqrt A-\sqrt B)\cdot\frac{\sqrt A+\sqrt B}{\sqrt A+\sqrt B}=\frac{A-B}{\sqrt A+\sqrt B}$. The notes use this to differentiate $\sqrt x$ (§7), and Q3 needs it.
  4. The standard limit $\frac{\sin\theta}{\theta}\to1$.
Bridge for Q3: limits as x → ∞ As $x\to\infty$: $\frac1x\to0$, $\frac1{x^2}\to0$, and $\frac{k}{x^n}\to0$ for any $n>0$.
Trick: divide the top and bottom by the highest power of $x$ that appears. Every leftover $\frac{\text{const}}{x^n}$ term goes to 0.
For example, $\displaystyle\lim_{x\to\infty}\frac{3x^2+1}{x^2-5}=\lim\frac{3+1/x^2}{1-5/x^2}=3$.
Inside a square root, use $\sqrt{x^2}=x$ (true for $x>0$): $\sqrt{x^2+x+1}=x\sqrt{1+\tfrac1x+\tfrac1{x^2}}$.
Watch out for $\infty-\infty$. It is not 0. It's an indeterminate form, and the conjugate trick converts it into a fraction you can evaluate.
How to teach it"A limit asks where the function is heading, not where it actually is. The graph can have a hole at $x=0$, and the limit is still the height the hole sits at."
Section 5

Continuity

Informally, a function is continuous if you can draw its graph without lifting the pencil. The formal test at a point $x=c$ has three parts:

Test for continuity at x = c (all three must pass)
  1. $f(c)$ exists (the point is defined)
  2. $\displaystyle\lim_{x\to c}f(x)$ exists (the left and right limits agree)
  3. $\displaystyle\lim_{x\to c}f(x)=f(c)$ (the function is heading to the same place it actually is)

On a closed interval $[a,b]$: $f$ has to be continuous at every interior point $c$, plus be one-sided continuous at the two ends:

$$\lim_{x\to a^+}f(x)=f(a)\ \text{(left end)},\qquad \lim_{x\to b^-}f(x)=f(b)\ \text{(right end)}$$
Click a point and run the 3-part test
Test at:
● filled dot = the actual value of f   ○ open dot = a hole (the curve heads there, but that point isn't part of the graph)
Rules for continuity If $f$ and $g$ are continuous at $x=c$, then so are $f\pm g$, $f\cdot g$, $k\cdot f$, $f/g$ (provided $g(c)\ne0$), and $(f(x))^{m/n}$ (wherever it's defined).
Every polynomial and every rational function is continuous at every point where it's defined. The same goes for $\ln x$ on $(0,\infty)$ and for $\sin$ and $\cos$ everywhere.
Recipe: making a piecewise function continuous at the joint (Q2) At the joint $x=c$, three numbers have to be equal: the limit of the left piece, the limit of the right piece, and $f(c)$. Write that as an equation in the unknowns and solve it.
How to teach it"Continuity is a 3-question checklist. Is there a point? Do both sides head to the same height? Is the point sitting at that height? Use the demo: x = 1 fails test (ii) because there's a jump, x = 2 fails test (iii) because the dot isn't where the curve is going, and x = 3 passes all three even though it has a sharp corner."
Section 6

Intermediate Value Theorem (IVT)

Theorem If $f$ is continuous on $[a,b]$ and $N$ is any number between $f(a)$ and $f(b)$, then there is at least one $c\in(a,b)$ with $f(c)=N$.

Root version (the one Q4 uses): if $f$ is continuous on $[a,b]$ and $f(a)$ and $f(b)$ have opposite signs, then $f(c)=0$ for some $c\in(a,b)$.

Why continuity is required: a function with a jump can skip straight over $N$. Look at the jump at $x=1$ in the §5 demo: the graph never takes the value 2 near there. Also note that IVT only tells you a root exists. It doesn't tell you where. Bisection (in the demo) is one way to locate it.

f(x) = x³ − 3x − 19 on [1, 5] (the Q4 function)
How to teach it"You start below the line $y=N$ and end up above it. If you can't lift the pencil, you have to cross the line somewhere along the way. That's the whole theorem."
Section 7

Differentiability & derivative rules

Derivative (first principle) $$f'(x)=\frac{d f}{dx}=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$$ This is the slope of the secant line through $(x,f(x))$ and $(x+h,f(x+h))$. As $h\to0$, the secant becomes the tangent.
  • $f$ is differentiable on an open interval if it has a derivative at every point of the interval.
  • $f$ is differentiable on a closed interval $[a,b]$ if, in addition, the one-sided derivatives exist at the endpoints $a$ and $b$.
Test for differentiability at x = c (i) $f$ is continuous at $c$, and (ii) LHD = RHD, where $$\text{LHD}=\lim_{h\to0^-}\frac{f(c+h)-f(c)}{h},\qquad \text{RHD}=\lim_{h\to0^+}\frac{f(c+h)-f(c)}{h}$$ Differentiable ⇒ continuous. The reverse is false: $|x|$ is continuous at 0 but not differentiable there.

Example 1 (notes): $f(x)=\sqrt x$ by first principle

  1. $f'(x)=\displaystyle\lim_{h\to0}\frac{\sqrt{x+h}-\sqrt x}{h}$ gives $\tfrac00$ at $h=0$.
  2. Multiply by the conjugate: $\displaystyle\frac{\sqrt{x+h}-\sqrt x}{h}\cdot\frac{\sqrt{x+h}+\sqrt x}{\sqrt{x+h}+\sqrt x}=\frac{(x+h)-x}{h(\sqrt{x+h}+\sqrt x)}=\frac{1}{\sqrt{x+h}+\sqrt x}$
  3. Now substitute $h=0$: $f'(x)=\dfrac{1}{2\sqrt x}$ (for $x>0$).

Example 2 (notes): $f(x)=|x|$ at $x=0$

$$\text{RHD}=\lim_{h\to0^+}\frac{|h|-0}{h}=\frac hh=1,\qquad \text{LHD}=\lim_{h\to0^-}\frac{|h|-0}{h}=\frac{-h}{h}=-1$$

LHD ≠ RHD, so $|x|$ is not differentiable at 0. The graph has a sharp corner there, so no single tangent line fits.

Left and right secants as h → 0 (try "zoom in")
left secant (slope → LHD) right secant (slope → RHD)

Rules (u = u(x), v = v(x))

$$\frac{d}{dx}(x^n)=n\,x^{n-1}\qquad \frac{d}{dx}(c\,u)=c\,\frac{du}{dx}\qquad \frac{d}{dx}(u\pm v)=\frac{du}{dx}\pm\frac{dv}{dx}$$ $$\frac{d}{dx}(u\,v)=u\frac{dv}{dx}+v\frac{du}{dx}\qquad \frac{d}{dx}\Big(\frac uv\Big)=\frac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}$$ $$\frac{d}{dx}\big[f(x)\big]^n=n\,\big[f(x)\big]^{n-1}\cdot f'(x)\quad\text{(chain rule: don't forget }f'(x)\text{)}$$

Product rule: proof from first principle (notes Q1)

  1. $\dfrac{d}{dx}(uv)=\displaystyle\lim_{h\to0}\frac{u(x+h)v(x+h)-u(x)v(x)}{h}$
  2. Add and subtract $u(x+h)\,v(x)$ in the numerator. This adds zero, but it lets you factor: $$=\lim_{h\to0}\frac{u(x+h)\,[v(x+h)-v(x)]+v(x)\,[u(x+h)-u(x)]}{h}$$
  3. Split the limit: $\displaystyle\lim u(x+h)\cdot\frac{v(x+h)-v(x)}{h}+\lim v(x)\cdot\frac{u(x+h)-u(x)}{h}$
  4. As $h\to0$: $u(x+h)\to u(x)$ (because $u$ is differentiable, hence continuous), and the two fractions become $\frac{dv}{dx}$ and $\frac{du}{dx}$. So $\dfrac{d}{dx}(uv)=u\dfrac{dv}{dx}+v\dfrac{du}{dx}$ ∎
Product rule as area: the change in a u × v rectangle

Quotient rule: the homework proof

  1. $\dfrac{d}{dx}\Big(\dfrac uv\Big)=\displaystyle\lim_{h\to0}\frac1h\left[\frac{u(x+h)}{v(x+h)}-\frac{u(x)}{v(x)}\right]=\lim_{h\to0}\frac{u(x+h)v(x)-u(x)v(x+h)}{h\,v(x+h)\,v(x)}$
  2. Add and subtract $u(x)v(x)$ in the numerator: $$u(x+h)v(x)-u(x)v(x)\;-\;u(x)v(x+h)+u(x)v(x)=v(x)\,[u(x+h)-u(x)]-u(x)\,[v(x+h)-v(x)]$$
  3. Divide by $h$ and let $h\to0$: the numerator becomes $v\frac{du}{dx}-u\frac{dv}{dx}$, and the denominator $v(x+h)v(x)\to v^2$. $$\frac{d}{dx}\Big(\frac uv\Big)=\frac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}\quad(v\ne0)\ \ ∎$$

Higher-order, total and partial derivatives

  • 1st order: $\frac{df}{dx}$. 2nd order: $f''(x)=\frac{d}{dx}\big(\frac{df}{dx}\big)$. nth order: $\frac{d^nf}{dx^n}$ means differentiate $n$ times. For example, if $f=x^3$, then $f'=3x^2$, $f''=6x$, $f'''=6$.
  • Total derivative: when $f$ depends on one variable, $f'(x)=\frac{df(x)}{dx}$.
  • Partial derivative: when $f$ depends on several variables, like $f(x,y)$, $\frac{\partial f}{\partial x}$ differentiates in $x$ while treating $y$ as a constant. For example, with $f=x^2y+3y$: $\frac{\partial f}{\partial x}=2xy$ and $\frac{\partial f}{\partial y}=x^2+3$.
How to teach it"The derivative is the slope you get by zooming in. Smooth curves look like straight lines when you zoom far enough. A corner stays a corner however far you zoom, so the slope coming from the left and the slope coming from the right never agree. Tick 'zoom in' in the demo to show this."
Section 8

Antiderivatives & the indefinite integral

Definition If $F'(x)=f(x)$, then $F$ is an antiderivative of $f$ (and $f$ is the derivative of $F$).
Any two antiderivatives of the same $f$ differ only by a constant. The collection of all of them is the indefinite integral: $$\int f(x)\,dx=F(x)+C$$

From the notes: $\int 2x\,dx=x^2+C$, because $\frac{d}{dx}(x^2+5)=2x$ and $\frac{d}{dx}(x^2+8)=2x$. The constant disappears when you differentiate, so you can't tell which one you started from, and you write $+C$.

The family x² + C: same slope at the same x
Rules $$\int k\,f(x)\,dx=k\int f(x)\,dx\qquad \int(u\pm v)\,dx=\int u\,dx\pm\int v\,dx$$ $$\int x^n dx=\frac{x^{n+1}}{n+1}+C\ \ (n\ne-1)\qquad \int\sin x\,dx=-\cos x+C\qquad\int\cos x\,dx=\sin x+C$$
Trap$\displaystyle\int u\cdot v\,dx\ \neq\ \int u\,dx\cdot\int v\,dx$. The notes leave $\int(u\cdot v)\,dx$ blank on purpose. There's no simple product rule for integrals. That's what "integration by parts" handles, and it comes later.
Bridge for Q6: substitution is the chain rule run backwards The chain rule says $\frac{d}{dx}F(g(x))=F'(g(x))\cdot g'(x)$. Reading it backwards: $$\int f\big(g(x)\big)\,g'(x)\,dx=F\big(g(x)\big)+C$$ Recipe: (1) find an "inside" expression $u=g(x)$ whose derivative also appears in the integrand, (2) write $du=g'(x)\,dx$, (3) integrate in $u$, (4) substitute $u=g(x)$ back.
Quick example: $\int 3x^2(x^3+1)^4\,dx$. Let $u=x^3+1$, so $du=3x^2dx$. The integral becomes $\int u^4du=\frac{u^5}5+C=\frac{(x^3+1)^5}{5}+C$.
How to teach it"Integrating means undoing a derivative. Differentiating throws away the constant, so the undo has to put back every possible constant. That's what $+C$ means: a whole stack of identical curves shifted up and down."
Section 9

The definite integral

$\displaystyle\int_a^b f(x)\,dx$ is the integral over a closed interval $[a,b]$. It equals the (signed) area under the curve. Area above the x-axis counts as +, and area below counts as −.

Riemann sum Cut $[a,b]$ into $n$ strips of width $\Delta x_k$, pick a point $c_k$ in each strip, and add up the rectangles: $$\text{Area}\approx\sum_{k=1}^{n}f(c_k)\,\Delta x_k \qquad\text{and}\qquad \lim_{\|P\|\to0}\ \sum_{k=1}^{n}f(c_k)\,\Delta x_k=\int_a^b f(x)\,dx$$ $\|P\|$ is the width of the widest strip. The definite integral exists only if this limit exists. If it doesn't, all you have is a sum.
Riemann sum → integral
How to actually compute one: Fundamental Theorem of Calculus If $F$ is any antiderivative of $f$ (which connects §8 to §9): $$\int_a^b f(x)\,dx=\Big[F(x)\Big]_a^b=F(b)-F(a)$$ The $+C$ cancels out, so you can drop it. The notes' average-value example (§10) and Q7 both use this.
Properties (from the notes)
  1. $\int_a^b f(x)\,dx=\int_a^b f(t)\,dt$. The letter used for the variable doesn't matter (it's a "dummy variable").
  2. $\int_a^b f(x)\,dx=-\int_b^a f(x)\,dx$. Swapping the limits flips the sign.
  3. $\int_a^b f(x)\,dx=\int_a^c f(x)\,dx+\int_c^b f(x)\,dx$. You can split the range at any point. This is how piecewise functions are integrated.
  4. $\int_{-a}^{a} f(x)\,dx=2\int_0^a f(x)\,dx$ if $f$ is even (the two halves are equal).
  5. $\int_{-a}^{a} f(x)\,dx=0$ if $f$ is odd (the two halves cancel). The shading demo in §3 shows both.
How to teach it"Area is hard to measure, but rectangles are easy, so fill the region with thin rectangles and add them up. Make the rectangles thinner and the total gets closer to the true area. The integral is the value it's closing in on. Drag n in the demo to show it."
Section 10

Mean value theorem for definite integrals

Theorem If $f$ is continuous on $[a,b]$, then there is some $c\in[a,b]$ with $$\int_a^b f(x)\,dx=(b-a)\,f(c)\qquad\Longleftrightarrow\qquad f(c)=\frac{1}{b-a}\int_a^b f(x)\,dx=\text{average value of } f$$ In picture form, there's a rectangle of width $(b-a)$ and height $f(c)$ with exactly the same area as the region under the curve.

The worked example from the notes

$f(x)=\begin{cases}x+4,&-4\le x\le-1\\-x+2,&-1<x\le2\end{cases}$ on $[-4,2]$. Find the average value.

  1. $f(c)=\dfrac{1}{2-(-4)}\left[\displaystyle\int_{-4}^{-1}(x+4)\,dx+\int_{-1}^{2}(-x+2)\,dx\right]$ (splitting at the joint uses property 3)
  2. $\displaystyle\int_{-4}^{-1}(x+4)dx=\Big[\tfrac{x^2}{2}+4x\Big]_{-4}^{-1}=\big(\tfrac12-4\big)-\big(8-16\big)=-3.5+8=4.5$
  3. $\displaystyle\int_{-1}^{2}(-x+2)dx=\Big[-\tfrac{x^2}{2}+2x\Big]_{-1}^{2}=\big(-2+4\big)-\big(-\tfrac12-2\big)=2+2.5=4.5$
  4. $f(c)=\dfrac{1}{6}(4.5+4.5)=\dfrac96=\dfrac32$ average value = 3/2
  5. Bonus: where does $f(c)=\tfrac32$? $x+4=1.5\Rightarrow c=-2.5$, and $-x+2=1.5\Rightarrow c=0.5$. There are two such points, both inside $[-4,2]$.
Slide the rectangle height until the areas match
How to teach it"Picture the area under the curve as water, then let it settle into a flat layer over the same base. The height of that flat layer is the average value."
Section 11 · start of Linear Algebra

Systems of linear equations

The example from the notes:

$$2x-y=1\ \ \text{(1)}\qquad x+y=5\ \ \text{(2)}$$
  1. From (2): $y=5-x$.
  2. Substitute into (1): $2x-(5-x)=1\Rightarrow 3x-5=1\Rightarrow x=2$.
  3. $y=5-2=3$. (x, y) = (2, 3)

Geometric picture 1: the row picture

Each row (each equation) is a line. The solution is the point where the lines intersect. There are only three possibilities: one point (unique solution), parallel lines (no solution), or the same line twice (infinitely many solutions).

Row picture: edit the equations
x + y = x + y =

Geometric picture 2: the column picture

Read the same system by columns. You're asking which combination of the column vectors produces the right-hand side:

$$x\begin{bmatrix}2\\1\end{bmatrix}+y\begin{bmatrix}-1\\1\end{bmatrix}=\begin{bmatrix}1\\5\end{bmatrix}$$
Column picture: scale the two vectors so they reach the target ★

The 3 × 3 system in the notes

$$2x-y+z=1\quad(1)\qquad x+y+z=2\quad(2)\qquad 4x+6y+9z=10\quad(3)$$

In the row picture, each equation is a plane in 3-D, and the solution is the point where all three planes meet. The notes don't solve this one, so here's the elimination:

  1. (1) − (2): $x-2y=-1\Rightarrow x=2y-1$
  2. Put that into (2): $(2y-1)+y+z=2\Rightarrow z=3-3y$
  3. Put both into (3): $4(2y-1)+6y+9(3-3y)=10\Rightarrow -13y+23=10\Rightarrow y=1$
  4. $x=1,\ z=0$. (1, 1, 0) Check: $2-1+0=1$ ✓, $1+1+0=2$ ✓, $4+6+0=10$ ✓

In matrix form this is $A\mathbf x=\mathbf b$, with $A=\begin{bmatrix}2&-1&1\\1&1&1\\4&6&9\end{bmatrix}$, which is where the Linear Algebra unit starts.

How to teach it"There are two ways to see the same system. Row picture: where do the lines cross? Column picture: how much of each arrow do I need to reach the target? Both give $x=2,\ y=3$."
ES659 · Assignment 1 · 35 marks · due Wed 14 Oct 2026, in class

All 7 questions, solved

Try each question first. Open the hint only if you're stuck, then compare your work with the full write-up. The write-ups are laid out the way you'd write them in the answer sheet.

Q1. Find the domain of $(f\circ g)(x)$, where $f(x)=\dfrac{5}{x-1}$ and $g(x)=\dfrac{4}{3x-2}$.

[5]
§2 two checkpoints
Hint
Check both machines. Where does $g$ break? Where does $f$ break? Then ask which $x$ makes $g(x)$ land exactly on the input that breaks $f$.
Full write-up
  1. Checkpoint 1, $x\in D(g)$: $3x-2\ne0\Rightarrow x\ne\tfrac23$.
  2. Checkpoint 2, $g(x)\in D(f)$: $D(f)=\mathbb R\setminus\{1\}$, so we need $g(x)\ne1$: $\dfrac{4}{3x-2}\ne1\Rightarrow 3x-2\ne4\Rightarrow x\ne2$.
  3. Formula: $(f\circ g)(x)=\dfrac{5}{\frac{4}{3x-2}-1}=\dfrac{5(3x-2)}{4-(3x-2)}=\dfrac{5(3x-2)}{6-3x}$
  4. Domain: $\{x\in\mathbb R: x\ne\tfrac23,\ x\ne2\}=(-\infty,\tfrac23)\cup(\tfrac23,2)\cup(2,\infty)$ ℝ ∖ {2/3, 2}
Why this question is a trapThe simplified formula $\frac{5(3x-2)}{6-3x}$ gives $0$ at $x=\tfrac23$, which looks fine. But the composite isn't defined there, because $g(\tfrac23)$ never existed. Read the domain off the original composition. Try $x=2/3$ and $x=2$ in the machine below.
Q1 machine
(fractions like 2/3 are fine)

Q2. $f(x)=\begin{cases}\ln x,&0<x<1\\ ax^2+b,&x\ge1\end{cases}$. If $f(2)=3$, find $a,b$ so that $f$ is continuous at $x=1$.

[5]
§5 3-part test + joint recipe
Hint
You have two unknowns, so you need two equations. One comes from $f(2)=3$ (which piece applies at $x=2$?). The other comes from continuity at the joint: left limit = $f(1)$.
Full write-up
  1. From $f(2)=3$: since $2\ge1$, use the second piece: $a(2)^2+b=3\Rightarrow 4a+b=3$ …(i)
  2. Continuity at $x=1$:
    • $f(1)=a(1)^2+b=a+b$ (because $x=1$ belongs to the "$x\ge1$" piece) → $f(1)$ exists ✓
    • LHL $=\displaystyle\lim_{x\to1^-}\ln x=\ln1=0$
    • RHL $=\displaystyle\lim_{x\to1^+}(ax^2+b)=a+b$
    For continuity: LHL = RHL = $f(1)$ ⟹ $a+b=0$ …(ii)
  3. Solve: (i) − (ii): $3a=3\Rightarrow a=1$, then $b=-1$. a = 1, b = −1
  4. Check: $f(2)=4-1=3$ ✓. $f(1)=0=\lim_{x\to1^-}\ln x$ ✓.

Q3. Find $\displaystyle\lim_{x\to\infty}\Big(\sqrt{x^2+x+1}-\sqrt{x^2+1}\Big)$.

[5]
§4 conjugate + limits at ∞
Hint
This is an $\infty-\infty$ form. Multiply by the conjugate over itself, simplify the top, then divide the top and bottom by $x$.
Full write-up
  1. The form is $\infty-\infty$ (indeterminate), so multiply and divide by the conjugate: $$L=\lim_{x\to\infty}\frac{\big(\sqrt{x^2+x+1}-\sqrt{x^2+1}\big)\big(\sqrt{x^2+x+1}+\sqrt{x^2+1}\big)}{\sqrt{x^2+x+1}+\sqrt{x^2+1}}$$
  2. Top: $(x^2+x+1)-(x^2+1)=x$, so $\displaystyle L=\lim_{x\to\infty}\frac{x}{\sqrt{x^2+x+1}+\sqrt{x^2+1}}$
  3. Divide the top and bottom by $x$ (for $x>0$, $x=\sqrt{x^2}$, so it can move inside the roots): $$L=\lim_{x\to\infty}\frac{1}{\sqrt{1+\frac1x+\frac1{x^2}}+\sqrt{1+\frac1{x^2}}}$$
  4. As $x\to\infty$, $\frac1x,\frac1{x^2}\to0$: $L=\dfrac{1}{\sqrt1+\sqrt1}=\dfrac12$ 1/2

Q4. Use the IVT to verify whether $f(x)=x^3-3x-19$ has a zero in $[1,5]$.

[5]
§6 the demo uses this exact function
Hint
IVT has two conditions: (1) continuous on $[1,5]$? (2) Do $f(1)$ and $f(5)$ have opposite signs?
Full write-up
  1. Continuity: $f$ is a polynomial, so it's continuous on all of $\mathbb R$, and in particular on $[1,5]$.
  2. Endpoints: $f(1)=1-3-19=-21<0$ and $f(5)=125-15-19=91>0$.
  3. $N=0$ lies between $f(1)=-21$ and $f(5)=91$.
  4. By the IVT, there exists $c\in(1,5)$ with $f(c)=0$. So yes, f has a zero in [1, 5]
  5. (Optional, for extra credit) Narrowing it down: $f(3)=-1<0$ and $f(4)=33>0$, so the root is in $(3,4)$. Bisection gives $c\approx3.04$. Because $f'(x)=3x^2-3>0$ on $(1,5]$, $f$ is increasing there, so this root is the only one.

Q5. Is $f(x)=\begin{cases}x,&x<1\\2-x,&1\le x\le2\\-2+3x-x^2,&x>2\end{cases}$ differentiable at $x=1$ and $x=2$?

[5]
§7 test: continuous + LHD = RHD The §7 demo has both points as presets.
Hint
At each joint, first check continuity (left limit = right limit = value). Then compute LHD and RHD with $\frac{f(c+h)-f(c)}{h}$, using the left piece for $h<0$ and the right piece for $h>0$.
Full write-up

At $x=1$: $f(1)=2-1=1$.

  1. Continuity: $\lim_{x\to1^-}x=1$ and $\lim_{x\to1^+}(2-x)=1$, both equal to $f(1)=1$, so $f$ is continuous ✓
  2. LHD $=\displaystyle\lim_{h\to0^-}\frac{f(1+h)-f(1)}{h}=\lim\frac{(1+h)-1}{h}=\frac hh=1$
  3. RHD $=\displaystyle\lim_{h\to0^+}\frac{\big(2-(1+h)\big)-1}{h}=\lim\frac{-h}{h}=-1$
  4. LHD $=1\ne-1=$ RHD ⟹ not differentiable at x = 1 (it's a corner)

At $x=2$: $f(2)=2-2=0$.

  1. Continuity: $\lim_{x\to2^-}(2-x)=0$ and $\lim_{x\to2^+}(-2+3x-x^2)=-2+6-4=0$, both equal to $f(2)=0$ ✓
  2. LHD $=\displaystyle\lim_{h\to0^-}\frac{\big(2-(2+h)\big)-0}{h}=\frac{-h}{h}=-1$
  3. RHD $=\displaystyle\lim_{h\to0^+}\frac{-2+3(2+h)-(2+h)^2-0}{h}=\lim\frac{-2+6+3h-4-4h-h^2}{h}=\lim\frac{-h-h^2}{h}=\lim(-1-h)=-1$
  4. LHD $=$ RHD $=-1$ ⟹ differentiable at x = 2, with f′(2) = −1

Quick check with the derivative rules: on the left of 1, $f'=1$; between 1 and 2, $f'=-1$; on the right of 2, $f'=3-2x$, which is $-1$ at $x=2$. The slopes match at 2 and don't match at 1.

Q6. Find $\displaystyle\int 2x\sin(x^2+1)\,dx$.

[5]
§8 substitution bridge
Hint
The "inside" expression is $x^2+1$, and its derivative $2x$ is sitting right in front. Let $u=x^2+1$.
Full write-up
  1. Let $u=x^2+1$. Then $\dfrac{du}{dx}=2x\Rightarrow du=2x\,dx$.
  2. $\displaystyle\int 2x\sin(x^2+1)\,dx=\int\sin u\,du$
  3. $=-\cos u+C$
  4. Substitute back: −cos(x² + 1) + C
  5. Check by differentiating: $\frac{d}{dx}\big[-\cos(x^2+1)\big]=\sin(x^2+1)\cdot2x$ ✓ (chain rule)

Q7. Evaluate $\displaystyle\int_0^1\big(4x-6\sqrt[3]{x^2}\big)\,dx$.

[5]
§9 power rule + FTC
Hint
Rewrite $\sqrt[3]{x^2}=x^{2/3}$, apply the power rule to each term, then compute $F(1)-F(0)$. Don't be alarmed if the answer is negative.
Full write-up
  1. Rewrite: $\sqrt[3]{x^2}=x^{2/3}$, so the integral is $\displaystyle\int_0^1\big(4x-6x^{2/3}\big)dx$.
  2. Antiderivatives: $\int4x\,dx=2x^2$ and $\int6x^{2/3}dx=6\cdot\dfrac{x^{5/3}}{5/3}=\dfrac{18}{5}x^{5/3}$.
  3. $\displaystyle=\Big[2x^2-\tfrac{18}{5}x^{5/3}\Big]_0^1=\Big(2-\tfrac{18}5\Big)-0$
  4. $=\dfrac{10-18}{5}=-\dfrac85$ −8/5 = −1.6

Why it's negative: on $(0,1]$, $4x<6x^{2/3}$ (this is equivalent to $x^{1/3}<1.5$), so the whole curve is below the x-axis and the signed area is negative. You can see it below, or pick "Q7" in the §9 Riemann demo.

For teaching your classmate

A 45-minute lesson plan + quick quiz

TimeDo thisUse
0–5Show the map. "Everything is built on limits: continuity, derivatives and integrals are each a limit of something."map
5–12Domain bars, then the composite machine. Solve Q1 together and let them find the 2/3 trap.§1§2
12–20Limit with a hole, then the 3-part continuity test (click all 4 points). Solve Q2.§4§5
20–24IVT slider and bisection. Solve Q4 (this takes 2 minutes once IVT makes sense).§6
24–32Secant demo: |x| corner with zoom on. Then the Q5 presets. Product rule as area.§7
32–40The +C family, then Riemann n-slider, then FTC. Solve Q6 and Q7. Do Q3 last.§8§9
40–45Average value (the "water levelling" picture), then the row and column pictures.§10§11
Teaching method that worksBefore you move any slider, ask them to predict what will happen ("will the left and right slopes meet?"). Checking a wrong prediction teaches more than watching you do it. Then have them explain the idea back to you in one sentence.

Quick quiz (answers hidden)

Read before you copy from the notes

Corrections to the handwritten notes

  • "F(x) is derivative of f(x)" has it backwards. $F$ is the antiderivative, and $f$ is the derivative of $F$: $F'(x)=f(x)$.
  • Even function: one page writes $\int_{-a}^a f\,dx=\int_0^a f\,dx$. It should be $2\int_0^a f\,dx$ (another page has it right).
  • Odd function: one page writes $=\int_{-a}^0 f\,dx$ as the result. The correct result is $\int_{-a}^a f\,dx=0$.
  • $|x|$ at 0: on one page the LHD reads like $+1$. It is $-1$ ($\frac{-h}{h}$). That difference is exactly why $|x|$ is not differentiable at 0.
  • Power-of-a-function rule: written as "$n\frac{d}{dx}f(x)^{n-1}$". The correct form is $\frac{d}{dx}[f(x)]^n=n[f(x)]^{n-1}\cdot f'(x)$.
  • $3g$ row of the domain table: $3g=3\sqrt{1-x}$, so its domain is $(-\infty,1]$, the same as $g$.
  • Product-rule proof, first line on one page: "$u(x+\Delta x)-v(x-\Delta x)$" is a slip. The rest of that proof (add and subtract $u(x+h)v(x)$) is correct. Ignore the crossed-out attempt on the other page.
  • $\int(u\cdot v)\,dx$ is left blank, which is fine. It is not $\int u\cdot\int v$ (see the §8 trap).