from 2015-6-7

自分用の備忘録としてネット上にも残しておこうと思い書いています

maple-mapleのplot

a:= x^2 - abs(x):
plot(a,x=-2 .. 2);
b := x * sin(x): plot(b,x = -Pi .. Pi);
c := 2 * sin(x) + sin(2*x): plot(c , x = 0 .. 2*Pi);
d:= exp( - x^2): plot(d, x = -infinity .. infinity);
f:= x -> if abs(x) <= 1 then abs(abs(x) - 1) else 0 fi;
x -> if |x| <= 1 then ||x| - 1| else 0 fi;
plot(f(x), x = -3 .. 3);
Error, (in f) cannot determine if this expression is true or false: abs(x) <= 1
f(3);
                               0
f(0);
                               1
g := proc(x)
if abs(x) <= 1 then abs(abs(x) - 1)
 else 0
 fi
 end proc;
proc(x)  ...  end;
plot('g(x)', x = -3..3);
h := proc(x)
if abs(x) > 1 then x^2
elif abs(x) = 1 then 0
else - x^2
fi
end proc;
proc(x)  ...  end;
plot(h, -2..2, -10 .. 10);
h(1);
x -> 0
plot({seq( x^j , j = 1 .. 4)}, x = -1.5 .. 1.5);
plot({seq( sin(k*x) , k = 1 ..4)}, x = 0 .. Pi, title = 'sin
( kx ) \in [-Pi, Pi]');
plot([cos(t), sin(t), t = 0 .. Pi], scaling = constrained);
plot([3*t/(1 + t^3), 3*t^2/(1 + t^3), t = -5 .. 5], -2 .. 2, -5 .. 5);

?polarplot
with(plots):
polarplot(3*cos(x), x = 0 .. 2*Pi);
polarplot([1+cos(t),t,t= -Pi .. Pi]);
plot([1+cos(t),t,t= -Pi .. Pi], coords=polar, scaling = constrained);
plot([t,Pi/3, t = -infinity .. infinity], 0 .. 5, 0 .. 5, coords = polar, scaling = constrained);
plot([cos(t), t, t = -Pi/2 .. Pi/2], coords = polar, scaling = constrained);
plot([1 + cos(t), t, t = -Pi .. Pi], coords = polar, scaling = constrained);
polarplot([(sin(t/3))^3, t, t= 0 .. Pi], scaling = constrained);
plot([1+t, t, t = 0 .. Pi/2], coords = polar, scaling = constrained);
polarplot([1+t, t, t = 0 .. Pi/2], scaling = constrained);
polarplot([sqrt(cos(2*t)), t, t = -Pi .. Pi]);

with(plots):implicitplot(x^2 + y^2=1 , x = -2 .. 2, y = -2 .. 2, scaling = constrained);
implicitplot(y^2 = x, x = -10..10, y = - 5 .. 5, scaling = constrained);
implicitplot(y^2 = x*(x-1), x = -3 .. 3, y = -9 .. 9, numpoints = 500000);

with(plots):implicitplot(x^3 - 3*x*y + y^3 = 0, x = -5 .. 5, y = -5 .. 5, numpoints = 20000);
implicitplot(9*x^2 + 24*x*y + 16*y^2 - 26*x + 7*y - 34 = 0, x = -10 .. 10, y = -10 .. 10, numpoints = 10000);

plot3d(sin(x^2 + y^2), x = -Pi/2 .. Pi/2, y = -Pi/2 .. Pi/2);
plot3d(x^2 + y^2, x = -2 ..2, y = -2 ..2);