答案1
这是一条长评论,我建议使用 Asymptote(可以嵌入到 LaTeX 中)。
对于第一张图,函数 的信息不足P(t)
。它的解析式是什么?我只能猜测它是某个逻辑微分方程的解。
对于第二幅图,Asymptote 有很好的dir
切线例程。您可以改编我在教学中使用的以下类似图。
real t=.37; // time along a path
pair P=point(g,t); // P is the point of time t along path g
pair Pt=dir(g,t); // Pt is the unit tangent at P
path T=P-3Pt--P+7.5Pt; // to draw tangent segment passing P
// http://asymptote.ualberta.ca/
unitsize(1cm);
size(10cm);
pair A=(0,0), B=(6,3.5);
path g=A..controls A+3dir(-60) and B+4dir(-105) .. B;
draw(g,black+.8pt);
real t=.37;
pair P=point(g,t);
pair Pt=dir(g,t);
path T=P-3Pt--P+7.5Pt;
draw(Label("Tangent line",Relative(.6),align=SE),T,magenta+.6pt);
pen penq=.5cyan+.5black;
pen pent=magenta;
pair[] Q;
real[] a={1,.92,.8,.68,.5};
real[] Qforward={0,.2,.25,.25,1};
string[] sQ={"$Q_0$","$Q_1$","$Q_2$","$Q_3$","$Q_4$"};
string[] sm={"$m_0$","$m_1$","$m_2$","$m_3$","$m_4$"};
for(int i=0;i<sm.length;++i)
sm[i]="Slope "+sm[i];
for(int i=1;i<5;++i){
Q[i]=relpoint(g,a[i]);
path Tq=-.3(Q[i]-P)+P--Q[i]+Qforward[i]*(Q[i]-P);
draw(Label(sm[i],align=E,EndPoint),Tq,dashed+penq);
dot(sQ[i],align=E,Q[i]);
}
dot("$P$",align=S,P);
label(minipage("Slope $m=$\\instantaneous rate\\of change at $P$",4cm),
align=2E+S,point(T,1),pent);
pair pS=point(P--Q[1],.5);
draw(Label("Secant lines",align=2N+W,EndPoint,penq),pS+.3dir(150)--pS+2dir(150));
// shipout(bbox(5mm,invisible));
答案2
使用tzplot:
\documentclass{standalone}
\usepackage{tzplot}
\begin{document}
\begin{tikzpicture}[x=.1cm,y=.01cm,font=\scriptsize,label distance=-5pt]
\tzhelplines[xstep=5,ystep=50,solid,gray!25](50,350)
\tzaxes(55,400){$t$}{$p$}
\tzticksx{0,10,...,50}
\tzticksy{50,100,...,350}
\tznode(25,-50){Time (days)}[b]
\tznode(-10,200){Number of flies}[rotate=90]
\tzto[cyan,thick,out=0,in=180]"curve"(0,0)(50,300)
\tzvXpointat{curve}{23}(P)
\tzvXpointat{curve}{45}(Q)
\tzline[tzextend={30}{15}](P)(Q)
\tzlink[red,thick](P)[-|]{$\Delta t=22$}[pos=.25,b,black](Q)
\tzline[draw=none](P-|Q){$\Delta p=190$}[r](Q)
\tzdots*[cyan](P){$P$}[135](Q){$Q$}[-45];
\tznode(30,150){$\frac{\Delta p}{\Delta t}\approx 8.6$}[r]
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tzplot}
\begin{document}
\begin{tikzpicture}[font=\scriptsize]
\tzhelplines(0,0)(5,4)
% curve
\tzto[cyan,thick,out=70,in=160]"curve"(0,0)(5,3)
% points on the curve
\tzvXpointat{curve}{1}(P)
\tzvXpointat{curve}{4}(Q)
\tzdots*(P){$P$}[135](Q){$Q$}[-90];
% secants
\tzsecant{curve}(P)(Q)[0:5]{Secant}[r,blue]
\tzsecant[red!50]{curve}(P)(3.5,0)[0:4.7]
\tzsecant[red!50]{curve}(P)(3 ,0)[0:4.3]
\tzsecant[red!50]{curve}(P)(2.5,0)[0:3.9]
\tzsecant[red!50]{curve}(P)(2 ,0)[0:3.6]
\tzsecant[red!50]{curve}(P)(1.5,0)[0:3.4]{Secants}[r]
% tangent
\tztangent[red]{curve}(P)[0:3]{Tangent}[al]
\end{tikzpicture}
\end{document}