Unit 4: Calculus
Calculus is the mathematical study of continuous change. It provides the foundation for determining rates of change and finding optimal solutions.
1. Functions
A function is a relationship or rule that links an input variable to an output variable such that each input has exactly one output. If $y = f(x)$, $x$ is the independent variable and $y$ is the dependent variable.
Domain and Range
- Domain: The set of all possible input values ($x$) for which the function is defined.
- Range: The set of all possible resulting output values ($y$) of the dependent variable.
- Co-domain: The set from which the dependent variable takes its values. Range is a subset of the co-domain.
Types of Functions
- Constant Function: $f(x) = c$
- Identity Function: $f(x) = x$
- Polynomial Function: $f(x) = a_n x^n + \dots + a_1 x + a_0$
- Rational Function: $f(x) = \frac{p(x)}{q(x)}$, where $q(x) \neq 0$
- Exponential Function: $f(x) = a^x$ where $a > 0, a \neq 1$
- Logarithmic Function: $f(x) = \log_a x$
- Modulus Function: $f(x) = |x|$
Fig 4.1: Example of a Parabolic / Polynomial Function Graph
2. Limits and Continuity
Limit of a Function
The limit of a function $f(x)$ as $x$ approaches $a$ is the value that $f(x)$ approaches as $x \to a$. $$ \lim_{x \to a} f(x) = L $$ For a limit to exist, the Left Hand Limit (LHL) must equal the Right Hand Limit (RHL): $$ \lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = L $$
Continuity
A function $f(x)$ is continuous at $x = a$ if:
- $f(a)$ is defined.
- The limit exists at $a$.
- The limit equals the function’s value: $$ \lim_{x \to a} f(x) = f(a) $$
3. Instantaneous Rate of Change
The rate of change measures how one variable changes relative to another. The instantaneous rate of change is the rate at a specific analytical instant, given by the ratio: $$ \lim_{\Delta x \to 0} \frac{f(x + \Delta x) - f(x)}{\Delta x} $$ This fundamental concept leads to differentiation.
4. Differentiation
Differentiation is the process of finding the derivative. We study non-trigonometric derivatives.
Common Derivatives
- Power Rule: $\frac{d}{dx} (x^n) = n x^{n-1}$
- Exponential: $\frac{d}{dx} (e^x) = e^x$
- Logarithmic: $\frac{d}{dx} (\ln x) = \frac{1}{x}$
- Constant: $\frac{d}{dx} (c) = 0$
Rules of Differentiation
Let $u$ and $v$ be functions of $x$:
- Sum Rule: $\frac{d}{dx} (u + v) = \frac{du}{dx} + \frac{dv}{dx}$
- Product Rule: $\frac{d}{dx} (uv) = u \frac{dv}{dx} + v \frac{du}{dx}$
- Quotient Rule: $\frac{d}{dx} \left(\frac{u}{v}\right) = \frac{v \frac{du}{dx} - u \frac{dv}{dx}}{v^2}$
Chain Rule
Used for differentiating composite functions. If $y = f(u)$ and $u = g(x)$, then: $$ \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} $$
Example: Find the derivative of $y = (x^2 + 3)^4$. Using Chain Rule, let $u = x^2 + 3$, so $y = u^4$. $\frac{dy}{du} = 4u^3$ and $\frac{du}{dx} = 2x$. $$ \frac{dy}{dx} = 4(x^2 + 3)^3 \cdot 2x = 8x(x^2 + 3)^3 $$
Competency-Based Questions
-
(Domain/Range Application): A software algorithm logs system temperature $T$ (in Celsius) as a function of processing load $x$ (in Gigahertz) modeled by $T(x) = \frac{100}{x-3}$. What is the practical domain of this function, assuming processing load cannot be negative but must avoid critical failure at $x=3$?
-
(Limits & Continuity): In analyzing network latency limits, a server’s response time $R(t)$ follows the rule $R(t) = \frac{t^2 - 4}{t - 2}$ when $t \neq 2$, and $R(2) = k$. What must be the value of $k$ for the response time function to be continuous at $t = 2$ milliseconds?
-
(Differentiation in Economics): A tech company models its profit function $P(x)$ based on the sale of thousands of units of newly embedded systems as $P(x) = 50x - 2x^2$ (in millions of rupees). Using differentiation, find the instantaneous rate of change of profit when exactly 10,000 units are sold ($x = 10$).
-
(Chain Rule Usage): In machine learning, a loss function $L$ needs optimization. If $L = \ln(3x^2 + 2x + 1)$, find $\frac{dL}{dx}$ which represents the algorithmic gradient.
-
(Rate of Change): A bacterial population $B$ in a laboratory experiment increases according to the equation $B(t) = 500 e^{0.02t}$, where $t$ is time in hours. Find the instantaneous rate of growth of the population at the 50th hour.
Answers to Competency-Based Questions
1. Domain/Range Application: The function is $T(x) = \frac{100}{x-3}$. Since the processing load cannot be negative, $x \ge 0$. Since critical failure happens at $x = 3$, $x \neq 3$. Thus, the practical domain is all non-negative real numbers excluding $3$: $$ x \in [0, 3) \cup (3, \infty) $$
2. Limits & Continuity: For $R(t)$ to be continuous at $t = 2$, the limit as $t \to 2$ must equal $R(2)$. $$ \lim_{t \to 2} \frac{t^2 - 4}{t - 2} = \lim_{t \to 2} \frac{(t-2)(t+2)}{t-2} = \lim_{t \to 2} (t+2) = 2 + 2 = 4 $$ Therefore, the value of $k$ must be $4$ milliseconds.
3. Differentiation in Economics: The profit function is $P(x) = 50x - 2x^2$. The instantaneous rate of change is the derivative $P’(x)$: $$ P’(x) = \frac{d}{dx}(50x - 2x^2) = 50 - 4x $$ At $x = 10$ (representing 10,000 units): $$ P’(10) = 50 - 4(10) = 50 - 40 = 10 $$ The profit is increasing at an instantaneous rate of $10$ million rupees per thousand units sold.
4. Chain Rule Usage: Let $L(x) = \ln(3x^2 + 2x + 1)$. Using the Chain Rule where $u = 3x^2 + 2x + 1$ and $L = \ln u$: $$ \frac{dL}{dx} = \frac{dL}{du} \cdot \frac{du}{dx} = \frac{1}{u} \cdot \frac{d}{dx}(3x^2 + 2x + 1) $$ $$ \frac{dL}{dx} = \frac{1}{3x^2 + 2x + 1} \cdot (6x + 2) = \frac{6x + 2}{3x^2 + 2x + 1} $$
5. Rate of Change: The population function is $B(t) = 500 e^{0.02t}$. The instantaneous rate of growth is the derivative $B’(t)$: $$ B’(t) = 500 \cdot (0.02) \cdot e^{0.02t} = 10 e^{0.02t} $$ At the 50th hour ($t = 50$): $$ B’(50) = 10 e^{0.02(50)} = 10 e^1 = 10e $$ Using $e \approx 2.718$, the growth rate is approximately $27.18$ bacteria per hour.