MatheramaMatherama
← Differentiation
Differentiation·Section 10·3 min read

Miscellaneuous

Derivative of ln|x|§

The function ln⁡∣x∣\ln |x| is defined for all x∈R∖{0}x \in \mathbb{R} \setminus \{0\} and can be expressed as:

ln⁡∣x∣={ln⁡x,x>0ln⁡(−x),x<0\ln |x| = \begin{cases} \ln x, & x > 0 \\ \ln(-x), & x < 0 \end{cases}

Differentiating each case separately:

For x>0x > 0, we have

ddx(ln⁡x)=1x\frac{d}{dx} (\ln x) = \frac{1}{x}

For x<0x < 0, we have

ddx(ln⁡(−x))=1−x⋅(−1)=1x\frac{d}{dx} (\ln (-x)) = \frac{1}{-x} \cdot (-1) = \frac{1}{x}

Thus, for all x≠0x \neq 0:

ddx(ln⁡∣x∣)=1x,x∈R∖{0}\frac{d}{dx} (\ln |x|) = \frac{1}{x}, \quad x \in \mathbb{R} \setminus \{0\}

Differentiating Determinants§

Let us consider the determinant of a 2×22 \times 2 matrix whose entries are functions of xx:

D(x)=∣a(x)b(x)c(x)d(x)∣=a(x)d(x)−b(x)c(x).D(x) = \begin{vmatrix} a(x) & b(x) \\ c(x) & d(x) \end{vmatrix} = a(x)d(x) - b(x)c(x).

Differentiating both sides with respect to xx,

D′(x)=a′(x)d(x)+a(x)d′(x)−b′(x)c(x)−b(x)c′(x).D'(x) = a'(x) d(x) + a(x) d'(x) - b'(x) c(x) - b(x) c'(x).

Now, grouping the first and fourth terms together and the second and third terms together:

D′(x)=(a′(x)d(x)−b(x)c′(x))+(a(x)d′(x)−b′(x)c(x)).D'(x) = \left( a'(x) d(x) - b(x) c'(x) \right) + \left( a(x) d'(x) - b'(x) c(x) \right).

Observing each group separately, we recognize them as determinants:

D′(x)=∣a′(x)b(x)c′(x)d(x)∣+∣a(x)b′(x)c(x)d′(x)∣.D'(x) = \begin{vmatrix} a'(x) & b(x) \\ c'(x) & d(x) \end{vmatrix} + \begin{vmatrix} a(x) & b'(x) \\ c(x) & d'(x) \end{vmatrix}.

This shows that the derivative of the determinant can be computed by differentiating column-wise and summing the resulting determinants.


Alternatively, we can group the first and third terms together and the second and fourth terms together:

D′(x)=(a′(x)d(x)−b′(x)c(x))−(a(x)d′(x)−b(x)c′(x)).D'(x) = \left( a'(x) d(x) - b'(x) c(x) \right) - \left( a(x) d'(x) - b(x) c'(x) \right).

Rewriting these as determinants,

D′(x)=∣a′(x)b′(x)c(x)d(x)∣+∣a(x)b(x)c′(x)d′(x)∣.D'(x) = \begin{vmatrix} a'(x) & b'(x) \\ c(x) & d(x) \end{vmatrix} + \begin{vmatrix} a(x) & b(x) \\ c'(x) & d'(x) \end{vmatrix}.

This expresses the derivative as the sum of two determinants obtained by differentiating row-wise.


Thus, we observe the foloowing rule:

  • The derivative of a determinant can be computed by summing determinants obtained by differentiating column-wise.
  • Equivalently, it can be computed by summing determinants obtained by differentiating row-wise.

Extending this to an n×nn \times n determinant, we obtain the general formula:

ddxdet⁡A(x)=∑j=1ndet⁡Aj(x),\frac{d}{dx} \det A(x) = \sum_{j=1}^{n} \det A_j(x),

where Aj(x)A_j(x) is the matrix obtained by differentiating the jjth row while keeping the others unchanged. The same formula holds when differentiating column-wise instead of row-wise.

For example:

Consider the 2×22 \times 2 matrix:

A(x)=[x2exsin⁡xln⁡x].A(x) = \begin{bmatrix} x^2 & e^x \\ \sin x & \ln x \end{bmatrix}.

The determinant of A(x)A(x) is:

D(x)=∣x2exsin⁡xln⁡x∣.D(x) = \begin{vmatrix} x^2 & e^x \\ \sin x & \ln x \end{vmatrix}.

To differentiate D(x)D(x), we first differentiate column-wise:

D′(x)=∣2xexcos⁡xln⁡x∣+∣x2exsin⁡x1x∣.D'(x) = \begin{vmatrix} 2x & e^x \\ \cos x & \ln x \end{vmatrix} + \begin{vmatrix} x^2 & e^x \\ \sin x & \frac{1}{x} \end{vmatrix}.

Now, differentiating row-wise:

D′(x)=∣2xexsin⁡x1x∣+∣x2excos⁡xln⁡x∣.D'(x) = \begin{vmatrix} 2x & e^x \\ \sin x & \frac{1}{x} \end{vmatrix} + \begin{vmatrix} x^2 & e^x \\ \cos x & \ln x \end{vmatrix}.

Both formulations give the same result, verifying the determinant differentiation rule.

Summation of the Series Using Differentiation§

Consider the infinite series

1+2x+3x2+4x3+…,for ∣x∣<1.1 + 2x + 3x^2 + 4x^3 + \dots, \quad \text{for } |x| < 1.

To evaluate its sum, we first examine the related geometric series:

x+x2+x3+x4+… .x + x^2 + x^3 + x^4 + \dots.

Since this is an infinite geometric progression with first term a=xa = x and common ratio r=xr = x, its sum, valid for ∣x∣<1|x| < 1, is given by the standard formula for the sum of an infinite geometric series:

∑n=0∞arn=a1−r,for ∣r∣<1.\sum_{n=0}^{\infty} a r^n = \frac{a}{1 - r}, \quad \text{for } |r| < 1.

Applying this to our series with a=xa = x and r=xr = x:

x+x2+x3+x4+⋯=x1−x,for ∣x∣<1.x + x^2 + x^3 + x^4 + \dots = \frac{x}{1 - x}, \quad \text{for } |x| < 1.

Differentiating both sides with respect to xx:

ddx(x+x2+x3+x4+… )=ddx(x1−x).\frac{d}{dx} \left( x + x^2 + x^3 + x^4 + \dots \right) = \frac{d}{dx} \left( \frac{x}{1-x} \right).

Applying term-by-term differentiation on the left:

1+2x+3x2+4x3+… .1 + 2x + 3x^2 + 4x^3 + \dots.

Using the quotient rule on the right:

ddx(x1−x)=(1−x)(1)−x(−1)(1−x)2=1(1−x)2.\frac{d}{dx} \left( \frac{x}{1-x} \right) = \frac{(1-x)(1) - x(-1)}{(1-x)^2} = \frac{1}{(1-x)^2}.

Thus, the sum of the given series is:

1+2x+3x2+4x3+⋯=1(1−x)2,for ∣x∣<1.1 + 2x + 3x^2 + 4x^3 + \dots = \frac{1}{(1-x)^2}, \quad \text{for } |x| < 1.

Consider another infinite series as example:

12+22x+32x2+42x3+…,for ∣x∣<1.1^2 + 2^2 x + 3^2 x^2 + 4^2 x^3 + \dots, \quad \text{for } |x| < 1.

To evaluate its sum, we begin with the geometric series:

1+x+x2+x3+x4+⋯=11−x,for ∣x∣<1.1 + x + x^2 + x^3 + x^4 + \dots = \frac{1}{1-x}, \quad \text{for } |x| < 1.

Differentiating both sides with respect to xx,

ddx(1+x+x2+x3+x4+… )=ddx(11−x).\frac{d}{dx} \left( 1 + x + x^2 + x^3 + x^4 + \dots \right) = \frac{d}{dx} \left( \frac{1}{1-x} \right).

Using term-by-term differentiation on the left,

0+1+2x+3x2+4x3+… .0 + 1 + 2x + 3x^2 + 4x^3 + \dots.

Applying the derivative to the right-hand side,

1(1−x)2.\frac{1}{(1-x)^2}.

Thus,

1+2x+3x2+4x3+⋯=1(1−x)2,for ∣x∣<1.1 + 2x + 3x^2 + 4x^3 + \dots = \frac{1}{(1-x)^2}, \quad \text{for } |x| < 1.

Multiplying both sides by xx,

x+2x2+3x3+4x4+⋯=x(1−x)2.x + 2x^2 + 3x^3 + 4x^4 + \dots = \frac{x}{(1-x)^2}.

Differentiating again,

ddx(x+2x2+3x3+4x4+… )=ddx(x(1−x)2).\frac{d}{dx} \left( x + 2x^2 + 3x^3 + 4x^4 + \dots \right) = \frac{d}{dx} \left( \frac{x}{(1-x)^2} \right).

Applying term-by-term differentiation on the left,

1+2⋅2x+3⋅3x2+4⋅4x3+… .1 + 2 \cdot 2x + 3 \cdot 3x^2 + 4 \cdot 4x^3 + \dots.

Using the quotient rule on the right,

(1−x)2(1)−x(2(1−x)(−1))(1−x)4.\frac{(1-x)^2 (1) - x (2(1-x)(-1))}{(1-x)^4}.

Simplifying,

(1−x)2+2x(1−x)(1−x)4=(1−x+2x)(1−x)(1−x)4=(1+x)(1−x)(1−x)4.\frac{(1-x)^2 + 2x(1-x)}{(1-x)^4} = \frac{(1-x+2x)(1-x)}{(1-x)^4} = \frac{(1+x)(1-x)}{(1-x)^4}.

Canceling 1−x1-x in the numerator,

1+x(1−x)3.\frac{1+x}{(1-x)^3}.

Thus, the sum of the given series is:

12+22x+32x2+42x3+⋯=1+x(1−x)3,for ∣x∣<1.1^2 + 2^2 x + 3^2 x^2 + 4^2 x^3 + \dots = \frac{1+x}{(1-x)^3}, \quad \text{for } |x| < 1.

Consider the following series as another example:

cos⁡x+2cos⁡2x+3cos⁡3x+⋯+ncos⁡nx.\cos x + 2\cos 2x + 3\cos 3x + \dots + n\cos nx.

To find its closed-form sum, we start with the known result for the sum of sine terms in an arithmetic sequence:

∑k=1nsin⁡kx=sin⁡nx2sin⁡x2sin⁡(n+1)x2.\sum_{k=1}^{n} \sin kx = \frac{\sin \frac{nx}{2}}{\sin \frac{x}{2}} \sin \frac{(n+1)x}{2}.

This follows from the standard summation formula:

∑k=0n−1sin⁡(a+kd)=sin⁡nd2sin⁡d2sin⁡(a+(n−1)d2).\sum_{k=0}^{n-1} \sin (a + kd) = \frac{\sin \frac{nd}{2}}{\sin \frac{d}{2}} \sin \left( a + \frac{(n-1)d}{2} \right).

Setting a=xa = x and d=xd = x, we obtain:

∑k=1nsin⁡kx=sin⁡nx2sin⁡x2sin⁡(n+1)x2.\sum_{k=1}^{n} \sin kx = \frac{\sin \frac{nx}{2}}{\sin \frac{x}{2}} \sin \frac{(n+1)x}{2}.

Differentiating both sides with respect to xx,

∑k=1nkcos⁡kx=ddx[sin⁡nx2sin⁡x2sin⁡(n+1)x2].\sum_{k=1}^{n} k \cos kx = \frac{d}{dx} \left[ \frac{\sin \frac{nx}{2}}{\sin \frac{x}{2}} \sin \frac{(n+1)x}{2} \right].

This derivative can be computed explicitly. I leave it as exercise. The final result provides a closed-form expression for the given summation.

Section 10 of 10 · Differentiation

Mark this section complete when you have worked through its proofs.