Question: error in f solve (AGM )

 

restart; with(plots)

PDEtools[declare]((F, T, G, H)(Y), prime = Y)

` F`(Y)*`will now be displayed as`*F

 

` T`(Y)*`will now be displayed as`*T

 

` G`(Y)*`will now be displayed as`*G

 

` H`(Y)*`will now be displayed as`*H

 

`derivatives with respect to`*Y*`of functions of one variable will now be displayed with '`

(1)

p1 := 0.1e-1; p2 := 0.3e-1; p3 := 0.5e-1; p := p1+p2+p3

rf := 1050; kf := .52; cpf := 3617; sigmaf := .8

sigma1 := 25000; rs1 := 5200; ks1 := 6; cps1 := 670

sigma2 := 0.210e-5; rs2 := 5700; ks2 := 25; cps2 := 523

sigma3 := 6.30*10^7; rs3 := 10500; ks3 := 429; cps3 := 235

sigma4 := 10^(-10); rs4 := 3970; ks4 := 40; cps4 := 765

sigma5 := 1.69*10^7; rs5 := 7140; ks5 := 116; cps5 := 390

sigma6 := 4.10*10^7; rs6 := 19300; ks6 := 318; cps6 := 129

``

M := 1; S1 := .5; A := 1; delta := 0.1e-2; g := .1; Gr := .5; betu := .5; bett := .5; Pr := 21; Ec := .5; bet := 1; S2 := .5; Rd := 1; Q := .1; Ra := .5; S := .1

alp := .1

``

``

B1 := 1+2.5*p+6.2*p^2; B2 := 1+13.5*p+904.4*p^2; B3 := 1+37.1*p+612.6*p^2; B4 := (ks1+2*kf-2*p*(kf-ks1))/(ks1+2*kf+p*(kf-ks1)); B5 := (ks2+3.9*kf-3.9*p*(kf-ks2))/(ks2+3.9*kf+p*(kf-ks2)); B6 := (ks3+4.7*kf-4.7*p*(kf-ks3))/(ks3+4.7*kf+p*(kf-ks3)); B7 := (ks4+2*kf-2*p*(kf-ks4))/(ks4+2*kf+p*(kf-ks4)); B8 := (ks5+3.9*kf-3.9*p*(kf-ks5))/(ks5+3.9*kf+p*(kf-ks5)); B9 := (ks6+4.7*kf-4.7*p*(kf-ks6))/(ks6+4.7*kf+p*(kf-ks6))

a1 := B1*p1+B2*p2+B3*p3

a2 := 1-p1-p2-p3+p1*rs1/rf+p2*rs2/rf+p3*rs3/rf

a3 := 1-p1-p2-p3+p1*rs1*cps1/(rf*cpf)+p2*rs2*cps2/(rf*cpf)+p3*rs3*cps3/(rf*cpf)

a4 := B4*p1+B5*p2+B6*p3

``

a5 := 1+3*((p1*sigma1+p2*sigma2+p3*sigma3)/sigmaf-p1-p2-p3)/(2+(p1*sigma1+p2*sigma2+p3*sigma3)/((p1+p2+p3)*sigmaf)-((p1*sigma1+p2*sigma2+p3*sigma3)/sigmaf-p1-p2-p3))

``

NULL

a6 := B1*p1+B2*p2+B3*p3

a7 := 1-p1-p2-p3+p1*rs4/rf+p2*rs5/rf+p3*rs6/rf

a8 := 1-p1-p2-p3+p1*rs4*cps4/(rf*cpf)+p2*rs5*cps5/(rf*cpf)+p3*rs6*cps6/(rf*cpf)

a9 := B7*p1+B8*p2+B9*p3

``

a10 := 1+3*((p1*sigma4+p2*sigma5+p3*sigma6)/sigmaf-p1-p2-p3)/(2+(p1*sigma4+p2*sigma5+p3*sigma6)/((p1+p2+p3)*sigmaf)-((p1*sigma4+p2*sigma5+p3*sigma6)/sigmaf-p1-p2-p3))

W := sum(b[i]*Y^i, i = 0 .. 3); Theta := sum(c[i]*Y^i, i = 0 .. 3); U := sum(d[i]*Y^i, i = 0 .. 2); Phi := sum(h[i]*Y^i, i = 0 .. 2)

Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0]

 

Y^3*c[3]+Y^2*c[2]+Y*c[1]+c[0]

 

Y^2*d[2]+Y*d[1]+d[0]

 

Y^2*h[2]+Y*h[1]+h[0]

(2)

F := a1*(1+1/bet)*(diff(W, `$`(Y, 2)))+a2*Ra*(diff(W, Y))+A-a5*M*W-S2*W^2+a2*Gr*Theta-S*betu*(W-U) = 0

9.1682928*Y*b[3]+3.0560976*b[2]+2.433571428*Y^2*b[3]+1.622380952*Y*b[2]+.8111904760*b[1]+1-1.346703274*b[3]*Y^3-1.346703274*b[2]*Y^2-1.346703274*b[1]*Y-1.346703274*b[0]-.5*(Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^2+.8111904760*c[3]*Y^3+.8111904760*c[2]*Y^2+.8111904760*c[1]*Y+.8111904760*c[0]+0.5e-1*d[2]*Y^2+0.5e-1*d[1]*Y+0.5e-1*d[0] = 0

(3)

T := (a4+Rd)*(diff(Theta, `$`(Y, 2)))+a3*Pr*Ra*(diff(Theta, Y))+Q*Theta+Pr*alp*S*bett*(Theta-Phi)+Pr*Ec*((1+1/bet)*a1*(diff(W, Y))^2+a5*M*W^2+(1+1/bet)*a1*S1*W^2+S2*W^3+S*betu*(W-U)) = 0

.205*c[1]*Y+.205*c[2]*Y^2+.205*c[3]*Y^3-.525*d[1]*Y-.525*d[2]*Y^2+.525*b[0]+.525*b[1]*Y+.525*b[2]*Y^2+.525*b[3]*Y^3+21.63764058*(Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^2-.105*h[0]+6.799682664*Y*c[3]+30.71903373*Y^2*c[3]+20.47935582*Y*c[2]-.105*Y^2*h[2]-.105*Y*h[1]-.525*d[0]+.205*c[0]+10.23967791*c[1]+2.266560888*c[2]+16.04451240*(3*Y^2*b[3]+2*Y*b[2]+b[1])^2+5.25*(Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^3 = 0

(4)

G := Ra*(diff(U, Y))+betu*(W-U) = 0

1.0*Y*d[2]+.5*d[1]+.5*b[3]*Y^3+.5*b[2]*Y^2-.5*d[2]*Y^2+.5*b[1]*Y-.5*d[1]*Y+.5*b[0]-.5*d[0] = 0

(5)

H := Ra*(diff(Phi, Y))+bett*(Theta-Phi) = 0

1.0*Y*h[2]+.5*h[1]+.5*c[3]*Y^3+.5*c[2]*Y^2-.5*Y^2*h[2]+.5*c[1]*Y-.5*Y*h[1]+.5*c[0]-.5*h[0] = 0

(6)

BCS := (D(W))(0) = 0, (D(Theta))(0) = 0, W(1) = -delta*(1+1/bet)*(D(W))(1), Theta(1) = 1+g*(D(Theta))(1), U(1) = -delta*(1+1/bet)*(D(W))(1), Phi(1) = 1+g*(D(Theta))(1)

W := unapply(W(Y), Y)

F := unapply(F(Y), Y)

Theta := unapply(Theta(Y), Y)

T := unapply(T(Y), Y)

U := unapply(U(Y), Y)

G := unapply(G(Y), Y)

Phi := unapply(Phi(Y), Y)

H := unapply(H(Y), Y)

z1 := (D(W))(0) = 0

(D(W))(0) = 0

(7)

z2 := (D(Theta))(0) = 0

(D(Theta))(0) = 0

(8)

z3 := W(1) = -delta*(1+1/bet)*(D(W))(1)

b[3](1)+b[2](1)+b[1](1)+b[0](1) = -0.2e-2*(D(W))(1)

(9)

z4 := Theta(1) = 1+g*(D(Theta))(1)

c[3](1)+c[2](1)+c[1](1)+c[0](1) = 1+.1*(D(Theta))(1)

(10)

z5 := U(1) = -delta*(1+1/bet)*(D(W))(1)

d[2](1)+d[1](1)+d[0](1) = -0.2e-2*(D(W))(1)

(11)

z6 := Phi(1) = 1+g*(D(Theta))(1)

h[2](1)+h[1](1)+h[0](1) = 1+.1*(D(Theta))(1)

(12)

z7 := F(0)

1.+3.0560976*b[2](0)+.8111904760*b[1](0)-1.346703274*b[0](0)-.5*b[0](0)^2+.8111904760*c[0](0)+0.5e-1*d[0](0) = 0

(13)

z8 := T(0)

.525*b[0](0)+21.63764058*b[0](0)^2-.105*h[0](0)-.525*d[0](0)+.205*c[0](0)+10.23967791*c[1](0)+2.266560888*c[2](0)+16.04451240*b[1](0)^2+5.25*b[0](0)^3 = 0

(14)

z9 := G(0)

.5*d[1](0)+.5*b[0](0)-.5*d[0](0) = 0

(15)

z10 := H(0)

.5*h[1](0)+.5*c[0](0)-.5*h[0](0) = 0

(16)

z11 := F(1)

10.25516095*b[3](1)+3.331775278*b[2](1)-.5355127980*b[1](1)+1-1.346703274*b[0](1)-.5*(b[3](1)+b[2](1)+b[1](1)+b[0](1))^2+.8111904760*c[3](1)+.8111904760*c[2](1)+.8111904760*c[1](1)+.8111904760*c[0](1)+0.5e-1*d[2](1)+0.5e-1*d[1](1)+0.5e-1*d[0](1) = 0

(17)

z12 := T(1)

10.44467791*c[1](1)+22.95091671*c[2](1)+37.72371639*c[3](1)-.525*d[1](1)-.525*d[2](1)+.525*b[0](1)+.525*b[1](1)+.525*b[2](1)+.525*b[3](1)+21.63764058*(b[3](1)+b[2](1)+b[1](1)+b[0](1))^2-.105*h[0](1)-.105*h[2](1)-.105*h[1](1)-.525*d[0](1)+.205*c[0](1)+16.04451240*(3*b[3](1)+2*b[2](1)+b[1](1))^2+5.25*(b[3](1)+b[2](1)+b[1](1)+b[0](1))^3 = 0

(18)

z13 := G(1)

.5*d[2](1)+.5*b[3](1)+.5*b[2](1)+.5*b[1](1)+.5*b[0](1)-.5*d[0](1) = 0

(19)

z14 := H(1)

.5*h[2](1)+.5*c[3](1)+.5*c[2](1)+.5*c[1](1)+.5*c[0](1)-.5*h[0](1) = 0

(20)

NULL

Z := fsolve([z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11, z12, z13, z14], {b[0], b[1], b[2], b[3], c[0], c[1], c[2], c[3], d[0], d[1], d[2], h[0], h[1], h[2]})

(21)

"F(Y):=eval(sum(b[i]*Y^i,i=0..5),Z);    "

Error, invalid input: eval received NULL, which is not valid for its 2nd argument, eqns

 

"T(Y):=eval(sum(c[i]*Y^i,i=0..5),Z);    "

Error, invalid input: eval received NULL, which is not valid for its 2nd argument, eqns

 

"G(Y):=eval(sum(d[i]*Y^i,i=0..5),Z);    "

Error, invalid input: eval received NULL, which is not valid for its 2nd argument, eqns

 

"H(Y):=eval(sum(h[i]*Y^i,i=0..5),Z);    "

Error, invalid input: eval received NULL, which is not valid for its 2nd argument, eqns

 

NULL

plot(F(Y), Y = 0 .. 1, axes = boxed, color = green, thickness = 2, labels = [Y, W])

Error, (in plot) unexpected options: [9.1682928*Y(Y)*b[3](Y)+3.0560976*b[2](Y)+2.433571428*Y(Y)^2*b[3](Y)+1.622380952*Y(Y)*b[2](Y)+.8111904760*b[1](Y)+1-1.346703274*b[3](Y)*Y(Y)^3-1.346703274*b[2](Y)*Y(Y)^2-1.346703274*b[1](Y)*Y(Y)-1.346703274*b[0](Y)-.5*(b[3](Y)*Y(Y)^3+b[2](Y)*Y(Y)^2+b[1](Y)*Y(Y)+b[0](Y))^2+.8111904760*c[3](Y)*Y(Y)^3+.8111904760*c[2](Y)*Y(Y)^2+.8111904760*c[1](Y)*Y(Y)+.8111904760*c[0](Y)+0.5e-1*d[2](Y)*Y(Y)^2+0.5e-1*d[1](Y)*Y(Y)+0.5e-1*d[0](Y) = 0, Y = 0 .. 1]

 

plot(T(Y), Y = 0 .. 1, axes = boxed, color = green, thickness = 2, labels = [Y, Theta])

Error, (in plot) unexpected options: [.205*c[1](Y)*Y(Y)+.205*c[2](Y)*Y(Y)^2+.205*c[3](Y)*Y(Y)^3-.525*d[1](Y)*Y(Y)-.525*d[2](Y)*Y(Y)^2+.525*b[0](Y)+.525*b[1](Y)*Y(Y)+.525*b[2](Y)*Y(Y)^2+.525*b[3](Y)*Y(Y)^3+21.63764058*(b[3](Y)*Y(Y)^3+b[2](Y)*Y(Y)^2+b[1](Y)*Y(Y)+b[0](Y))^2-.105*h[0](Y)+6.799682664*Y(Y)*c[3](Y)+30.71903373*Y(Y)^2*c[3](Y)+20.47935582*Y(Y)*c[2](Y)-.105*Y(Y)^2*h[2](Y)-.105*Y(Y)*h[1](Y)-.525*d[0](Y)+.205*c[0](Y)+10.23967791*c[1](Y)+2.266560888*c[2](Y)+16.04451240*(3*Y(Y)^2*b[3](Y)+2*Y(Y)*b[2](Y)+b[1](Y))^2+5.25*(b[3](Y)*Y(Y)^3+b[2](Y)*Y(Y)^2+b[1](Y)*Y(Y)+b[0](Y))^3 = 0, Y = 0 .. 1]

 

plot(G(Y), Y = 0 .. 1, axes = boxed, color = green, thickness = 2, labels = [Y, W])

Error, (in plot) unexpected options: [1.0*Y(Y)*d[2](Y)+.5*d[1](Y)+.5*b[3](Y)*Y(Y)^3+.5*b[2](Y)*Y(Y)^2-.5*d[2](Y)*Y(Y)^2+.5*b[1](Y)*Y(Y)-.5*d[1](Y)*Y(Y)+.5*b[0](Y)-.5*d[0](Y) = 0, Y = 0 .. 1]

 

plot(H(Y), Y = 0 .. 1, axes = boxed, color = green, thickness = 2, labels = [Y, Theta])

Error, (in plot) unexpected options: [1.0*Y(Y)*h[2](Y)+.5*h[1](Y)+.5*c[3](Y)*Y(Y)^3+.5*c[2](Y)*Y(Y)^2-.5*Y(Y)^2*h[2](Y)+.5*c[1](Y)*Y(Y)-.5*Y(Y)*h[1](Y)+.5*c[0](Y)-.5*h[0](Y) = 0, Y = 0 .. 1]

 

NULL


 

Download AGM.mw
 

 

Please Wait...