高等数学Mathematica实验题——1.2-30.三角波函数的函数解析式求解及图形绘制 (Triangular wave function)

对于函数y=f(x),如果存在一个不为零的常数T,使得当x取定义域内的每一个值时,f(x+T)=f(x)都成立,那么就把函数y=f(x)叫做周期函数,不为零的常数T叫做这个函数的周期。事实上,任何一个常数kT(k∈Z,且k≠0)都是它的周期。并且周期函数f(x)的周期T是与x无关的非零常数,且周期函数不一定有最小正周期。(如,狄利克雷函数不具有最小正周期)”
In mathematics, a periodic function is a function that repeats its values in regular intervals or periods. The most important examples are the trigonometric functions, which repeat over intervals of 2π radians. Periodic functions are used throughout science to describe oscillations, waves, and other phenomena that exhibit periodicity. Any function that is not periodic is called aperiodic.

问题:1.2 - 30. 试写出三角波函数 (将f (x) = | x |, -1 <= x <= 1 的图形左右两侧进行平移复制) 的一般表达式,并用Mathematica软件绘制其在[-5, 5] 区间的图形。

高等数学Mathematica实验题——1.2-30.三角波函数的函数解析式求解及图形绘制 (Triangular wave function)


备注:可通过设置AspectRatio调节横坐标、纵坐标刻度的比例,否则函数图形可能会失真。如上图所示: