If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# 计算复合函数

### 例题

$f\left(g\left(x\right)\right)$是什么？

### 解法

$\begin{array}{rl}f\left(x\right)& =3x-1\\ \\ f\left(g\left(x\right)\right)& =3\left(g\left(x\right)\right)-1\end{array}$

$\begin{array}{rl}f\left(g\left(x\right)\right)& =3\left(g\left(x\right)\right)-1\\ \\ & =3\left({x}^{3}+2\right)-1\\ \\ & =3{x}^{3}+6-1\\ \\ & =3{x}^{3}+5\end{array}$

$\begin{array}{rl}f\left(g\left(x\right)\right)& =3{x}^{3}+5\\ \\ f\left(g\left(3\right)\right)& =3\left(3{\right)}^{3}+5\\ \\ & =86\end{array}$

## 练一练!

### 问题 1

$f\left(x\right)=3x-1$
$g\left(x\right)={x}^{3}+2$

### 问题 2

$m\left(x\right)=3x-2$
$n\left(x\right)=x+4$

# 复合函数：正式的定义

$\left(f\circ g\right)\left(x\right)=f\left(g\left(x\right)\right)$

### 例题

$g\left(x\right)=x+4$
$h\left(x\right)={x}^{2}-2x$
$\left(h\circ g\right)\left(x\right)$$\left(h\circ g\right)\left(-2\right)$

### 解法

$\begin{array}{rl}\left(h\circ g\right)\left(x\right)& ={x}^{2}+6x+8\\ \\ \left(h\circ g\right)\left(-2\right)& =\left(-2{\right)}^{2}+6\left(-2\right)+8\\ \\ & =4-12+8\\ \\ & =0\\ \end{array}$

# 现在让我们来进行一些练习。

### 问题 3

$f\left(x\right)=3x-5$
$g\left(x\right)=3-2x$

# 挑战题

$y=f\left(x\right)$$y=g\left(x\right)$ 的网格图形如下所示。