U Substitution
Nathan Kamgang
My salary is twice yours. If your salary is x. Where is a number. Mine is 2 times x. Let’s called mine y. y = two times x.
x and y are called variable. They allow us to captures relationships without needing exact numbers. We can graph relationship using the cartesian plane:
Plot of that relationship in hugo.
What if I introduced a new variable called u. u = x . so I can write the function y = x as y = u. Here is the new graph.
It’s the same graph but u. I subtituted the one variable for another. If my salary increase by from 1000 to 2000. Let delta x denotes this change in salary. y = 2000 when x is equal to 1000 and will go to 4000 when there is a delta change of 1000. The relatshion is preserved. But what about u. How will u changes when delta is 1000. remember that u = x so. so a delta increase corresponds to an increase of delta in you.
It should make sense if we are the same amount u = x. If you have always have the same same salary with your collegue. Then adding 100 to your salary will mean adding 100 to theirs.
Now consider another function. y = 1/x^2 It’s another relationship. u = x^2. This is just another relationship where you take your salary multiply it by your salary. Then do 1/ that multiplication to get the salary of y. A more complex relation but a mathematically valid one nonetheless. Let’s now compare the graph of 1/x^2 and 1/u.
(Diagram showing how over an interval they don’t line up)
now what does a change delta in x corresponds in terms of u. x= sqrt u algebraically. so a small change in x is even smaller in u. That’s why those 2 function aren’t the same. a 4 increase in your x correspond only to a 2 increase in y. What if you want to find the area under those curve. show the diagram of those area You have to acount for the fact you need x time x to have one u. If you one the area from 0 to 4 in origal. you have to take the area from 0 to 16 to compensate for what how that subtitution transformed your function. That’s why you change the bound when finding the area udner the curve
Understanding Variable Substitution: From Salary Relationships to Integration
Introduction: A Simple Relationship
Let’s start with a concrete example. Imagine my salary is twice yours. If your salary is $x$ dollars, then mine is $y = 2x$ dollars. Here, $x$ and $y$ are variables - they allow us to capture relationships without needing exact numbers.
We can visualize this relationship on the Cartesian plane:
<svg width="400" height="300" viewBox="0 0 400 300">
<!-- Grid -->
<defs>
<pattern id="grid" width="40" height="30" patternUnits="userSpaceOnUse">
<path d="M 40 0 L 0 0 0 30" fill="none" stroke="#e0e0e0" stroke-width="1"/>
</pattern>
</defs>
<rect width="100%" height="100%" fill="url(#grid)" />
<!-- Axes -->
<line x1="40" y1="260" x2="360" y2="260" stroke="#333" stroke-width="2"/>
<line x1="40" y1="260" x2="40" y2="20" stroke="#333" stroke-width="2"/>
<!-- Labels -->
<text x="360" y="275" text-anchor="middle" font-family="Arial" font-size="14">x</text>
<text x="25" y="25" text-anchor="middle" font-family="Arial" font-size="14">y</text>
<!-- Scale -->
<text x="80" y="275" text-anchor="middle" font-family="Arial" font-size="12">1</text>
<text x="120" y="275" text-anchor="middle" font-family="Arial" font-size="12">2</text>
<text x="160" y="275" text-anchor="middle" font-family="Arial" font-size="12">3</text>
<text x="200" y="275" text-anchor="middle" font-family="Arial" font-size="12">4</text>
<text x="25" y="230" text-anchor="middle" font-family="Arial" font-size="12">2</text>
<text x="25" y="200" text-anchor="middle" font-family="Arial" font-size="12">4</text>
<text x="25" y="170" text-anchor="middle" font-family="Arial" font-size="12">6</text>
<text x="25" y="140" text-anchor="middle" font-family="Arial" font-size="12">8</text>
<!-- Line y = 2x -->
<line x1="40" y1="260" x2="200" y2="140" stroke="#3498db" stroke-width="3"/>
<!-- Points -->
<circle cx="80" cy="230" r="4" fill="#3498db"/>
<circle cx="120" cy="200" r="4" fill="#3498db"/>
<circle cx="160" cy="170" r="4" fill="#3498db"/>
<circle cx="200" cy="140" r="4" fill="#3498db"/>
<!-- Equation -->
<text x="250" y="100" font-family="Arial" font-size="16" fill="#3498db">y = 2x</text>
</svg>
The graph shows $y = 2x$ - a straight line through the origin with slope 2.
Variable Substitution: Same Relationship, Different Names
Now, let’s introduce a new variable $u$ where $u = x$. I can rewrite the function $y = 2x$ as $y = 2u$. The graph looks identical - I simply renamed the horizontal axis!
Understanding Changes Through Variables
If your salary increases from $1000 to $2000, let $\Delta x$ denote this change: $$\Delta x = 2000 - 1000 = 1000$$
When $x = 1000$, we have $y = 2(1000) = 2000$
When $x = 2000$, we have $y = 2(2000) = 4000$
Since $u = x$, when $x$ changes by $\Delta x = 1000$, then $u$ also changes by $\Delta u = 1000$.
This makes sense: if you and your colleague always earn the same ($u = x$), then a $100 raise for you means a $100 raise for them too.
A Simpler Complex Relationship
Now let’s consider something more interesting but still manageable: $y = x^2$ (your salary squared).
Let’s define $u = 2x$. This means $x = \frac{u}{2}$, so we can write: $y = \left(\frac{u}{2}\right)^2 = \frac{u^2}{4}$
Graph of $y = x^2$
<svg width="300" height="250" viewBox="0 0 300 250">
<!-- Grid -->
<defs>
<pattern id="grid2" width="30" height="25" patternUnits="userSpaceOnUse">
<path d="M 30 0 L 0 0 0 25" fill="none" stroke="#f0f0f0" stroke-width="1"/>
</pattern>
</defs>
<rect width="100%" height="100%" fill="url(#grid2)" />
<!-- Axes -->
<line x1="40" y1="210" x2="260" y2="210" stroke="#333" stroke-width="2"/>
<line x1="40" y1="210" x2="40" y2="20" stroke="#333" stroke-width="2"/>
<!-- Labels -->
<text x="260" y="225" text-anchor="middle" font-family="Arial" font-size="14">x</text>
<text x="25" y="25" text-anchor="middle" font-family="Arial" font-size="14">y</text>
<!-- Parabola y = x^2 -->
<path d="M 40 210 Q 70 185 100 110 T 160 35" fill="none" stroke="#e74c3c" stroke-width="3"/>
<!-- Points -->
<circle cx="70" cy="185" r="3" fill="#e74c3c"/>
<circle cx="100" cy="110" r="3" fill="#e74c3c"/>
<circle cx="130" cy="85" r="3" fill="#e74c3c"/>
<circle cx="160" cy="35" r="3" fill="#e74c3c"/>
<!-- Scale -->
<text x="70" y="225" font-size="10">1</text>
<text x="100" y="225" font-size="10">2</text>
<text x="130" y="225" font-size="10">3</text>
<text x="160" y="225" font-size="10">4</text>
<text x="180" y="60" font-family="Arial" font-size="14" fill="#e74c3c">y = x²</text>
</svg>
Graph of $y = \frac{u^2}{4}$
<svg width="300" height="250" viewBox="0 0 300 250">
<!-- Grid -->
<rect width="100%" height="100%" fill="url(#grid2)" />
<!-- Axes -->
<line x1="40" y1="210" x2="260" y2="210" stroke="#333" stroke-width="2"/>
<line x1="40" y1="210" x2="40" y2="20" stroke="#333" stroke-width="2"/>
<!-- Labels -->
<text x="260" y="225" text-anchor="middle" font-family="Arial" font-size="14">u</text>
<text x="25" y="25" text-anchor="middle" font-family="Arial" font-size="14">y</text>
<!-- Parabola y = u^2/4 (stretched horizontally) -->
<path d="M 40 210 Q 100 185 160 110 T 240 35" fill="none" stroke="#9b59b6" stroke-width="3"/>
<!-- Points -->
<circle cx="70" cy="195" r="3" fill="#9b59b6"/>
<circle cx="130" cy="160" r="3" fill="#9b59b6"/>
<circle cx="190" cy="85" r="3" fill="#9b59b6"/>
<circle cx="250" cy="35" r="3" fill="#9b59b6"/>
<!-- Scale -->
<text x="70" y="225" font-size="10">2</text>
<text x="130" y="225" font-size="10">4</text>
<text x="190" y="225" font-size="10">6</text>
<text x="250" y="225" font-size="10">8</text>
<text x="150" y="60" font-family="Arial" font-size="14" fill="#9b59b6">y = u²/4</text>
</svg>
Notice how the second curve is “stretched out” horizontally! This happens because $u = 2x$, so the same $y$-values occur at larger $u$-values.
The Key Insight: How Changes Scale
Here’s the crucial difference: when $u = 2x$, a change $\Delta x$ in $x$ corresponds to $\Delta u = 2\Delta x$ in $u$.
If your salary increases by $\Delta x = 1000$:
- In terms of $x$: you go from $x$ to $x + 1000$
- In terms of $u$: you go from $u = 2x$ to $u = 2(x + 1000) = 2x + 2000$
So $\Delta u = 2000$ when $\Delta x = 1000$. Changes in $u$ are twice as large as changes in $x$.
Integration: Area Under the Curve
When we find the area under $y = x^2$ from $x = 1$ to $x = 3$:
<svg width="400" height="300" viewBox="0 0 400 300">
<!-- Grid -->
<rect width="100%" height="100%" fill="url(#grid2)" />
<!-- Axes -->
<line x1="50" y1="250" x2="350" y2="250" stroke="#333" stroke-width="2"/>
<line x1="50" y1="250" x2="50" y2="30" stroke="#333" stroke-width="2"/>
<!-- Shaded area under curve -->
<path d="M 100 225 Q 125 180 150 100 Q 175 50 200 25 L 200 250 L 100 250 Z" fill="#3498db" fill-opacity="0.3"/>
<!-- Curve -->
<path d="M 50 250 Q 75 230 100 225 Q 125 180 150 100 Q 175 50 200 25 Q 225 15 250 10"
fill="none" stroke="#e74c3c" stroke-width="3"/>
<!-- Vertical lines at bounds -->
<line x1="100" y1="250" x2="100" y2="225" stroke="#333" stroke-width="2" stroke-dasharray="5,5"/>
<line x1="200" y1="250" x2="200" y2="25" stroke="#333" stroke-width="2" stroke-dasharray="5,5"/>
<!-- Labels -->
<text x="350" y="265" text-anchor="middle" font-family="Arial" font-size="14">x</text>
<text x="35" y="35" text-anchor="middle" font-family="Arial" font-size="14">y</text>
<text x="100" y="265" text-anchor="middle" font-family="Arial" font-size="12">1</text>
<text x="200" y="265" text-anchor="middle" font-family="Arial" font-size="12">3</text>
<text x="280" y="80" font-family="Arial" font-size="16" fill="#e74c3c">y = x²</text>
<text x="150" y="150" font-family="Arial" font-size="14" fill="#3498db">Area</text>
</svg>
$$\text{Area} = \int_1^3 x^2 , dx = \left[\frac{x^3}{3}\right]_1^3 = \frac{27}{3} - \frac{1}{3} = \frac{26}{3}$$
Substitution: Changing the Bounds
But what if we use the substitution $u = 2x$? Then $x = \frac{u}{2}$ and $dx = \frac{du}{2}$.
The bounds must change:
- When $x = 1$: $u = 2(1) = 2$
- When $x = 3$: $u = 2(3) = 6$
The integral becomes: $$\int_2^6 \left(\frac{u}{2}\right)^2 \cdot \frac{du}{2} = \int_2^6 \frac{u^2}{4} \cdot \frac{du}{2} = \int_2^6 \frac{u^2}{8} , du$$
$$= \left[\frac{u^3}{24}\right]_2^6 = \frac{216}{24} - \frac{8}{24} = \frac{208}{24} = \frac{26}{3}$$
Same answer! But notice how the bounds changed from $[1,3]$ to $[2,6]$.
Why This Matters
The key insight: when you substitute $u = 2x$, you’re stretching the $x$-axis by a factor of 2.
- The interval $[1,3]$ (length 2) becomes $[2,6]$ (length 4)
- But the function values get compressed by the same factor
- The area remains the same because $\frac{du}{2}$ exactly compensates for the stretching
This is the heart of substitution in integration: you must transform both the function AND the bounds to account for how the new variable relates to the old one.
Summary
Variable substitution teaches us that:
- Simple substitutions like $u = x$ don’t change anything
- Scaling substitutions like $u = 2x$ stretch or compress the graph
- Integration bounds must transform according to the substitution rule
- The differential changes too: $dx = \frac{du}{2}$ when $u = 2x$
Understanding these relationships helps you see why substitution works and how mathematical transformations preserve the essential properties (like areas) while changing the coordinate system.
title: “Variables, Substitution, and Change of Variables (with diagrams)” date: 2025-08-12
Variables and simple substitutions
When we write “your salary is $x$” and “my salary is twice yours”, we use variables to describe relationships without specific numbers. If your salary is $x$ and mine is $y$, then
$$ y = 2x. $$
We can plot this on the Cartesian plane: it’s a straight line through the origin with slope $2$.
% TikZ for y = 2x (copy into a LaTeX file that loads tikz and pgfplots)
\begin{tikzpicture}
\begin{axis}[axis lines=middle, xlabel={$x$}, ylabel={$y$}, xmin=0, xmax=5, ymin=0, ymax=10, width=8cm]
\addplot[domain=0:5, samples=2] {2*x};
\node at (axis cs:1,2.2) {$y=2x$};
% Example points
\addplot[only marks] coordinates {(1,2) (2,4)};
\end{axis}
\end{tikzpicture}
If we introduce a new variable $u$ defined by $u=x$, then every expression in $x$ can be written using $u$ instead. The graph does not change — it’s just a different name for the horizontal axis:
$y=2x\quad\Longleftrightarrow\quad y=2u\ (\text{since }u=x).$
This renaming is purely cosmetic: points, slopes and areas are unchanged.
Small changes (deltas) and how they transform
If $u=g(x)$, a small change in $x$ causes a change in $u$ approximately equal to the derivative:
$$ \Delta u \approx g’(x),\Delta x. $$
Example 1 — linear case: $g(x)=x$. Then $g’(x)=1$, so
$\Delta u\approx 1\cdot\Delta x\Rightarrow\Delta u=\Delta x.$
Example 2 — nonlinear case: $g(x)=x^2$. Then
$\Delta u\approx 2x,\Delta x.$
So whether $\Delta u$ is larger or smaller than $\Delta x$ depends on $x$. Near $x=0$ a small $\Delta x$ gives an even smaller $\Delta u$; for large $x$, the same $\Delta x$ gives a much larger $\Delta u$.
Concrete numbers: if $x$ goes from $1000$ to $2000$, then $\Delta x=1000$ and
- for $u=x$ we get $\Delta u=1000$;
- for $u=x^2$ we get $u(1000)=10^6$ and $u(2000)=4\times10^6$, so $\Delta u=3\times10^6$.
Comparing the graphs: $y=\dfrac{1}{x^2}$ vs. $y=\dfrac{1}{u}$ when $u=x^2$
Take the function
$y=\dfrac{1}{x^2}.$
If we set $u=x^2$, then as a function of $u$ we may write
$$y=\dfrac{1}{u} \quad\text{with } u\ge 0. $$
But be careful: the two plots look different because the horizontal axis has changed. The rule that sends each $x$ to a point $(x,y)$ is not the same picture as the rule that sends each $u$ to $(u,y)$ — the axes are rescaled.
Key point. Although $y(x)=1/x^2$ and $y(u)=1/u$ represent the same numerical relationship when $u=x^2$, the variable substitution stretches and compresses the horizontal axis. That is why the graph of $y$ vs $x$ on $x\in[0,4]$ does not visually match the graph of $y$ vs $u$ on $u\in[0,16]$ even though values correspond via $u=x^2$.
% TikZ sketch: y = 1/x^2 on x-axis and the same curve against u-axis (axes scaled)
\begin{tikzpicture}
\begin{axis}[name=Ax, width=7cm, axis lines=middle, xlabel={$x$}, ylabel={$y$}, xmin=0.2, xmax=4, ymin=0, ymax=6, domain=0.2:4]
\addplot[domain=0.2:4] {1/x^2};
\node at (axis cs:1.2,0.7) {$y=1/x^2$};
\end{axis}
\begin{axis}[at={(6cm,0)}, anchor=west, width=7cm, axis lines=middle, xlabel={$u$}, ylabel={$y$}, xmin=0.5, xmax=16, ymin=0, ymax=6, domain=0.5:16]
\addplot[domain=0.5:16] {1/x}; % here x is used by pgfplots but variable name is different; it's the same 1/u shape
\node at (axis cs:3,0.7) {$y=1/u$};
\end{axis}
\end{tikzpicture}
(If you render the first axis with $x\in[0,4]$ and the second with $u\in[0,16]$, the same numerical heights appear for corresponding points, but the horizontal scaling differs.)
Change of variable in integrals — why bounds change and the Jacobian appears
When you compute area under a curve you integrate with respect to the axis variable. If you change variable, you must transform both the integrand and the differential element.
General formula: if $u=g(x)$ is smooth and strictly monotone on $[a,b]$, then
$$ \int_{x=a}^{x=b} f(x),dx = \int_{u=g(a)}^{u=g(b)} f(g^{-1}(u)),\frac{du}{g’(g^{-1}(u))}. $$
For $u=x^2$ we have $g’(x)=2x$, $x=\sqrt u$, and $dx=\dfrac{du}{2\sqrt u}$. Thus
$$ \int_{x=1}^{x=4} \frac{1}{x^2},dx = \int_{u=1}^{u=16} \frac{1}{u}\cdot\frac{du}{2\sqrt u} = \int_{1}^{16} \frac{du}{2u^{3/2}}. $$
Notice the bounds: $x=1\to4$ becomes $u=1\to16$. If you instead (incorrectly) tried to evaluate the area over $u\in[0,4]$ you’d be integrating the wrong horizontal slice.
Intuition (rectangles): a small horizontal rectangle at $x$ has width $\Delta x$; after substitution its corresponding $u$-width is about $\Delta u\approx 2x\Delta x$. To represent the same little area you must divide by that stretching factor — this is why $dx$ picks up a factor $1/g’(x)$.
Short checklist to include on your Hugo page
-
Use
$...$for inline math and$$...$$for displayed equations (MathJax will render it). -
To show the diagrams on a static Hugo build, either:
- Render the TikZ code to PNG/SVG and include the images; or
- Use pre-made SVG diagrams (included below) and paste them in the markdown.
-
When you explain substitution: show the derivative rule $\Delta u\approx g’(x)\Delta x$ and the integral transformation with the Jacobian.
Inline SVG (simple plots for quick use)
Below are two minimal SVG sketches you can paste into your Hugo markdown (they are simple, not precise plots). Replace or improve them later using a plotting tool.
<!-- SVG: line y=2x -->
<svg width="360" height="200" viewBox="0 0 360 200" xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="white"/>
<line x1="30" y1="170" x2="330" y2="10" stroke="#000" stroke-width="2"/>
<text x="200" y="30">$y=2x$</text>
<!-- axes -->
<line x1="30" y1="170" x2="330" y2="170" stroke="#000"/>
<line x1="30" y1="170" x2="30" y2="10" stroke="#000"/>
</svg>
<!-- SVG: rough 1/x^2 vs 1/u notion (illustrative) -->
<svg width="720" height="200" viewBox="0 0 720 200" xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="white"/>
<!-- left: x in [0.2,4] -->
<g transform="translate(10,0)">
<line x1="30" y1="170" x2="330" y2="170" stroke="#000"/>
<line x1="30" y1="170" x2="30" y2="10" stroke="#000"/>
<text x="150" y="15">$y=1/x^2$ on $x\in[0.2,4]$</text>
<!-- rough curve -->
<path d="M40 170 C 80 120, 120 80, 160 60 C 200 45, 240 35, 280 30" fill="none" stroke="#000"/>
</g>
<!-- right: u in [0.5,16] -->
<g transform="translate(360,0)">
<line x1="30" y1="170" x2="330" y2="170" stroke="#000"/>
<line x1="30" y1="170" x2="30" y2="10" stroke="#000"/>
<text x="150" y="15">$y=1/u$ on $u\in[0.5,16]$</text>
<path d="M40 170 C 120 110, 180 80, 260 40" fill="none" stroke="#000"/>
</g>
</svg>