二阶导数的图形
以下是一些函数及其导数和二阶导数的图形。
1. y=xcos(x)及其导数和二阶导数 (函数曲线(红色)、导数曲线(蓝色)、二阶导数曲线(黑色)).
with(plots):
f:=x->x*cos(x):
tuxing:=plot([f(x),D(f)(x),D(D(f))(x)],x=-3..3,y=-3..3,thickness=[4,3,2],color=[red,blue,black]):
display(tuxing,scaling=constrained);
动画
with(plots): a:=-3:b:=4: f:=x->x*cos(x):
quxian:=plot([x,f(x),x=a..b],color=grey,thickness=1):
K:=50:for i from 1 to K do xi:=i*(b-a)/K:
hanshu[i]:=plot([x,f(x),x=a..a+xi]):
daoshu[i]:=plot([x,D(f)(x),x=a..a+xi],color=blue):
erjie[i]:=plot([x,D(D(f))(x),x=a..a+xi],color=black) od:
hanshu:=display(seq(hanshu[i],i=1..K),insequence=true):
daoshu:=display(seq(daoshu[i],i=1..K),insequence=true):
erjie:=display(seq(erjie[i],i=1..K),insequence=true):
display(hanshu,daoshu,erjie,quxian,scaling=constrained,tickmarks=[4,4],thickness=3);
2. y=arctan(x)及其导数和二阶导数 (函数曲线(红色)、导数曲线(蓝色)、二阶导数曲线(黑色)).
with(plots):
f:=x->arctan(x):
tuxing:=plot([f(x),D(f)(x),D(D(f))(x)],x=-3..3,y=-Pi/1.8..Pi/1.8,thickness=[4,3,3],color=[red,blue,black]):
display(tuxing,scaling=constrained);
动画
with(plots): a:=-3:b:=4: f:=x->arctan(x):
quxian:=plot([x,f(x),x=a..b],color=grey,thickness=1):
K:=50:for i from 1 to K do xi:=i*(b-a)/K:
hanshu[i]:=plot([x,f(x),x=a..a+xi]):
daoshu[i]:=plot([x,D(f)(x),x=a..a+xi],color=blue):
erjie[i]:=plot([x,D(D(f))(x),x=a..a+xi],color=black) od:
hanshu:=display(seq(hanshu[i],i=1..K),insequence=true):
daoshu:=display(seq(daoshu[i],i=1..K),insequence=true):
erjie:=display(seq(erjie[i],i=1..K),insequence=true):
display(hanshu,daoshu,erjie,quxian,scaling=constrained,tickmarks=[4,4],thickness=3);
3. 函数f(x)=0.6*x+3*sin(x)及其导数和二阶导数 (函数曲线(红色)、导数曲线(蓝色)、二阶导数曲线(黑色)).
with(plots): a:=20: f:=x->0.6*x+3*sin(x):
quxian:=plot([x,f(x),x=0..a],color=grey,thickness=1):
K:=80:for i from 1 to K do xi:=i*a/K:
hanshu[i]:=plot([x,f(x),x=0..xi]):
daoshu[i]:=plot([x,D(f)(x),x=0..xi],color=blue):
erjie[i]:=plot([x,D(D(f))(x),x=0..xi],color=black) od:
hanshu:=display(seq(hanshu[i],i=1..K),insequence=true):
daoshu:=display(seq(daoshu[i],i=1..K),insequence=true):
erjie:=display(seq(erjie[i],i=1..K),insequence=true):
display(hanshu,daoshu,erjie,quxian,scaling=constrained,tickmarks=[4,4],thickness=3);
评论