Wave12.3.9
Here is how the construction was done. The function m(x) is defined to be modula 2. It is (2/pi)*arctan(tan(x*Pi/2)) and it maps x to -1..1 in a 2-periodic manner. The function arctan(tan x) maps x to -pi/2..pi/2 in a pi-periodic manner. The function u(x) is the unit step function which is zero for negative x and one for positive x.
The function f(x) is the initial position and it is defined by
(u(x-1/4)-u(x-1/2))*( x - 1/4) + (u(x-1/2)-u(x-3/4))* ( 3/4 - x)
which is a way to break up a piecewise function. The function oddf(x)
is the odd extension of f(x) and is given by sgn(x)*f(abs(x)). oddmodf(x) is
oddf(m(x)) and it is the black line.
The blue, green and red are as before blue(x) = f* (x-t)/2, green(x) = f* (x+t)/2
red(x) = blue(x)+green(x) is the solution u(x,t).
Move the t to see the wave move. Try changing f(x) to x*(1-x) or to sin(pi*x)/2
+ sin(3*pi*x)/6
sfb, 15jun07, Created with GeoGebra |