高等数学Mathematica实验题——1.2-28.分段函数的复合函数的求解及图形绘制(Composition of Piecewise Function)
"In mathematics, a piecewise-defined function (also called a piecewise function or a hybrid function) is a function defined by multiple sub-functions, each sub-function applying to a certain interval of the main function's domain, a sub-domain. Piecewise is actually a way of expressing the function, rather than a characteristic of the function itself, but with additional qualification, it can describe the nature of the function. For example, a piecewise polynomial function is a function that is a polynomial on each of its sub-domains, but possibly a different one on each."
1.2-28.设函数f(x)=If[x >= 1, -x, x],g[x] = If[x >= 0, x^2 - 3, 1 - x],求f[g(x)]和g[f(x)],并绘制它们的图形。
解答:
备注:1. Mathematica的输出,和手算结果一致
2. 结果要化简,不然看不懂
2. 除了用Piecewise定义分段函数,还可以用If定义,计算结果一致