Question: Fsolve returns expression instead of numbers

Hi, when trying to solve 2 equations with 2 variables the fsolve function reutrns just expression instead of numerical solution. Can someone please help with this? Thanks a lot

 

NRTL.mw
 

restart

T:=325:

a12:=2305.28444347652 - 9.14490843016421*T + 0.00680052257590234*T^2:

a21:=-6665.24838284836 + 46.0897018087247*T - 0.0694991633494123*T^2:

alfa:=0.3:

x2:=1-x1:

tau12:=a12/T:

tau21:=a21/T:

G12:=exp(-alfa*tau12):

G21:=exp(-alfa*tau21):

lng1:=x2^2*(tau21*(G21/(x1+x2*G21))^2+tau12*(G12/((x2+x1*G12)^2))):

lng2:=x1^2*(tau12*(G12/(x2+x1*G12))^2+tau21*(G21/((x1+x2*G21)^2))):

lnga1:=subs(x1=xa1,lng1):

lngb1:=subs(x1=xb1,lng1):

lnga2:=subs(x1=xa1,lng2):

lngb2:=subs(x1=xb1,lng2):

r1:=lnga1+ln(xa1)=lngb1+ln(xb1)

(1-xa1)^2*(.4966874722/(.4073000470+.5926999530*xa1)^2+.1510891213/(-0.464212743e-1*xa1+1)^2)+ln(xa1) = (1-xb1)^2*(.4966874722/(.4073000470+.5926999530*xb1)^2+.1510891213/(-0.464212743e-1*xb1+1)^2)+ln(xb1)

(1)

r2:=lnga2+ln(1-xa1)=lngb2+ln(1-xb1)

xa1^2*(.1440753718/(-0.464212743e-1*xa1+1)^2+1.219463331/(.4073000470+.5926999530*xa1)^2)+ln(1-xa1) = xb1^2*(.1440753718/(-0.464212743e-1*xb1+1)^2+1.219463331/(.4073000470+.5926999530*xb1)^2)+ln(1-xb1)

(2)

fsolve({r1,r2})

fsolve({xa1^2*(.1440753718/(-0.464212743e-1*xa1+1)^2+1.219463331/(.4073000470+.5926999530*xa1)^2)+ln(1-xa1) = xb1^2*(.1440753718/(-0.464212743e-1*xb1+1)^2+1.219463331/(.4073000470+.5926999530*xb1)^2)+ln(1-xb1), (1-xa1)^2*(.4966874722/(.4073000470+.5926999530*xa1)^2+.1510891213/(-0.464212743e-1*xa1+1)^2)+ln(xa1) = (1-xb1)^2*(.4966874722/(.4073000470+.5926999530*xb1)^2+.1510891213/(-0.464212743e-1*xb1+1)^2)+ln(xb1)}, {xa1, xb1})

(3)

 


 

Download NRTL.mw

 

Please Wait...