Question: Polynomial coefficients program code???

Hello

I want to write a program to get unknown coefficients of multiple polynomials. I have a problem with this program. The code sometimes doesn't work. Can anyone help me? It's very important to me.

restart

with(student)

``

EQ[0] := tanh(d)*b[1]*(b[1]+1)

tanh(d)*b[1]*(b[1]+1)

(1)

EQ[1] := -(-1+(a[1]-b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))*b[1]

-(-1+(a[1]-b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))*b[1]

(2)

EQ[2] := tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)-b[1]^2-a[1])

tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)-b[1]^2-a[1])

(3)

EQ[3] := (-a[1]^2+(2*b[1]-1)*a[1]-b[1]^2-b[1])*tanh(d)^2+(a[1]+b[1])*(a[0]+1)*tanh(d)-a[1]-b[1]

(-a[1]^2+(2*b[1]-1)*a[1]-b[1]^2-b[1])*tanh(d)^2+(a[1]+b[1])*(a[0]+1)*tanh(d)-a[1]-b[1]

(4)

EQ[4] := -tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)+a[1]^2+b[1])

-tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)+a[1]^2+b[1])

(5)

EQ[5] := -a[1]*(-1+(-a[1]+b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))

-a[1]*(-1+(-a[1]+b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))

(6)

EQ[6] := (a[1]+1)*a[1]*tanh(d)

(a[1]+1)*a[1]*tanh(d)

(7)

Eqs := {seq(EQ[i], i = 0 .. 6)}

Sol := solve(Eqs, {a[0], a[1], b[1]})NULL

{a[0] = a[0], a[1] = 0, b[1] = 0}, {a[0] = (tanh(d)^2-tanh(d)+1)/tanh(d), a[1] = -1, b[1] = -1}, {a[0] = -(tanh(d)-1)/tanh(d), a[1] = -1, b[1] = 0}, {a[0] = -(tanh(d)-1)/tanh(d), a[1] = 0, b[1] = -1}

(8)

for i from 2 to 4 do Case[i] := allvalues(Sol[i]) end do

{a[0] = -(tanh(d)-1)/tanh(d), a[1] = 0, b[1] = -1}

(9)

``

T1.mw

T2.mw

Please Wait...