The derivative of a weighted sum

Definition 1

Consider to given function uu and vv, and two constant numbers aa and bb. The new function

f=au+bvf=a\cdot u+b\cdot v

is called a weighted sum (or a linear combination) of uu and vv. The "weights" aa and bb are also called coefficients.

The derivative of weighted sums is as follows:

Theorem 1

Assume a function ff can be written as a weighted sum of two other functions uu and vv, that is, f=au+bvf=a\cdot u +b\cdot v. Then we have

Equation 1
f(x)=au(x)+bv(x)f(x)=au(x)+bv(x)f(x)=a\cdot u(x)+ b\cdot v(x) \overset{\prime}{\rightarrow} f^\prime(x)=a \cdot u^\prime(x)+b\cdot v^\prime(x)

Derivative of a weighted sum of functions

This is called the sum rule. It simply states that for forming ff^\prime, we have to replace uu and vv with their derivatives.

Proof

To prove the theorem, we first recall that for small ss (we normally use hh, but this letter is already used for the function hh), we have

u(x)=limh0u(x+h)u(x)hu(x+h)u(x)hu'(x)=\lim_{h\rightarrow 0} \frac{u(x+h)-u(x)}{h}\approx \frac{u(x+h)-u(x)}{h}v(x)=limh0v(x+h)v(x)hv(x+h)v(x)hv'(x)=\lim_{h\rightarrow 0} \frac{v(x+h)-v(x)}{h} \approx \frac{v(x+h)-v(x)}{h}

and

f(x)=limh0u(x+h)v(x)hf(x+h)f(x)hf(x)=\lim_{h\rightarrow 0} \frac{u(x+h)-v(x)}{h} \approx \frac{f(x+h)-f(x)}{h}

If we replace f(x)f(x) with au(x)+bv(x)a\cdot u(x)+b\cdot v(x) in the expression above, we get

f(x)f(x+h)f(x)h=au(x+h)+bv(x+h)(au(x)+bv(x))h=au(x+h)+bv(x+h)au(x)bv(x))h=au(x+h)au(x)+bv(x+h)bv(x))s=au(x+s)u(x)hbv(x+h)v(x)hau(x)+bv(x)\begin{array}{ll} f'(x) \approx \frac{f(x+h)-f(x)}{h} & = \frac{a\cdot u(x+h)+b\cdot v(x+h)- (a\cdot u(x)+b\cdot v(x))}{h} \\ & = \frac{a\cdot u(x+h)+b\cdot v(x+h)- a\cdot u(x)-b\cdot v(x))}{h}\\ & = \frac{a\cdot u(x+h)-a \cdot u(x) + b\cdot v(x+h)-b\cdot v(x))}{s}\\ & = a\cdot \frac{u(x+s)-u(x)}{h} - b\cdot \frac{v(x+h)-v(x)}{h} \\ & \approx a\cdot u'(x)+ b\cdot v'(x)\end{array}

And this completes the proof!

Example 1

The derivative of

f(x)=3x4+6x2=3ax4u(x)+6bx2v(x)f(x)=3x^4+6x^2 = \underbrace{3}_{a}\cdot \underbrace{x^4}_{u(x)}+\underbrace{6}_{b}\cdot \underbrace{x^2}_{v(x)}

is

f(x)=3a4x3u(x)+62x1v(x)=12x3+12xf'(x)= \underbrace{3}_{a}\cdot \underbrace{4 x^3}_{u'(x)}+\underbrace{6}\cdot \underbrace{2 x^1}_{v'(x)}=12 x^3+12 x
Theorem 2

In particular we have

Equation 2
u(x)+v(x)u(x)+v(x)au(x)au(x)au(x)+bau(x)au(x)+bv(x)+cw(x)au(x)+bv(x)+cw(x)\begin{array}{lll} u(x)+v(x) &\overset{\prime}{\rightarrow}& u^\prime(x)+v^\prime(x)\\ a\cdot u(x) &\overset{\prime}{\rightarrow}& a\cdot u^\prime(x) \\ a\cdot u(x)+ b &\overset{\prime}{\rightarrow}& a \cdot u^\prime(x)\\ a\cdot u(x)+b\cdot v(x)+ c\cdot w(x) &\overset{\prime}{\rightarrow}& a\cdot u'(x)+b\cdot v'(x)+ c\cdot w'(x) \end{array}

The derivative of special weighted sums

Proof
  • f(x)=u(x)+v(x)f(x)=u(x)+v(x)f(x)=u(x)+v(x) \rightarrow f'(x)=u'(x)+v'(x) (set a=b=1a=b=1)
  • f(x)=au(x)f(x)=au(x)f(x)=a\cdot u(x) \rightarrow f'(x)=a\cdot u'(x) (set b=0b=0)
  • f(x)=au(x)+b=au(x)+b1=au(x)+b=au(x)+bx0f(x)=au(x)+b0x1=au(x)f(x)=a\cdot u(x)+b = a\cdot u(x)+b\cdot 1= a\cdot u(x)+b = a\cdot u(x)+b\cdot x^0 \rightarrow f'(x)=a\cdot u'(x)+b\cdot 0\cdot x^{-1}=a\cdot u'(x)
  • f(x)=au(x)+g(x)f(x)=a\cdot u(x)+g(x), where g(x)=bv(x)+cw(x)g(x)=b\cdot v(x)+ c\cdot w(x) \rightarrow f(x)=au(x)+g(x)=au(x)+bv(x)+cw(x)f'(x)=a\cdot u'(x)+g'(x)=a\cdot u'(x)+b\cdot v'(x)+ c\cdot w'(x)
Warning

The same law ist not correct for the multiplication of two functions. That is, if f=uvf=u\cdot v, then in general it is fuvf^\prime \neq u^\prime \cdot v^\prime. See the problem below.

E.g. u(x)=x3u(x)=x^3 and v(x)=x7v(x)=x^7, thus we have

f(x)=u(x)v(x)=x3x7=x10f(x)=10x9f(x)=u(x)\cdot v(x)= x^3\cdot x^7=x^{10} \rightarrow f'(x)=10 x^9

But this is not

u(x)v(x)=3x27x6=21x8u'(x)\cdot v'(x) = 3x^2\cdot 7x^6 = 21x^{8}

So how can we determine the derivative if two functions are multiplied? There is a specific rule for this case, which we will learn about later. However, for the product of power functions it is straight forward. See the example below.

Example 2

Determine the derivative of the function f(x)=x2xf(x)=x^2\cdot \sqrt{x}

Solution

f(x)=x2x=x2x1/2=x2.5f(x)=2.5x1.5f(x)=x^2\cdot\sqrt{x}=x^2\cdot x^{1/2}=x^{2.5} \rightarrow f'(x)=2.5 x^{1.5}

Again, to find h(x)h'(x) we cannot simply multiply the derivative of x2x^2 with the derivative of x\sqrt{x}. A common mistake!