Math Lab
Home/Class XI/Ch 2/Algebra of real functions

Algebra of real functions

Real-valued functions can be added, subtracted, multiplied and divided , point by point , exactly like real numbers. This algebra of functions turns the set of real functions into something that almost behaves like the real number line, with one wrinkle: domains can shrink when you combine functions.

Definitions

Let f,gf, g be real-valued functions with domains DfD_f and DgD_g respectively, both contained in R\mathbb{R}. For each xx in the common domain DfDgD_f \cap D_g:

  • Sum: (f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x).
  • Difference: (fg)(x)=f(x)g(x)(f - g)(x) = f(x) - g(x).
  • Product: (fg)(x)=f(x)g(x)(fg)(x) = f(x) \cdot g(x).
  • Scalar multiple: (cf)(x)=cf(x)(c f)(x) = c \cdot f(x), for any real cc.

For the quotient fg\dfrac{f}{g}, we additionally require g(x)0g(x) \ne 0: (fg)(x)=f(x)g(x),xDfDg, g(x)0.\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}, \quad x \in D_f \cap D_g,\ g(x) \ne 0.

The domain of any combination is the intersection of the individual domains, minus any points where the operation fails (division by zero).

Why "common domain" matters

If ff is defined only on [0,)[0, \infty) (say f(x)=xf(x) = \sqrt{x}) and gg is defined only on (,1](-\infty, 1] (say g(x)=1xg(x) = \sqrt{1 - x}), then f+gf + g is defined only where both are: on [0,1][0, 1]. Outside [0,1][0, 1], at least one of the two terms is not real, so the sum is meaningless.

This rule, simple as it is, is the single biggest source of careless mistakes in JEE problems. Always intersect domains.

Algebraic laws

For functions f,g,hf, g, h on a common domain DD:

  • Commutative: f+g=g+ff + g = g + f, fg=gffg = gf.
  • Associative: (f+g)+h=f+(g+h)(f + g) + h = f + (g + h), (fg)h=f(gh)(fg)h = f(gh).
  • Distributive: f(g+h)=fg+fhf(g + h) = fg + fh.
  • Zero: the zero function 0(x)=00(x) = 0 satisfies f+0=ff + 0 = f.
  • One: the constant 11 satisfies f1=ff \cdot 1 = f.

These all follow because the operations are defined pointwise and real numbers obey the same laws.

Worked examples

Example 1. Let f(x)=x2+1f(x) = x^2 + 1 and g(x)=2x3g(x) = 2x - 3. Find (f+g)(x),(fg)(x),(fg)(x),(f/g)(x)(f + g)(x), (f - g)(x), (fg)(x), (f/g)(x) and state domains.

Df=Dg=RD_f = D_g = \mathbb{R}.

  • (f+g)(x)=x2+2x2(f + g)(x) = x^2 + 2x - 2, domain R\mathbb{R}.
  • (fg)(x)=x22x+4(f - g)(x) = x^2 - 2x + 4, domain R\mathbb{R}.
  • (fg)(x)=(x2+1)(2x3)=2x33x2+2x3(fg)(x) = (x^2 + 1)(2x - 3) = 2x^3 - 3x^2 + 2x - 3, domain R\mathbb{R}.
  • (f/g)(x)=x2+12x3(f/g)(x) = \dfrac{x^2 + 1}{2x - 3}, domain R{3/2}\mathbb{R} \setminus \{3/2\}.

Example 2. Let f(x)=xf(x) = \sqrt{x} and g(x)=1xg(x) = \sqrt{1 - x}. Find the domain of (f+g)(f + g) and (fg)(fg).

Df=[0,)D_f = [0, \infty), Dg=(,1]D_g = (-\infty, 1]. Common domain DfDg=[0,1]D_f \cap D_g = [0, 1], which is the domain of both f+gf + g and fgfg.

Example 3. Find (fg)(x)(fg)(x) and the domain of f/gf/g, where f(x)=x24f(x) = x^2 - 4 and g(x)=x2g(x) = x - 2.

(fg)(x)=(x24)(x2)=(x2)2(x+2)(fg)(x) = (x^2 - 4)(x - 2) = (x - 2)^2 (x + 2).

(f/g)(x)=x24x2=x+2(f/g)(x) = \dfrac{x^2 - 4}{x - 2} = x + 2 for x2x \ne 2. Even though the simplified expression is x+2x + 2, the quotient's domain is R{2}\mathbb{R} \setminus \{2\}.

Example 4. Let f(x)=x+1,g(x)=2x+3f(x) = x + 1, g(x) = 2x + 3. Find a function hh such that h+f=gh + f = g.

h(x)=g(x)f(x)=2x+3x1=x+2h(x) = g(x) - f(x) = 2x + 3 - x - 1 = x + 2.

Example 5 (harder). Let f(x)=1x1f(x) = \dfrac{1}{x - 1} and g(x)=1x+1g(x) = \dfrac{1}{x + 1}. Find (f+g)(x)(f + g)(x) and state the domain.

Df=R{1}D_f = \mathbb{R} \setminus \{1\}, Dg=R{1}D_g = \mathbb{R} \setminus \{-1\}. Common domain =R{1,1}= \mathbb{R} \setminus \{-1, 1\}.

(f+g)(x)=1x1+1x+1=(x+1)+(x1)(x1)(x+1)=2xx21(f + g)(x) = \dfrac{1}{x - 1} + \dfrac{1}{x + 1} = \dfrac{(x + 1) + (x - 1)}{(x - 1)(x + 1)} = \dfrac{2x}{x^2 - 1}.

The simplified expression 2xx21\dfrac{2x}{x^2 - 1} has domain R{1,1}\mathbb{R} \setminus \{-1, 1\} , matching what we computed.

Try it yourself

  1. If f(x)=x2f(x) = x^2 and g(x)=x+1g(x) = x + 1, find (f+g)(x),(fg)(x),(fg)(x),(f/g)(x)(f + g)(x), (f - g)(x), (fg)(x), (f/g)(x), and state the domains.
  2. If f(x)=x1f(x) = \sqrt{x - 1} and g(x)=4xg(x) = \sqrt{4 - x}, find the domains of f+gf + g and f/gf/g.
  3. If f(x)=x3f(x) = x^3 and g(x)=x2g(x) = x^2, simplify f/gf/g and state its domain.
  4. If f(x)=xf(x) = |x| and g(x)=x2g(x) = x - 2, find (fg)(x)(fg)(x) at x=1,0,1,3x = -1, 0, 1, 3.
  5. Show that if ff is even and gg is even, then f+g,fgf + g, fg are even.
  6. Show that if ff is odd and gg is odd, then fgfg is even.
  7. If f(x)=2x+1f(x) = 2x + 1, find fff \cdot f and f+ff + f. Are they equal? Why not?
  8. Let f(x)=1xf(x) = \dfrac{1}{x}. Find the domain of f+ff + f and of fff \cdot f.
  9. If f(x)=cosxf(x) = \cos x, g(x)=sinxg(x) = \sin x, what familiar function is f2+g2f^2 + g^2?
  10. If f(x)=x2+1f(x) = x^2 + 1, find a function gg such that fg(x)=x41fg(x) = x^4 - 1.
  11. If f(x)=x+2f(x) = x + 2 and (f+g)(x)=3x+1(f + g)(x) = 3x + 1, find g(x)g(x).
  12. Find a function ff with f(x)+f(x)=2x2f(x) + f(-x) = 2x^2 for all xx.

Pitfalls / Tricks

  • After simplifying a quotient, the domain may not extend. x24x2\dfrac{x^2 - 4}{x - 2} simplifies to x+2x + 2, but the domain of the quotient is still R{2}\mathbb{R} \setminus \{2\}. Functions are equal only when their domains are equal.
  • (f/g)(f/g) requires g(x)0g(x) \ne 0 , never forget.
  • Adding two functions does not always give a function on the union of domains. Use the intersection.
  • Insight. The algebra of functions makes the set of real functions a ring (you will meet this word in higher courses). Already in Class XI, recognising that sin2x+cos2x=1\sin^2 x + \cos^2 x = 1 is a statement about functions , not just numbers , is a small but important step.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Algebra of functions
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6