开发者

How to solve such system with given parts of it? (maple)

So I had a system

#for given koefs 
k:=3; n:=3; 
#let us solve system:
koefSolution:= solve({
 sum(a[i], i = 0 .. k) = 0,
 sum(a[i], i = 0 .. k)-(sum(b[i], i = 0 .. k)) = 0,
 sum(i^n开发者_JAVA技巧*a[i], i = 0 .. k)-(sum(i^(n-1)*b[i], i = 0 .. k)) = 0
});

So I have a vector like

koefSolution := {  a[0] = 7*a[2]+26*a[3]-b[1]-4*b[2]-9*b[3], 
                   a[1] = -8*a[2]-27*a[3]+b[1]+4*b[2]+9*b[3], 
                   a[2] = a[2], 
                   a[3] = a[3], 
                   b[0] = -b[1]-b[2]-b[3], 
                   b[1] = b[1], b[2] = b[2], 
                   b[3] = b[3]}

I have a[0] so I try solve({koefSolution, a[0] = 1}); why it does not solve my system for given a[0]? ( main point here is to fill koefSolution with given a[] and b[] and optimize.)


If you have more unknowns than equations, the best you can do is a least squares fit.


You can evaluate at given values of a[] and b[] using 2-argument eval. Eg,

eval(koefSolution, [a[0]=1, b[2]=3, a[3]=11]);

What do you mean by "optimize" here? Are you saying that the known values of a[] and b[] may produce an inconsistent system (and thus require numerical optimization and best fit, rather than an exact solve call?)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜