Week 14 β The Substitution Rule (\(u\)-Sub) & Limit Transformation
Engineering Focus: Axisymmetric Laminar &
Turbulent Pipe Flow Rate (\(Q = \int_0^R 2\pi
r\,u(r)\,dr\)), Gaussian Laser Heating Power (\(\int_0^R 2\pi r q_0 e^{-cr^2}\,dr\)) &
Elastomeric Energy Absorption Companion Dataset:
Week14_Laser_Gaussian_Heat_Flux_and_Pipe_Velocity_Data.csv
1. βCalculus Made Easyβ Intuition: Running the Gear-Train Chain Rule Backwards
Remember Week 07βs Chain Rule? Whenever we differentiated a wrapped composite function \(F(g(x))\), an extra factor \(g'(x)\) always popped out alongside it: \[\frac{d}{dx}\left[F(g(x))\right] = F'(g(x)) \cdot \mathbf{g'(x)}\] So when you stare at a frightening-looking integral like \(\int 2\pi r\,q_0 e^{-cr^2}\,dr\) or \(\int \frac{kx}{\sqrt{ax^2+b}}\,dx\), look for an inner piece \(u = g(x)\) whose derivative \(du = g'(x)\,dx\) is sitting right outside waiting for you!
The Clean 4-Step Engineering \(u\)-Sub Recipe (And Always Convert the Bounds!)
Never switch back and forth in definite integrals! Change everythingβthe variable, the differential \(dx\), AND both endpoints \([a, b]\)βinto \(u\)-world:
Pick \(u = g(x)\) (usually the messy stuff inside a root, denominator, exponent, or trig function).
Compute its differential: \(du = g'(x)\,dx\) (treat \(du\) and \(dx\) as clean algebra little-bits!).
Transform definite limits immediately: \[\text{Lower: } x = a \implies u_1 = g(a), \qquad \text{Upper: } x = b \implies u_2 = g(b)\]
Integrate completely in \(u\)-world and subtract \(F(u_2) - F(u_1)\) directly! You never even have to substitute \(x\) back in!
2. Complete Mathematical Derivations & Reference Guide
2.1 Axisymmetric Polar Ring Integration (\(dA = 2\pi r\,dr\))
In cylindrical pipes, heat transfer, and optics, quantities vary radially with \(r\) from centerline (\(r=0\)) to wall (\(r=R\)). Slice the disk into concentric onion rings of radius \(r\) and tiny thickness \(dr\):
- Ring area: \(dA = (\text{circumference})\times(\text{thickness}) = \mathbf{2\pi r\,dr}\).
- Notice that \(r\,dr\) is already proportional to \(d(r^2) = 2r\,dr\)! That is why \(u = r^2\) (or \(u = -c r^2\)) solves almost every circular engineering flux and pipe-flow integral cleanly on the first try!
| Pattern Observed Inside \(\int\) | Best Choice for \(u\) | Differential Match \(du\) | Engineering Example |
|---|---|---|---|
| \(\int f(ax+b)\,dx\) | \(u = ax + b\) | \(dx = \frac{1}{a}du\) | Delayed/shifted wave signals |
| \(\int 2\pi r\,e^{-cr^2}\,dr\) | \(u = -c r^2\) | \(r\,dr = -\frac{1}{2c}du\) | Gaussian laser heat flux power |
| \(\int \frac{k x}{\sqrt{a x^2 + b}}\,dx\) | \(u = ax^2 + b\) | \(x\,dx = \frac{1}{2a}du\) | Nonlinear damper energy absorption |
| \(\int \sin^n(x)\cos(x)\,dx\) | \(u = \sin x\) | \(du = \cos x\,dx\) | AC RMS power integrals |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sympy as sp
from pathlib import Path
plt.rcParams.update({
"figure.dpi": 150,
"font.size": 10,
"axes.grid": True,
"grid.alpha": 0.30,
"axes.spines.top": False,
"axes.spines.right": False,
})
def load_week_csv(filename):
for p in [Path("datasets") / filename, Path("../datasets") / filename]:
if p.exists():
return pd.read_csv(p)
raise FileNotFoundError(f"Dataset not found: {filename}")3. Gaussian Laser Heat Flux & Pipe Flow Rate Integration Analysis
We read
Week14_Laser_Gaussian_Heat_Flux_and_Pipe_Velocity_Data.csv,
checking cumulative absorbed laser power \(Q(R) = \int_0^R 2\pi r\,q_0 e^{-cr^2}\,dr =
\frac{\pi q_0}{c}(1 - e^{-cR^2})\) and circular pipe volumetric
flow rate \(Q_{\text{pipe}} = \int_0^R 2\pi
r\,u(r)\,dr\) against the CSV measurements!
df = load_week_csv("Week14_Laser_Gaussian_Heat_Flux_and_Pipe_Velocity_Data.csv")
print("Week 14 Laser Flux & Pipe Velocity Data (first 6 rows):")
print(df.head(6).to_string(index=False))
r_m = df["Radius_r_mm"].values / 1000.0
q_Wm2 = df["Laser_Heat_Flux_W_m2"].values
ring_laser_W_m = 2.0 * np.pi * r_m * q_Wm2
P_laser_trapz = np.trapz(ring_laser_W_m, r_m)
# Analytical u-sub check for q0 = 2.5e6 W/m^2, c = 8000 m^-2, R = 0.020 m
q0_val, c_val, R_val = 2.5e6, 8000.0, 0.020
P_laser_exact = (np.pi * q0_val / c_val) * (1.0 - np.exp(-c_val * R_val**2))
u_pipe = df["Pipe_Velocity_m_s"].values
Q_pipe_L_s = np.trapz(2.0 * np.pi * r_m * u_pipe, r_m) * 1000.0
print(f"\n[u-Sub Laser Power] Numerical Ring Sum = {P_laser_trapz:.2f} W vs Exact Formula = {P_laser_exact:.2f} W")
print(f"[Pipe Flow Rate] Volumetric Flow Q = {Q_pipe_L_s:.3f} L/s")
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(11.8, 4.3))
ax1.plot(r_m * 1e3, ring_laser_W_m / 1e3, "o-", color="#0284c7", lw=2.0, label="Ring Density $2\\pi r q_0 e^{-cr^2}$ [kW/m]")
ax1.fill_between(r_m * 1e3, 0, ring_laser_W_m / 1e3, color="#0284c7", alpha=0.22, label=f"Total Power = {P_laser_exact:.1f} W")
ax1.set_title("Gaussian Laser Power Ring Integrand ($u = -cr^2$)")
ax1.set_xlabel("Radius $r$ [mm]")
ax1.set_ylabel("Ring Power Density [kW/m]")
ax1.legend(fontsize=8.2)
ax2.plot(df["Radius_r_mm"], df["Pipe_Velocity_m_s"], "s-", color="#059669", lw=2.0, label="Measured Pipe Profile $u(r)$")
ax2.fill_between(df["Radius_r_mm"], 0, df["Pipe_Velocity_m_s"], color="#059669", alpha=0.20, label=f"Flow Rate $Q = {Q_pipe_L_s:.2f}$ L/s")
ax2.set_title("Pipe Velocity Profile $u(r)$ (Integrated via Ring $2\\pi r\\,dr$)")
ax2.set_xlabel("Radial Distance $r$ [mm]")
ax2.set_ylabel("Axial Velocity $u(r)$ [m/s]")
ax2.legend(fontsize=8.3)
plt.tight_layout()
plt.show()# Verified Output:
Week 14 Laser Flux & Pipe Velocity Data (first 6 rows):
Radius_r_mm Laser_Heat_Flux_W_m2 Pipe_Velocity_m_s
0.0 2500000.0 2.400
1.0 2480079.8 2.394
2.0 2421266.5 2.376
3.0 2326327.2 2.346
4.0 2199633.4 2.304
5.0 2046826.9 2.250
[u-Sub Laser Power] Numerical Ring Sum = 940.13 W vs Exact Formula = 941.73 W
[Pipe Flow Rate] Volumetric Flow Q = 1.504 L/s
4. Three Unabridged Worked Engineering Problems
Worked Example 1 β Absorbed Gaussian Laser Power via Exact Limit-Transformed \(u\)-Sub
Problem: A CO\(_2\) cutting laser deposits axisymmetric heat flux \(q''(r) = q_0 e^{-cr^2}\) on a metal plate (\(q_0 = 2.5\times 10^6\text{ W/m}^2\), \(c = 8000\text{ m}^{-2}\)) up to disk radius \(R = 0.020\text{ m}\) (\(20\text{ mm}\)). Use \(u\)-substitution with full limit transformation to compute total power \(Q = \int_0^R 2\pi r\,q_0 e^{-cr^2}\,dr\).
Unabridged Hand Solution:
Choose \(u = -c r^2 \implies du = -2c r\,dr \implies 2\pi r\,dr = -\frac{\pi}{c}\,du\).
Convert definite limits cleanly into \(u\)-world:
- Lower limit \(r = 0 \implies u_1 = 0\).
- Upper limit \(r = R \implies u_2 = -c R^2 = -8000(0.020)^2 = -3.20\).
Integrate completely in \(u\): \[Q = \int_0^{-c R^2} q_0 e^u \left(-\frac{\pi}{c}\,du\right) = \frac{\pi q_0}{c}\int_{-c R^2}^0 e^u\,du = \frac{\pi q_0}{c}\left[1 - e^{-c R^2}\right]\]
Plug in numbers: \[Q = \frac{\pi(2.5\times 10^6)}{8000}\left(1 - e^{-3.20}\right) = 981.75\,(1 - 0.04076) = \mathbf{941.73\text{ W}}\]
Worked Example 2 β Elastomeric Isolator Pad Energy Storage (\(\int_0^{0.04} \frac{k x}{\sqrt{a x^2 + b}}\,dx\))
Problem: A bridge seismic isolation pad has force-displacement law \(F(x) = \frac{1200\,x}{\sqrt{100x^2 + 0.09}}\ [\text{N}]\) for \(x \in [0, 0.04\text{ m}]\). Compute strain energy \(U = \int_0^{0.04} F(x)\,dx\) via \(u\)-substitution!
Unabridged Hand Solution:
- Let \(u = 100x^2 + 0.09 \implies du = 200x\,dx \implies x\,dx = \frac{du}{200}\).
- Convert limits: \(x=0 \implies u_1 = 0.09\); \(x=0.04 \implies u_2 = 100(0.0016) + 0.09 = 0.25\).
- Integrate \(1200 \cdot \frac{1}{200}\int_{0.09}^{0.25} u^{-1/2}\,du = 6\left[2\sqrt{u}\right]_{0.09}^{0.25} = 12(\sqrt{0.25} - \sqrt{0.09}) = 12(0.5 - 0.3) = \mathbf{2.40\text{ J}}\)!
Worked Example 3 β Laminar HagenβPoiseuille Pipe Volumetric Flow Rate
Problem: Fully developed laminar pipe flow has parabolic velocity profile \(u(r) = U_{\max}\left(1 - \frac{r^2}{R^2}\right)\). Integrate \(Q = \int_0^R 2\pi r\,u(r)\,dr\) via \(u_{\text{sub}} = 1 - r^2/R^2\) to prove why average velocity is strictly half of centerline peak speed (\(U_{\text{avg}} = \frac{1}{2}U_{\max}\))!
Unabridged Hand Solution:
- Set \(w = 1 - r^2/R^2 \implies dw = -\frac{2r}{R^2}\,dr \implies 2\pi r\,dr = -\pi R^2\,dw\).
- Limits transform: \(r=0 \implies w=1\); \(r=R \implies w=0\).
- Integrate (flipping limits removes the minus sign!): \[Q = \pi R^2 U_{\max}\int_0^1 w\,dw = \pi R^2 U_{\max}\left[\frac{w^2}{2}\right]_0^1 = \frac{1}{2} U_{\max} (\pi R^2) \implies U_{\text{avg}} = \frac{Q}{\pi R^2} = \mathbf{\frac{1}{2} U_{\max}}\]
r_s, x_s = sp.symbols("r x", real=True, positive=True)
Q_las_ex = float(sp.integrate(2*sp.pi*r_s*2.5e6*sp.exp(-8000*r_s**2), (r_s, 0, 0.020)).evalf())
U_iso_ex = float(sp.integrate(1200*x_s/sp.sqrt(100*x_s**2 + sp.Rational(9, 100)), (x_s, 0, sp.Rational(4, 100))).evalf())
R_s, Umax_s = sp.symbols("R U_max", positive=True)
Q_pipe_ex = sp.integrate(2*sp.pi*r_s*Umax_s*(1 - r_s**2/R_s**2), (r_s, 0, R_s))
print(f"[Example 1] Exact SymPy Laser Power = {Q_las_ex:.2f} W")
print(f"[Example 2] Exact Elastomer Energy = {U_iso_ex:.2f} J")
print("[Example 3] Laminar Flow Rate Q =", Q_pipe_ex, "(so U_avg = Q/(pi*R^2) = 1/2 U_max)")# Verified Output:
[Example 1] Exact SymPy Laser Power = 941.73 W
[Example 2] Exact Elastomer Energy = 2.40 J
[Example 3] Laminar Flow Rate Q = pi*R**2*U_max/2 (so U_avg = Q/(pi*R^2) = 1/2 U_max)
5. Engineering Practice Problems (Self-Study Exercises)
Practice Problem 1 β Rational Logarithm Bridge (\(\int \frac{2x}{x^2+9}\,dx\))
Evaluate \(\int_0^4 \frac{2x}{x^2 + 9}\,dx\) using \(u\)-substitution with full limit conversion!
π Click to View Complete Step-by-Step Solution
- Let \(u = x^2 + 9 \implies du = 2x\,dx\) (exact match in numerator!).
- Limits: \(x=0 \implies u=9\); \(x=4 \implies u=25\).
- Integrate: \(\int_9^{25} \frac{du}{u} = \ln(25) - \ln(9) = \mathbf{\ln\!\left(\frac{25}{9}\right) \approx 1.0217}\).
Practice Problem 2 β Alternating Half-Cycle Rectified Power (\(\int \cos^3\theta\sin\theta\,d\theta\))
Evaluate \(\int_0^{\pi/2} \cos^3\theta\sin\theta\,d\theta\).
π Click to View Complete Step-by-Step Solution
- Let \(u = \cos\theta \implies du = -\sin\theta\,d\theta\).
- Limits: \(\theta=0 \implies u=1\); \(\theta=\pi/2 \implies u=0\).
- \(\int_1^0 u^3(-du) = \int_0^1 u^3\,du = \left[\frac{u^4}{4}\right]_0^1 = \mathbf{\frac{1}{4} = 0.25}\).
Practice Problem 3 β Shifted Thermal Relaxation Integral
Evaluate \(\int_1^5 \frac{dt}{(2t - 1)^2}\) via \(u = 2t - 1\).
π Click to View Complete Step-by-Step Solution
- \(du = 2\,dt \implies dt = \frac{1}{2}du\). Limits: \(t=1 \implies u=1\); \(t=5 \implies u=9\).
- \(\frac{1}{2}\int_1^9 u^{-2}\,du = \frac{1}{2}\left[-\frac{1}{u}\right]_1^9 = \frac{1}{2}\left(1 - \frac{1}{9}\right) = \mathbf{\frac{4}{9} \approx 0.4444}\).
Practice Problem 4 β Exponential Surge Integral With Chain Factor
Compute \(\int_0^{\ln 2} e^{2t}\sqrt{e^{2t} + 3}\,dt\).
π Click to View Complete Step-by-Step Solution
- Pick \(u = e^{2t} + 3 \implies du = 2e^{2t}\,dt \implies e^{2t}\,dt = \frac{1}{2}du\).
- Limits: \(t=0 \implies u = 1 + 3 = 4\); \(t=\ln 2 \implies u = e^{2\ln 2} + 3 = 4 + 3 = 7\).
- \(\frac{1}{2}\int_4^7 u^{1/2}\,du = \frac{1}{2}\cdot\frac{2}{3}\left[u^{3/2}\right]_4^7 = \mathbf{\frac{1}{3}(7\sqrt{7} - 8) \approx 3.5068}\).
References
- Thompson, S. P. (1914). Calculus Made Easy (Ch. 19: Integrating by Substitution). Macmillan.