我试图在MATLAB中解决以下Toda ODAM系统:
a_k' = 2 *(b_k ^ 2 - b_(k-1)^ 2)对于k = 1,...,m与b_0 = b_m = 0
b_k' = b_k *(a_(k + 1) - a_k)对于k = 1,...,m-1
具有任意初始条件(b为非零)。我尝试过以下代码:
syms t
syms a_1(t) a_2(t) a_3(t) a_4(t) a_5(t) a_6(t) a_7(t) a_8(t) a_9(t) a_10(t)
syms b_1(t) b_2(t) b_3(t) b_4(t) b_5(t) b_6(t) b_7(t) b_8(t) b_9(t)
a_1_10 = [a_1; a_2; a_3; a_4; a_5; a_6; a_7; a_8; a_9; a_10];
a_1_9 = [a_1; a_2; a_3; a_4; a_5; a_6; a_7; a_8; a_9];
a_2_10 = [a_2; a_3; a_4; a_5; a_6; a_7; a_8; a_9; a_10];
b_1_10 = [b_1; b_2; b_3; b_4; b_5; b_6; b_7; b_8; b_9; 0];
b_0_9 = [0; b_1; b_2; b_3; b_4; b_5; b_6; b_7; b_8; b_9];
b_1_9 = [b_1; b_2; b_3; b_4; b_5; b_6; b_7; b_8; b_9];
eqns_a = diff(a_1_10) == 2.*(b_1_10.^2 - b_0_9.^2);
eqns_b = diff(b_1_9) == b_1_9 .* (a_2_10 - a_1_9);
eqns = [eqns_a; eqns_b];
init_a = a_1_10(0) == randn(10,1);
init_b = b_1_9(0) == randn(9,1);
init = [init_a; init_b];
S = dsolve(eqns, init);
但我一直收到错误:
Error using mupadengine/feval (line 163)
The equations are invalid.
Error in dsolve>mupadDsolve (line 336)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 193)
sol = mupadDsolve(args, options);
我还希望能够为许多不同的m值(即大于或小于10的函数的向量)运行此代码,但我不介意在必要时手动执行此操作。
感谢您的帮助!