函数方程的解法

函数方程的解法

函数方程的解:

特别说明:以下所有的函数均连续、可导,对于更一般的情况不做研究

解决函数方程的基本方法

(1). 赋特殊值:如 0, \pm 1, \pm x, \pm \frac{1}{x} 等值
(2). 凑出 f(x_1) - f(x_2),解决单调性问题
(3). 凑出 f(x) 与 f(-x) 判断奇偶
(4). 了解了一部分性质(特殊值、奇偶性)之后,可以考虑解出函数

通用方法:

对其中一个变量求偏导,得到另一个方程,代入一个特殊值,把解函数方程变成解 ODE。
求一次不行可以再求一次。

模型:指对幂(柯西方程)

f(x+y) = f(x) + f(y) \Rightarrow f(x) = kx
f(x+y) = f(x) \cdot f(y) \Rightarrow f(x) = a^x \quad (a>0 \land a \neq 1)
f(xy) = f(x) + f(y) \Rightarrow f(x) = m \log_a x \quad (a>0 \land a \neq 1)
f(xy) = f(x) \cdot f(y) \Rightarrow f(x) = x^n \quad (n \text{ 为常数})

三角函数

f(x \pm y) = \frac{f(x) \pm f(y)}{1 \mp f(x)f(y)} \Rightarrow f(x) = \tan x
f(x+y) + f(x-y) = 2f(x)f(y) \Rightarrow f(x) = \cos \omega x \quad (\text{余弦型方程,积化和差})
f(x+y)f(x-y) = f(x)^2 - f(y)^2 \Rightarrow f(x) = \sin \omega x \quad (\text{正弦型方程,正弦平方差})


①. f(x+y) = f(x) + f(y)

代特殊值:f(0+0) = f(0) + f(0) \Rightarrow f(0) = 0

f(x+(-x)) = f(x) + f(-x) \Rightarrow f(x) = -f(-x) 奇函数

\therefore f(x+(-y)) = f(x-y) = f(x) + f(-y) = f(x) - f(y)

那么:若 x>0, f(x)>0, x<0, f(x)<0 \Rightarrow f(x) \uparrow

若 x>0, f(x)<0, x<0, f(x)>0 \Rightarrow f(x) \downarrow

且是线性的“直线”,猜测 f(x) = kx + b

两边对 y 求偏导:
\frac{\partial (f(x+y))}{\partial y} = \frac{\partial (f(x) + f(y))}{\partial y}
\Rightarrow f'(x+y) = f'(y)
令 y=0,则 f'(x) = f'(0) = k, k 为常数

由 \frac{df}{dx} = k \Rightarrow f = kx + C 回代得:f(x) = kx

②. f(x+y) = f(x) \cdot f(y)

代特殊值:y=0, f(x) = f(x) \cdot f(0) \Rightarrow f(0) = 1

f(x+(-x)) = f(x) \cdot f(-x) \Rightarrow f(x) \cdot f(-x) = 1

因此 f(x-y) = f(x) \cdot f(-y) = \frac{f(x)}{f(y)}

也能根据每个区间上函数单调性,判断函数的正负

由于很像指数函数及其运算法则,猜测 f(x) = a^x \quad (a \neq 1 \land a>0),下面进行验证

方法一:\frac{\partial f(x+y)}{\partial y} = \frac{\partial (f(x) \cdot f(y))}{\partial y}

\therefore f'(x+y) = f(x) \cdot f'(y),令 y=0

\therefore f'(x) = f(x) \cdot f'(0)

\therefore f'(x) = m f(x)

\frac{df}{dx} = m f \Rightarrow \frac{df}{mf} = dx

\Rightarrow \frac{1}{m} \int \frac{df}{f} = \int dx \Rightarrow \frac{\ln f}{m} = x + C_1

\Rightarrow \ln f = mx + C_2 \quad \therefore f = e^{mx+C_2} = A a^x

回代:A \cdot a^{x+y} = A^2 a^{x+y} \quad \therefore A = 1

\therefore f(x) = a^x

方法二:取对数 \ln f(x+y) = \ln f(x) + \ln f(y),设 g(x) = \ln f(x)

\therefore g(x+y) = g(x) + g(y) \quad \therefore \ln f(x) = kx

\therefore f(x) = e^{kx} = a^x

③. f(xy) = f(x) + f(y)

特殊值 f(0) = f(x) \cdot f(0) \Rightarrow f(0) = 0 或 f(x) \equiv 1 = x^0 \quad (x \neq 0)

f(x \cdot 1) = f(x) + f(1) \Rightarrow f(1) = 0

f(x \cdot \frac{1}{x}) = f(x) + f(\frac{1}{x}) \Rightarrow f(x) + f(\frac{1}{x}) = 0

奇偶性无法判断

由于运算法则:(ab)^m = a^m \cdot b^m,猜测 f(x) 为 x^m

\frac{\partial f(xy)}{\partial y} = \frac{\partial (f(x) + f(y))}{\partial y} \Rightarrow x \cdot f'(xy) = f'(y)

令 y=1,则 x f'(x) = f'(1) \cdot m \quad \therefore x \cdot \frac{df}{dx} = m \cdot f

\therefore \frac{df}{mf} = \frac{dx}{x} \quad \therefore \frac{1}{m} \int \frac{df}{f} = \int \frac{dx}{x}

\Rightarrow \frac{1}{m} \ln f = \ln x + C_1

\Rightarrow \ln f = m \ln x + C_2

\Rightarrow f = e^{m \ln x + C_2} = A x^m 回代得:A = 1

\therefore f(x) = x^m

④. f(xy) = f(x) + f(y)

特殊值:x=y=1 时,f(1) = f(1) + f(1) \Rightarrow f(1) = 0

由 \log_a(xy) = \log_a x + \log_a y,不妨猜想 f(x) = \log_a x,以下进行验证

两边对 y 求偏导:
\frac{\partial f(xy)}{\partial y} = \frac{\partial (f(x) + f(y))}{\partial y}
\Rightarrow x \cdot f'(xy) = f'(y),令 y=1,则:x f'(x) = f'(1)

因而 f'(x) = \frac{m}{x} \quad \frac{df}{dx} = \frac{m}{x}

因而 \int df = m \int \frac{dx}{x} \Rightarrow f = m \ln x + C

\Rightarrow 可化为 f(x) = m \log_a x \quad (\text{由换底公式})

回代:m \log_a(xy) = m \log_a x + m \log_a y

因而解为:f(x) = m \log_a x


⚠需要注意的是,一个函数方程可能不止有这些解,可能存在零解、特殊解,甚至无解。如果 f(x) 不连续或不可导之类的情形下会出现“病态”解。我们一般会给函数加上其他限定条件,如连续、可导、定义域限制 \mathbb{R}^+ 等。即便是连续解也可能会有多个函数,以下在解函数方程时便会出现这种情况。

定义:双曲三角函数:
\sinh(x) = \frac{e^x - e^{-x}}{2} \quad \text{奇函数}
\cosh(x) = \frac{e^x + e^{-x}}{2} \quad \text{偶函数}
\tanh(x) = \frac{\sinh(x)}{\cosh(x)} = \frac{e^x - e^{-x}}{e^x + e^{-x}} \quad \text{奇函数}

公式:欧拉公式:e^{i\theta} = i \sin \theta + \cos \theta \quad (\theta \in \mathbb{C})

推论:复数域下的指数与三角函数的关系:
\sin \theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}
\cos \theta = \frac{e^{i\theta} + e^{-i\theta}}{2}

⑤. f(x \pm y) = \frac{f(x) \pm f(y)}{1 \mp f(x)f(y)},以 f(x+y) 为例,

f(x+y) = \frac{f(x) + f(y)}{1 - f(x)f(y)},令 x=y=0 \quad f(0) = \frac{2f(0)}{1 - f^2(0)}

\Rightarrow f(0) (1 - \frac{2}{1 - f^2(0)}) = 0 \quad f(0) = 0 或 1 - f^2(0) = 2 (舍去)

令 y = -x, f(0) = \frac{f(x) + f(-x)}{1 - f(x)f(-x)} 则 f(x) = -f(-x),为奇函数

变形,f(x+y) (1 - f(x)f(y)) = f(x) + f(y),对 y 求偏导,

f'(x+y) (1 - f(x)f(y)) + f(x+y) (-f(x)f'(y)) = f'(y)

令 y=0, f'(x) + f(x) \cdot (-f'(0)) = f'(0)

因而:f'(x) - f^2(x) = f'(0)

因而:f'(x) = f^2(x) + m

即:\frac{df}{dx} = f^2 + m \Rightarrow \frac{df}{f^2 + m} = dx

\Rightarrow \int \frac{df}{f^2 + m} = \int dx

I. 若 m>0,由 \int \frac{df}{f^2 + 1} = \arctan f + C

可解得结果为:\frac{1}{\sqrt{m}} \int \frac{d(f/\sqrt{m})}{(f/\sqrt{m})^2 + 1} = x + C

\Rightarrow x + C = \frac{1}{\sqrt{m}} \arctan(f/\sqrt{m})

\Rightarrow y = \sqrt{m} \tan(\sqrt{m}x + \sqrt{m}C)

\Rightarrow y = \lambda \tan(\lambda x + \mu)

回代,令 \lambda = 1, \mu = 0 \quad \therefore y = \tan x

II. 若 m<0,\int \frac{df}{f^2 + m} = \frac{1}{2a} \int (\frac{df}{f-a} - \frac{df}{f+a})

= \frac{1}{2a} \ln(\frac{f-a}{f+a}) = x + C

令:\frac{f-a}{f+a} = e^{2ax + C},代入 f(0) = 0

-1 = e^C,因而在此时 C 无解,c \in \mathbb{C}

在复数域下可能才有解。

⑥. f(x+y) + f(x-y) = 2f(x)f(y)

令 x=0, 2f(y) = f(y) + f(-y) \Rightarrow f(y) = f(-y) 偶函数

令 y=0, 2f(x) = 2f(x)f(0) \Rightarrow f(0) = 1

\frac{\partial (f(x+y) + f(x-y))}{\partial y} = \frac{\partial (2f(x)f(y))}{\partial y}
\Rightarrow f'(x+y) - f'(x-y) = 2f(x) \cdot f'(y),两边再对 y 求偏导

\Rightarrow f''(x+y) + f''(x-y) = 2f(x) \cdot f''(y),令 y=0

\Rightarrow 2f''(x) = 2f(x) \cdot f''(0) \Rightarrow f''(x) = m f(x)

此时要解 f'' - m f = 0 \quad (m \neq 0)

特征根为 r^2 - m = 0

I. 若 \Delta > 0,f(t) = C_1 e^{\sqrt{m}t} + C_2 e^{-\sqrt{m}t}

f(0) = C_1 + C_2 = 1

f'(0) = C_1 \sqrt{m} - C_2 \sqrt{m}

由于 f(x) 为偶函数,则 f'(t) 为奇函数,且 t \in \mathbb{R}

因为 f'(0) = 0,解得 C_1 = C_2 = \frac{1}{2}

\therefore f(t) = \frac{e^{\sqrt{m}t} + e^{-\sqrt{m}t}}{2} = \cosh(\sqrt{m}t)

则 f(x) = \cosh(\lambda x)

II. 若 \Delta < 0,f(t) = C_1 e^{i \lambda t} + C_2 e^{-i \lambda t}

f(0) = C_1 + C_2 = 1

f'(0) = i \lambda (C_1 - C_2) = 0

\therefore C_1 = C_2 = \frac{1}{2}

f(t) = \frac{e^{i \lambda t} + e^{-i \lambda t}}{2} = \cos(\lambda t)

\therefore f(x) = \cos(\lambda x)

⑦. f(x+y)f(x-y) = f^2(x) - f^2(y)

令 x=0, f(y)f(-y) = f^2(0) - f^2(y)

则 f(y) = 0 或 f(-y) = -f(y)

令 x=y=0, f^2(0) = f^2(0)

\therefore f(0) = 0

当 f(x) \equiv 0 不成立时,f(x) = -f(-x),f(x) 为奇函数

\frac{\partial (f(x+y)f(x-y))}{\partial y} = \frac{\partial (f^2(x) - f^2(y))}{\partial y}
\Rightarrow f'(x+y)f(x-y) - f(x+y)f'(x-y) = -2f(y) \cdot f'(y)

经过观察,发现此时难以通过求导求出一个简单的方程,再对 y 求偏导

f''(x+y)f(x-y) - 2f'(x+y)f'(x-y) + f(x+y)f''(x-y) = -2 (f'(y) \cdot f'(y) + f(y) \cdot f''(y))

令 y=0,则:f''(x) \cdot f(x) - (f'(x))^2 = n

再次求导,得:f'''(x) \cdot f(x) = f'(x) \cdot f''(x)

由于 (\ln f(x))' = \frac{f'(x)}{f(x)}

那么 \frac{f'(x)}{f(x)} = \frac{f''(x)}{f'''(x)}

\Rightarrow \int \frac{f'(x)}{f(x)} dx = \int \frac{f''(x)}{f'''(x)} dx

\Rightarrow \ln |f(x)| = \ln |f''(x)| + C_1

\Rightarrow pf(x) = f''(x)

\Rightarrow f''(x) - p f(x) = 0

特征方程:r^2 - p = 0

初始条件 f(0) = 0

I. 若 \Delta > 0,f(t) = C_1 e^{\sqrt{p}t} + C_2 e^{-\sqrt{p}t}

f(0) = C_1 + C_2 = 0 \quad C_1 = -C_2 = C

\Rightarrow f(t) = C(e^{\sqrt{p}t} + e^{-\sqrt{p}t}) = m \sinh(\lambda t)

回代,参数无法消去,可以保留,因而 f(x) = m \sinh(\lambda x)

II. 若 \Delta < 0,f(t) = C_1 e^{i \lambda t} + C_2 e^{-i \lambda t}

f(0) = C_1 + C_2 = 0 \quad C_1 = -C_2 = C

\Rightarrow f(t) = C(e^{i \lambda t} - e^{-i \lambda t})

= 2i C \frac{e^{i \lambda t} - e^{-i \lambda t}}{2i} = m \sin(\lambda t)

回代后参数无法消去,可以保留,且仍成立

因而 f(x) = m \sin(\lambda x)

=============================================================

参考资料

[1]【【毕业生解题技巧分享 1】高等通法,30s解决所有抽象函数问题,选填再也不耗时】 https://www.bilibili.com/video/BV1UWKZzCE6A/?share_source=copy_web&vd_source=814e9f2313ddd4a061d14fdde861aeca
[2] 【【毕业生解题技巧分享 5】抽象函数问题高等通法 偏导法,技巧合集】 https://www.bilibili.com/video/BV1Q2sWzvEio/?share_source=copy_web&vd_source=814e9f2313ddd4a061d14fdde861aeca