Function Mathematica-如何在绘图上显示两个函数的交点?
我定义了两个功能:Function Mathematica-如何在绘图上显示两个函数的交点?,function,plot,wolfram-mathematica,Function,Plot,Wolfram Mathematica,我定义了两个功能: f[x]:=40*1.04^x g[x]:=150*0.9^x 然后我在画它们: Plot[{f[x],g[x]},{x,0,20}] 但是如何显示这两个函数的交集呢?我真的需要学习如何在Wolfram中使用map和replace。。。但是谢谢! f[x_] := 40*1.04^x g[x_] := 150*0.9^x sol = Quiet[Solve[f[x] == g[x], x]]; xpts = x /. sol; ypts = f /@ xpts; Plot
f[x]:=40*1.04^x
g[x]:=150*0.9^x
然后我在画它们:
Plot[{f[x],g[x]},{x,0,20}]
但是如何显示这两个函数的交集呢?我真的需要学习如何在Wolfram中使用map和replace。。。但是谢谢!
f[x_] := 40*1.04^x
g[x_] := 150*0.9^x
sol = Quiet[Solve[f[x] == g[x], x]];
xpts = x /. sol;
ypts = f /@ xpts;
Plot[{f[x], g[x]}, {x, 0, 20},
Epilog -> {PointSize[0.02], Orange,
Map[Point, Transpose[{xpts, ypts}]]}]