→ honestonly:這種考題很少 又很瞎 orz... 02/19 08:24
※ 引述《FindScarlett (尋找郝思嘉)》之銘言:
: 這三題是系列題
: 23.The exact solution of y'=y+2x-x^2 ; y(0)=1 (0≦x<∞) 求y解
: 24.(cont ) If one use Euler method to calculate the numerical solution of
: y'=y+2x-x^2 whose step size is 0.1,then y(x=0.1) is
: (a) 1.10 (b)1.11 (c)1.12 (d)1.13 (e)1.14
: 25.(cont ) If one use midpoint method to calculate the numerical solution of
: y'=y+2x-x^2 whose step size is 0.1,then y(x=0.1) is
: (a) 1.10 (b)1.11 (c)1.12 (d)1.13 (e)1.14
: 第23題用一階線性ODE解的出來,但24跟25要怎麼解我實在沒頭緒
: 翻參考書也沒有類似題可以比較
: 想請教各位板上的工數大神!! 感謝!
Euler method.
y'=f(x,y) y(x0)=y0
->
yn+1=yn+hf(xn,yn)
n xn yn hf(xn,yn)
0 0 1 0.1(1)
1 0.1 1.1
->y(0.1)=y1=1.1 ->a
Midpoint method:
yn+1=yn+hf(xn+h/2,yn+h/2 f(xn,yn))
n xn yn hf(xn+h/2,yn+h/2 f(xn,yn))
0 0 1 0.1f(0.05,1+0.05)~0.11475
1 0.1 ~1.11
->y(0.1)=y1=1.11 ->b
應該是這樣= =||
--
為者常成,行者常至.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.193.214.165