F(x):=x->piecewise(xL,0);
plot(F(x),-16..16,-0.1..1.1, numpoints=400,color=blue,thickness=3);
>
> restart;
> F(x):=x->piecewise(xL,0);
f(xi):=0;
Yechim uchun Dalamber formulasidan foydalanamiz:
> u(t,x):=subs(x=x-a*t,piecewise(xL,0))+(subs(x=x+a*t,piecewise(xL,0)));
Olingan yechimni ikki o’lchovli animasiyali grafik ko’rinishda tasvirlaymiz:
> with(plots):
a:=1;L:=0.8;alpha:=1;l1:=-L;l2:=+L;
u1(t,x):=PIECEWISE([0, x-a*t < l1],[alpha, x-a*t < l2],[0, L < x-a*t]);
u2(t,x):=PIECEWISE([0, x+a*t < l1],[alpha, x+a*t < l2],[0, L < x+a*t]);
u(t,x):=PIECEWISE([0, x-a*t < l1],[alpha, x-a*t < l2],[0, L < x-a*t])+PIECEWISE([0, x+a*t < l1],[alpha, x+a*t < l2],[0, L < x+a*t]);
animate(plot,[u1(t,x),x=-5..5, y=-0.1..2.2], t=0..3, frames=30,thickness=3, title="u1(t,x)");
animate(plot,[u2(t,x),x=-5..5, y=-0.1..2.2], t=0..3, frames=30,thickness=3, title="u2(t,x)");
animate(plot,[u(t,x),x=-5..5, y=-0.1..2.2], t=0..3, frames=30,thickness=3, title="u(t,x)");
animate(plot,[{u1(t,x),u2(t,x),u(t,x)},x=-5..5, y=-0.1..2.2], t=0..4, frames=30,thickness=3, title="u1(t,x), u2(t,x), u(t,x)");
Warning, the name changecoords has been redefined
>
Aim.uz
Dostları ilə paylaş: |