作者Frobenius (▽.(▽×▽φ)=0)
看板Math
標題Re: [微積] 請問一下離散的微分方程的解法
時間Sun Apr 3 15:12:16 2011
※ 引述《igawa (井穿腸 (3A))》之銘言:
: 就是我有一組數據
: du/dt = 10 @ t=0
: du/dt = 22 @ t=1
: du/dt = 73 @ t=2
: du/dt = 68 @ t=3
: du/dt = 17 @ t=4
: du/dt = 11 @ t=5
: .
: .
: .
: 想請問版上先進,可以用哪些方法,把u(t)這個函數解出來
: 謝謝~~!
定義 du/dt = v[t]
RSolve[{v[0] == 10, v[1] == 22, v[2] == 73, v[3] == 68, v[4] == 17,
v[5] == 11}, v[t], t]
RSolve::deqx: Supplied equations are not difference equations of the given
functions. >>
Solve[{a 0^6 + b 0^5 + c 0^4 + d 0^3 + e 0^2 + f 0 + g == 10,
a 1^6 + b 1^5 + c 1^4 + d 1^3 + e 1^2 + f 1 + g == 22,
a 2^6 + b 2^5 + c 2^4 + d 2^3 + e 2^2 + f 2 + g == 73,
a 3^6 + b 3^5 + c 3^4 + d 3^3 + e 3^2 + f 3 + g == 68,
a 4^6 + b 4^5 + c 4^4 + d 4^3 + e 4^2 + f 4 + g == 17,
a 5^6 + b 5^5 + c 5^4 + d 5^3 + e 5^2 + f 5 + g == 11}, {a, b, c, d,
e, f, g}]
Solve::svars: Equations may not give solutions for all "solve" variables. >>
{{a -> -(4213/7200) - f/120, b -> 4117/480 + f/8,
c -> -(62441/1440) - (17 f)/24, d -> 7927/96 + (15 f)/8,
e -> -(126731/3600) - (137 f)/60, g -> 10}}
v[t_] = (-(4213/7200) - f/120) t^6 + (4117/480 + f/
8) t^5 + (-(62441/1440) - (17 f)/24) t^4 + (7927/96 + (15 f)/
8) t^3 + (-(126731/3600) - (137 f)/60) t^2 + f t + 10;
Table[v[t], {t, 0, 5, 1}] // FullSimplify
{10, 22, 73, 68, 17, 11}
u[t_] = 1/7 (-(4213/7200) - f/120) t^7 + 1/6 (4117/480 + f/8) t^6 +
1/5 (-(62441/1440) - (17 f)/24) t^5 +
1/4 (7927/96 + (15 f)/8) t^4 +
1/3 (-(126731/3600) - (137 f)/60) t^3 + 1/2 f t^2 + 10 t + h
Table[u[t], {t, 0, 5, 1}] // FullSimplify
{h, (7005059 + 51780 f)/604800 + h, 2256301/37800 + (37 f)/630 + h,
3073097/22400 + (87 f)/1120 + h,
845302/4725 + (16 f)/315 + h, (5 (917759 + 660 f))/24192 + h}
4213 f 7 4117 f 6 62441 17 f 5
(-(----) - ---) t (---- + -) t (-(-----) - ----) t
7200 120 480 8 1440 24
u[t] = ------------------ + ------------- + --------------------
7 6 5
7927 15 f 4 126731 137 f 3
(---- + ----) t (-(------) - -----) t 2
96 8 3600 60 f t
+ ---------------- + ---------------------- + ---- + 10 t + h
4 3 2
4213 f 6 4117 f 5 62441 17 f 4
u'[t] = v[t] = (-(----) - ---) t + (---- + -) t + (-(-----) - ----) t
7200 120 480 8 1440 24
7927 15 f 3 126731 137 f 2
+ (---- + ----) t + (-(------) - -----) t + f t + 10
96 8 3600 60
4213 f 5 4117 f 4
u''[t] = v'[t] = 6 (-(----) - ---) t + 5 (---- + -) t
7200 120 480 8
62441 17 f 3 7927 15 f 2
+ 4 (-(-----) - ----) t + 3 (---- + ----) t
1440 24 96 8
126731 137 f
+ 2 (-(------) - -----) t + f
3600 60
u[0] = h ; u'[0] = v[0] = 10 ; u''[0] = v'[0] = f
7005059 + 51780 f 1081 f
u[1] = ----------------- + h ; u'[1] = v[1] = 22 ; u''[1] = v'[1] = ---- - -
604800 25 5
2256301 37 f 7261 f
u[2] = ------- + ---- + h ; u'[2] = v[2] = 73 ; u''[2] = v'[2] = ---- + --
37800 630 200 10
3073097 87 f 26543 f
u[3] = ------- + ---- + h ; u'[3] = v[3] = 68 ; u''[3] = v'[3] = - ----- - --
22400 1120 600 10
845302 16 f 2638 f
u[4] = ------ + ---- + h ; u'[4] = v[4] = 17 ; u''[4] = v'[4] = - ---- + -
4725 315 75 5
4588795 + 3300 f 119
u[5] = ---------------- + h ; u'[5] = v[5] = 11 ; u''[5] = v'[5] = - --- - f
24192 15
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.161.243.220
→ Frobenius :By mathematica 7.0 04/03 15:12
→ Frobenius :u'[6] = -(2233/10)- 6f ; u'[7]= -(21901/10)- 42 f 04/03 15:36
→ Frobenius :建議令 u''[0] = v'[0] = f = -(3133/60) - z/6 04/03 16:15
→ Frobenius : => u'[t] 屬於整數 => u'[6] = 90 + z ; 04/03 16:16
→ Frobenius : u'[7]= 3 + 7 z ; u'[8] = -1140 + 28 z ; 04/03 16:16
→ Frobenius : u'[9] = -5324 + 84 z ; ... 依此類推 04/03 16:17
※ 編輯: Frobenius 來自: 118.161.243.220 (04/03 16:20)
→ Frobenius :f 控制 u'[t] 是否為整數 ; h 控制 u[t] 的初始條件 04/03 16:33
推 doom8199 :polynomial curve fitting 要注意用高維度來 fit 04/03 18:08
→ doom8199 :data 會有 over-fitting 的問題 04/03 18:09
→ doom8199 :一個簡單的方式可以用 s-fold cross validation 04/03 18:10
→ Frobenius :請教一下什麼是高維度來fit?over-fitting?s-fold? ^^ 04/03 18:22