Miscellaneuous
Derivative of ln|x|
The function \( \ln |x| \) is defined for all \( x \in \mathbb{R} \setminus \{0\} \) and can be expressed as:
\[
\ln |x| =
\begin{cases}
\ln x, & x > 0 \\
\ln(-x), & x < 0
\end{cases}
\]
Differentiating each case separately:
For \( x > 0 \), we have
\[
\frac{d}{dx} (\ln x) = \frac{1}{x}
\]
For \( x < 0 \), we have
\[
\frac{d}{dx} (\ln (-x)) = \frac{1}{-x} \cdot (-1) = \frac{1}{x}
\]
Thus, for all \( x \neq 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 \times 2 \) matrix whose entries are functions of \( 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 \( 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) = \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) =
\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) = \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) =
\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 \times n \) determinant, we obtain the general formula:
\[
\frac{d}{dx} \det A(x) = \sum_{j=1}^{n} \det A_j(x),
\]
where \( A_j(x) \) is the matrix obtained by differentiating the \( j \)th row while keeping the others unchanged. The same formula holds when differentiating column-wise instead of row-wise.
For example:
Consider the \( 2 \times 2 \) matrix:
\[
A(x) =
\begin{bmatrix}
x^2 & e^x \\
\sin x & \ln x
\end{bmatrix}.
\]
The determinant of \( A(x) \) is:
\[
D(x) = \begin{vmatrix} x^2 & e^x \\ \sin x & \ln x \end{vmatrix}.
\]
To differentiate \( D(x) \), we first differentiate column-wise:
\[
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) =
\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 + 3x^2 + 4x^3 + \dots, \quad \text{for } |x| < 1.
\]
To evaluate its sum, we first examine the related geometric series:
\[
x + x^2 + x^3 + x^4 + \dots.
\]
Since this is an infinite geometric progression with first term \( a = x \) and common ratio \( r = x \), its sum, valid for \( |x| < 1 \), is given by the standard formula for the sum of an infinite geometric series:
\[
\sum_{n=0}^{\infty} a r^n = \frac{a}{1 - r}, \quad \text{for } |r| < 1.
\]
Applying this to our series with \( a = x \) and \( r = x \):
\[
x + x^2 + x^3 + x^4 + \dots = \frac{x}{1 - x}, \quad \text{for } |x| < 1.
\]
Differentiating both sides with respect to \( 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 + 3x^2 + 4x^3 + \dots.
\]
Using the quotient rule on the right:
\[
\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 + 3x^2 + 4x^3 + \dots = \frac{1}{(1-x)^2}, \quad \text{for } |x| < 1.
\]
Consider another infinite series as example:
\[
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 + x^2 + x^3 + x^4 + \dots = \frac{1}{1-x}, \quad \text{for } |x| < 1.
\]
Differentiating both sides with respect to \( 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 + 3x^2 + 4x^3 + \dots.
\]
Applying the derivative to the right-hand side,
\[
\frac{1}{(1-x)^2}.
\]
Thus,
\[
1 + 2x + 3x^2 + 4x^3 + \dots = \frac{1}{(1-x)^2}, \quad \text{for } |x| < 1.
\]
Multiplying both sides by \( x \),
\[
x + 2x^2 + 3x^3 + 4x^4 + \dots = \frac{x}{(1-x)^2}.
\]
Differentiating again,
\[
\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 \cdot 2x + 3 \cdot 3x^2 + 4 \cdot 4x^3 + \dots.
\]
Using the quotient rule on the right,
\[
\frac{(1-x)^2 (1) - x (2(1-x)(-1))}{(1-x)^4}.
\]
Simplifying,
\[
\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-x \) in the numerator,
\[
\frac{1+x}{(1-x)^3}.
\]
Thus, the sum of the given series is:
\[
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 + 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:
\[
\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:
\[
\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 = x \) and \( d = x \), we obtain:
\[
\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 \( x \),
\[
\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.