Previous Up Next

9.2.1  Defining periodic expressions

The periodic command creates periodic expressions.

Example

To define the periodic function f(x)=1−x2 for −1≤ x<1 with period T=2, input:

f:=periodic(1-x^2,x,-1,1)

or:

f:=periodic(1-x^2,x=-1..1)
     
−⎛
⎜
⎜
⎝
−2 ⎢
⎢
⎢
⎣
x+1
2
⎥
⎥
⎥
⎦
+x⎞
⎟
⎟
⎠
2



 
+1
          

Indeed:

plot(f,x=-5..5)

Previous Up Next