1)分别画出 y=x^n*Sin[1/x], 当 n=0,1,2,3 时的图形;mathematica软件

mathematica\u600e\u6837\u753by=x^n(n=1,2,3,4,5,6,7,8,9)\u56fe\u50cf

\u5efa\u7acb\u76f4\u89d2\u5750\u6807\u8f74\u3002\u5047\u8bbex=1,\u5219y=1\uff0c\u63cf\u51fa\uff081\uff0c1\uff09\u8fd9\u4e00\u70b9\uff1b\u5047\u8bbex=2 \u5219y=4,\u63cf\u51fa\uff082\uff0c4\uff09\u8fd9\u4e00\u70b9\u2026\u2026\u4ee5\u6b64\u7c7b\u63a8\uff0c\u63cf\u51fa\u4e09\u4e2a\u70b9\u7136\u540e\u7528\u5e73\u6ed1\u7684\u66f2\u7ebf\u8fde\u8d77\u6765\u5c31\u597d\u5566

X=[-1:0.02:1];
plot(X,sin(1./X))
\u8bed\u53e5\u4e2d\u7684\u70b9\u4ee3\u8868\u5bf9\u4e8e\u5143\u7d20\u76f8\u9664\uff0c\u96640\u5e76\u4e0d\u662f\u9519\u8bef\uff0c\u4ec5\u4ec5\u662f\u5185\u90e8\u6570\u636e\u6ea2\u51fa\u800c\u5df2\uff0c\u53ef\u4ee5\u4e0d\u7528\u7ba1\u3002
x=0:0.1:10;
y=sin(x);
plot(x,y)
\u4f8b\u5982\uff1a
\u6839\u636e\u5df2\u77e5\u51fd\u6570\u53ef\u77e5\uff0c\u5728x=0\u5904\u6709\u95f4\u65ad\u70b9\uff0c\u6240\u4ee5\u7ed8\u5236\u8be5\u51fd\u6570\u56fe\u5f62\uff0c\u5e94\u907f\u5f00\u8be5\u95f4\u65ad\u70b9\u3002\u56fe\u5f62\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a
x=-10.01:-0.01;y=x.*sin(1./x);
plot(x,y),hold on
x=0.01:10.01;y=x.*sin(1./x);
plot(x,y)
\u8fd0\u884c\u7ed3\u679c
\u6269\u5c55\u8d44\u6599\uff1b
plot(x1,y1,x2,y2,\u2026\u2026)\u5728\u6b64\u683c\u5f0f\u4e2d\uff0c\u6bcf\u5bf9x,y\u5fc5\u987b\u7b26\u5408plot(x,y)\u4e2d\u7684\u8981\u6c42\uff0c\u4e0d\u540c\u5bf9\u4e4b\u95f4\u6ca1\u6709\u5f71\u54cd\uff0c\u547d\u4ee4\u5c06\u5bf9\u6bcf\u4e00\u5bf9x,y\u7ed8\u5236\u66f2\u7ebf\u3002plot\u662f\u7ed8\u5236\u4e00\u7ef4\u66f2\u7ebf\u7684\u57fa\u672c\u51fd\u6570\uff0c\u4f46\u5728\u4f7f\u7528\u6b64\u51fd\u6570\u4e4b\u524d\uff0c\u987b\u5148\u5b9a\u4e49\u66f2\u7ebf\u4e0a\u6bcf\u4e00\u70b9\u7684x\u4ee5\u53cay\u5750\u6807\u3002
\u82e5y\u548cx\u4e3a\u540c\u7ef4\u5411\u91cf\uff0c\u5219\u4ee5x\u4e3a\u6a2a\u5750\u6807,y\u4e3a\u7eb5\u5750\u6807\u7ed8\u5236\u8fde\u7ebf\u56fe\u3002\u82e5x\u662f\u5411\u91cf\uff0cy\u662f\u884c\u6570\u6216\u5217\u6570\u4e0ex\u957f\u5ea6\u76f8\u7b49\u7684\u77e9\u9635\uff0c\u5219\u7ed8\u5236\u591a\u6761\u4e0d\u540c\u8272\u5f69\u7684\u8fde\u7ebf\u56fe\uff0cx\u88ab\u4f5c\u4e3a\u8fd9\u4e9b\u66f2\u7ebf\u7684\u5171\u540c\u6a2a\u5750\u6807\u3002\u82e5x\u548cy\u4e3a\u540c\u578b\u77e9\u9635\uff0c\u5219\u4ee5x,y\u5bf9\u5e94\u5143\u7d20\u5206\u522b\u7ed8\u5236\u66f2\u7ebf\uff0c\u66f2\u7ebf\u6761\u6570\u7b49\u4e8e\u77e9\u9635\u5217\u6570\u3002
\u53c2\u8003\u8d44\u6599\u6765\u6e90\uff1a\u767e\u5ea6\u767e\u79d1-plot

把4个函数图象画在一起

Plot[Evaluate[Table[x^n*Sin[1/x], {n, 1, 4}]], {x, -1, 1}, PlotStyle -> {Orange, Red, Blue, Black}]
4个函数图象分开,高级一点的画法
f = Plot[x^#*Sin[1/x], {x, -1, 1}, PlotStyle -> {Orange, Red, Blue, Black}] &;
GraphicsGrid[Map[f, {{1, 2}, {3, 4}}, {2}]]

补充:
f = Plot[x^#*Sin[1/x], {x, -1, 1},
PlotStyle -> {Orange, Red, Blue, Black}[[#]]] &;
GraphicsGrid[Map[f, {{1, 2}, {3, 4}}, {2}]]

扩展阅读:x∧n-y n ... 求角度计算器 ... 求解方程计算器 ... x n 0 1 求y ex的方差 ... 随机变量x n 0 1 y x2 ... sin x ... 直线x y z ... z xy图像 ... 功能计算器 ...

本站交流只代表网友个人观点,与本站立场无关
欢迎反馈与建议,请联系电邮
2024© 车视网