Re: [问题] 一些问题

楼主: chungyuandye (养花种鱼数月亮赏星星)   2013-07-12 11:51:28
※ 引述《sweetycool (tina)》之铭言:
: 1. http://ppt.cc/0mFl
: 想问一下为什么这题我程式跑出来是空集合呢?
In[1]:= $Version
Out[1]= "8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"
In[2]:= eqn = y'[x] - 2 y[x]^2 + 2 y[x] == 1;
In[3]:= f[x_] = y[x] /. Quiet@DSolve[{eqn, y[0] == 1}, y[x], x][[1]]
Out[3]= 1/2 (1 + Tan[\[Pi]/4 + x])
In[4]:= eqn /. y -> f /. x -> 0
Out[4]= True
In[5]:= f'[x] - 2 f[x]^2 + 2 f[x] == 1 /. x -> 0
Out[5]= True
: 2. http://ppt.cc/xlLF
: 我想要画出 y^2 - x^2/2 = c 的图,然后c常数可以扣置在某一范围
: (ex: c= 1 to 100)
: 然后可以同时呈现c= 1 to 100 的图
: 不知道要怎么写出来
Show[ContourPlot[y^2 - x^2/x == #, {x, -5, 5}, {y, -5, 5}] & /@
Range[1, 100, 1]]
ContourPlot[y^2 - x^2/x, {x, -5, 5}, {y, -5, 5},
Contours -> Range[100]]
作者: hexane390625 (馒头)   2013-07-12 19:11:00
第二题你打错囉.应该是x^2/2
作者: sweetycool   2013-07-14 08:37:00
谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com