```html

Real-valued Functions and Algebra of Functions

Understanding Real-valued Functions

In mathematics, a function is a fundamental concept that describes a relationship between two sets. Specifically, a real-valued function is a function whose domain and codomain are subsets of the set of real numbers. This means that for every input (from the domain), the function produces exactly one output (from the codomain), and both the input and the output are real numbers.

Let's break this down:

  • Domain (D): This is the set of all possible input values for which the function is defined. For a real-valued function, the domain is typically a subset of the real numbers ($\mathbb{R}$).
  • Codomain: This is the set of all possible output values the function *could* produce. For a real-valued function, the codomain is also a subset of $\mathbb{R}$.
  • Range: This is the actual set of output values that the function *does* produce. The range is always a subset of the codomain.

We often denote a real-valued function as $f: D \to \mathbb{R}$, where $D \subseteq \mathbb{R}$. For each $x \in D$, $f(x)$ is the unique real number that $f$ assigns to $x$.

Example: Consider the function $f(x) = x^2$.

  • If we define the domain as all real numbers, $D = \mathbb{R}$.
  • The codomain is also $\mathbb{R}$.
  • The output $f(x)$ is always non-negative. So, the range is $[0, \infty)$.

This is a real-valued function because both the inputs (all real numbers) and the outputs (non-negative real numbers) are real numbers.

Determining the Domain of a Real-valued Function

When the domain of a function is not explicitly stated, it is assumed to be the largest possible subset of real numbers for which the function is defined. We need to identify any restrictions that would make the function undefined. Common restrictions include:

  • Division by zero: The denominator of a fraction cannot be zero.
  • Square roots of negative numbers: The expression under a square root must be non-negative.
  • Logarithms of non-positive numbers: The argument of a logarithm must be positive.

Example 1: Find the domain of $g(x) = \frac{1}{x-2}$.

The function is undefined when the denominator is zero. So, $x-2 \neq 0$, which means $x \neq 2$. The domain is all real numbers except 2, which can be written as $\mathbb{R} \setminus \{2\}$ or $(-\infty, 2) \cup (2, \infty)$.

Example 2: Find the domain of $h(x) = \sqrt{x-3}$.

The expression under the square root must be non-negative. So, $x-3 \geq 0$, which means $x \geq 3$. The domain is $[3, \infty)$.

Example 3: Find the domain of $k(x) = \log(x+1)$.

The argument of the logarithm must be positive. So, $x+1 > 0$, which means $x > -1$. The domain is $(-1, \infty)$.

Algebra of Functions

Just like we can perform arithmetic operations on numbers, we can also perform operations on functions. If we have two real-valued functions, $f$ and $g$, with domains $D_f$ and $D_g$ respectively, we can define new functions based on $f$ and $g$. The domain of these new functions is the intersection of the domains of $f$ and $g$, i.e., $D_f \cap D_g$.

1. Sum of Functions ($f+g$)

The sum of two functions $f$ and $g$ is a function $(f+g)$ defined by: $$(f+g)(x) = f(x) + g(x)$$ The domain of $(f+g)$ is $D_f \cap D_g$.

Example: Let $f(x) = x^2$ (Domain $D_f = \mathbb{R}$) and $g(x) = x+1$ (Domain $D_g = \mathbb{R}$). Then $(f+g)(x) = f(x) + g(x) = x^2 + (x+1) = x^2 + x + 1$. The domain of $(f+g)$ is $D_f \cap D_g = \mathbb{R} \cap \mathbb{R} = \mathbb{R}$.

2. Difference of Functions ($f-g$)

The difference of two functions $f$ and $g$ is a function $(f-g)$ defined by: $$(f-g)(x) = f(x) - g(x)$$ The domain of $(f-g)$ is $D_f \cap D_g$.

Example: Using the same $f(x)$ and $g(x)$ as above. Then $(f-g)(x) = f(x) - g(x) = x^2 - (x+1) = x^2 - x - 1$. The domain of $(f-g)$ is $\mathbb{R}$.

3. Product of Functions ($f \cdot g$)

The product of two functions $f$ and $g$ is a function $(f \cdot g)$ defined by: $$(f \cdot g)(x) = f(x) \cdot g(x)$$ The domain of $(f \cdot g)$ is $D_f \cap D_g$.

Example: Using the same $f(x)$ and $g(x)$ as above. Then $(f \cdot g)(x) = f(x) \cdot g(x) = x^2 \cdot (x+1) = x^3 + x^2$. The domain of $(f \cdot g)$ is $\mathbb{R}$.

4. Quotient of Functions ($\frac{f}{g}$)

The quotient of two functions $f$ and $g$ is a function $(\frac{f}{g})$ defined by: $$(\frac{f}{g})(x) = \frac{f(x)}{g(x)}$$ The domain of $(\frac{f}{g})$ is $\{x \in D_f \cap D_g \mid g(x) \neq 0\}$. We must exclude values of $x$ for which the denominator $g(x)$ is zero.

Example: Let $f(x) = x^2$ (Domain $D_f = \mathbb{R}$) and $g(x) = x+1$ (Domain $D_g = \mathbb{R}$). Then $(\frac{f}{g})(x) = \frac{x^2}{x+1}$. The domain requires $x \in D_f \cap D_g$ (which is $\mathbb{R}$) and $g(x) \neq 0$. $g(x) = x+1 \neq 0 \implies x \neq -1$. So, the domain of $(\frac{f}{g})$ is $\mathbb{R} \setminus \{-1\}$, or $(-\infty, -1) \cup (-1, \infty)$.

5. Scalar Multiplication ($c \cdot f$)

If $c$ is a real number (a scalar), the scalar multiple of a function $f$ is a function $(c \cdot f)$ defined by: $$(c \cdot f)(x) = c \cdot f(x)$$ The domain of $(c \cdot f)$ is the same as the domain of $f$, i.e., $D_f$.

Example: Let $f(x) = x^2$ (Domain $D_f = \mathbb{R}$) and $c=5$. Then $(5 \cdot f)(x) = 5 \cdot x^2 = 5x^2$. The domain of $(5 \cdot f)$ is $\mathbb{R}$.

Composition of Functions ($f \circ g$)

One of the most important operations on functions is composition. The composition of two functions $f$ and $g$, denoted by $f \circ g$, is a function that applies $g$ first and then applies $f$ to the result. It is defined as: $$(f \circ g)(x) = f(g(x))$$

Domain of Composition: For $(f \circ g)(x) = f(g(x))$ to be defined, two conditions must be met:

  1. $x$ must be in the domain of $g$ ($x \in D_g$).
  2. $g(x)$ must be in the domain of $f$ ($g(x) \in D_f$).

Therefore, the domain of $f \circ g$ is $\{x \in D_g \mid g(x) \in D_f\}$.

Example 1: Let $f(x) = x^2$ (Domain $D_f = \mathbb{R}$) and $g(x) = x+1$ (Domain $D_g = \mathbb{R}$). $$(f \circ g)(x) = f(g(x)) = f(x+1) = (x+1)^2$$ The domain: $x \in D_g$ (which is $\mathbb{R}$) and $g(x) \in D_f$. Since $g(x) = x+1$ is always a real number, it is always in $D_f = \mathbb{R}$. So, the domain of $f \circ g$ is $\mathbb{R}$.

Example 2: Let $f(x) = \sqrt{x}$ (Domain $D_f = [0, \infty)$) and $g(x) = x-3$ (Domain $D_g = \mathbb{R}$). $$(f \circ g)(x) = f(g(x)) = f(x-3) = \sqrt{x-3}$$ The domain:

  1. $x \in D_g$, which is $\mathbb{R}$.
  2. $g(x) \in D_f$. This means $x-3 \in [0, \infty)$, so $x-3 \geq 0$, which implies $x \geq 3$.
Combining these, the domain of $f \circ g$ is $[3, \infty)$.

Example 3: Let $f(x) = x+1$ (Domain $D_f = \mathbb{R}$) and $g(x) = \sqrt{x}$ (Domain $D_g = [0, \infty)$). $$(f \circ g)(x) = f(g(x)) = f(\sqrt{x}) = \sqrt{x} + 1$$ The domain:

  1. $x \in D_g$, which is $[0, \infty)$.
  2. $g(x) \in D_f$. Since $g(x) = \sqrt{x}$ is always a real number for $x \geq 0$, it is always in $D_f = \mathbb{R}$.
Combining these, the domain of $f \circ g$ is $[0, \infty)$.

Important Note: Composition is not commutative, meaning $f \circ g$ is generally not equal to $g \circ f$.

Example: Using $f(x) = x+1$ and $g(x) = \sqrt{x}$ from Example 3. We found $(f \circ g)(x) = \sqrt{x} + 1$ with domain $[0, \infty)$. Now let's find $(g \circ f)(x)$: $$(g \circ f)(x) = g(f(x)) = g(x+1) = \sqrt{x+1}$$ The domain of $(g \circ f)$:

  1. $x \in D_f$, which is $\mathbb{R}$.
  2. $f(x) \in D_g$. This means $x+1 \in [0, \infty)$, so $x+1 \geq 0$, which implies $x \geq -1$.
The domain of $g \circ f$ is $[-1, \infty)$. Clearly, $(f \circ g)(x) \neq (g \circ f)(x)$ and their domains are also different.

Algebraic Operations on Multiple Functions

The operations of sum, difference, product, and quotient can be extended to more than two functions. For example, for three functions $f, g, h$:

  • $(f+g+h)(x) = f(x) + g(x) + h(x)$
  • $(f \cdot g \cdot h)(x) = f(x) \cdot g(x) \cdot h(x)$

The domain for these operations is the intersection of the domains of all involved functions. For quotients, we must ensure that the denominator function is never zero.

Example: Let $f(x) = x$, $g(x) = x^2$, $h(x) = x^3$. All have domain $\mathbb{R}$. Consider the function $F(x) = \frac{f(x) + g(x)}{h(x)}$. $$F(x) = \frac{x + x^2}{x^3}$$ The domain is $D_f \cap D_g \cap D_h = \mathbb{R}$. Additionally, $h(x) \neq 0$, so $x^3 \neq 0$, which means $x \neq 0$. The domain of $F(x)$ is $\mathbb{R} \setminus \{0\}$. We can simplify $F(x)$ for $x \neq 0$: $$F(x) = \frac{x(1+x)}{x^3} = \frac{1+x}{x^2}$$

Functions as Mappings

It's helpful to visualize functions as mappings. Think of the domain as the starting set and the codomain as the ending set. The function $f$ provides the rule that connects each element in the domain to a unique element in the codomain.

Visual Representation: Imagine two circles representing the domain and codomain. Arrows go from elements in the domain to their corresponding images in the codomain. For $f(x) = x^2$ with domain $\mathbb{R}$:

  • The arrow from $-2$ goes to $4$.
  • The arrow from $2$ goes to $4$.
  • The arrow from $0$ goes to $0$.
  • The arrow from $-3$ goes to $9$.
Notice that different inputs (like $-2$ and $2$) can map to the same output ($4$). However, a single input (like $2$) cannot map to multiple outputs. This is the essence of a function.

Types of Real-valued Functions

Real-valued functions can be categorized based on their properties:

  • Polynomial Functions: $f(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0$, where $a_i$ are real constants and $n$ is a non-negative integer. Domain is $\mathbb{R}$.
  • Rational Functions: $f(x) = \frac{P(x)}{Q(x)}$, where $P(x)$ and $Q(x)$ are polynomial functions. Domain excludes roots of $Q(x)$.
  • Radical Functions: Functions involving roots, like $f(x) = \sqrt[n]{g(x)}$. Domain depends on $n$ and $g(x)$. If $n$ is even, $g(x)$ must be non-negative.
  • Exponential Functions: $f(x) = a^x$, where $a > 0$ and $a \neq 1$. Domain is $\mathbb{R}$.
  • Logarithmic Functions: $f(x) = \log_a x$, where $a > 0$ and $a \neq 1$. Domain is $(0, \infty)$.
  • Trigonometric Functions: $f(x) = \sin x, \cos x, \tan x$, etc. Domains and ranges vary.

Piecewise Functions

A piecewise function is defined by different formulas on different intervals of its domain.

Example: The absolute value function can be written as a piecewise function: $$|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$ Here, the domain is $\mathbb{R}$. For $x \geq 0$, the function behaves like $f(x)=x$. For $x < 0$, it behaves like $f(x)=-x$.

Example 2: $$f(x) = \begin{cases} x^2 & \text{if } x \leq 1 \\ 2x - 1 & \text{if } x > 1 \end{cases}$$ The domain is $\mathbb{R}$. If $x \leq 1$, $f(x) = x^2$. For example, $f(0) = 0^2 = 0$, $f(1) = 1^2 = 1$. If $x > 1$, $f(x) = 2x - 1$. For example, $f(2) = 2(2) - 1 = 3$, $f(3) = 2(3) - 1 = 5$.

Applications of Real-valued Functions and Algebra of Functions

Real-valued functions and their algebraic manipulations are the building blocks of calculus and are used extensively in modeling real-world phenomena.

  • Physics: Describing motion (position, velocity, acceleration as functions of time), forces, energy.
  • Engineering: Analyzing circuits, signal processing, control systems.
  • Economics: Modeling cost, revenue, profit, supply, and demand.
  • Biology: Population growth, drug concentration over time.
  • Computer Science: Algorithm analysis (time and space complexity).

For instance, if a company's cost function is $C(x)$ and its revenue function is $R(x)$, where $x$ is the number of units produced, then the profit function $P(x)$ is given by the difference: $P(x) = R(x) - C(x)$. Understanding the domain of these functions (e.g., $x$ must be non-negative) is crucial for practical interpretation.

Key Takeaway for JEE:
  • Master determining the domain of functions involving fractions, square roots, and logarithms.
  • Practice algebraic operations (sum, difference, product, quotient) and composition of functions. Pay close attention to the domain of the resulting function, especially for quotients and compositions.
  • Understand that $(f \circ g)(x) = f(g(x))$ and its domain requires $x \in D_g$ and $g(x) \in D_f$.
  • Be comfortable with piecewise functions and how to evaluate them.
```