rabhay1987

5 Reputation

2 Badges

14 years, 3 days

MaplePrimes Activity


These are questions asked by rabhay1987

in following coding
final equations Exp1 ,Exp2, Exp3, Exp4 depends on X2 and X3, but in these equations I have introduced certain equations which are also depending on X2 and X3,like fccL[Ni, Si] etc, but that dependend variable is counted as different variable while plotting the function or evaluating it Help me please 

> restart;> NULL;> ;>
R := 8.314;>
G1[1] := piecewise(298 <= T and T < 1358, -7770.458+130.485235*T-24.112392*T*ln(T...

> restart; R := 8.314; printlevel := 2;print(??); # input placeholder> G1[1] := piecewise(`and`(T > 298, T < 700), -7976.15+137.093038*T-24.3671976*T*log(T)-0.1884662e-2*T^2-0.877664e-6*T^3+74092/T, `and`(T >= 700, T < 933), -11276.24+223.048446*T-38.5844296*T*log(T)+0.18531982e-1*T^2-0.5764227e-5*T^3+74092/T, `and`(T >= 933, T < 2900), -11278.361+188.684136*T-31.748192*T*log(T)-0.1230622e29/T^9, 0);print(??); # input placeholder

> G1[2] := piecewise...

I want to sovle two equations given as a function
G1 and G2
G1 is defined as
function y = G1(x)
y = (2*x*log(2*x)+(1-x)*log(1-x))+(.0009*x*(1-x));
G2 is Defined as

function y = G2(x)
y = x*log(x)+(1-x)*log(1-x);


when I solve the wquations using code
syms x1;
syms x2;
ans=solve(((G1(x2))-(G2(x1))/(x2-x1))-diff((G1(x1)),x1),((G1(x2))-(G2(x1))/(x2-x1))-diff((G2(x2)),x2),X1,X2);
following error occur


??? Error using ==> sym.solve at 73

> restart; R := 8.314;print(??); # input placeholder> G1[1] := piecewise(`and`(T > 298, T < 700), -7976.15+137.093038*T-24.3671976*T*log(T)-0.1884662e-2*T^2-0.877664e-6*T^3+74092/T, `and`(T >= 700, T < 933), -11276.24+223.048446*T-38.5844296*T*log(T)+0.18531982e-1*T^2-0.5764227e-5*T^3+74092/T, `and`(T >= 933, T < 2900), -11278.361+188.684136*T-31.748192*T*log(T)-0.1230622e29/T^9, 0);print(??); # input placeholder

> G1[2] := piecewise(`and`(T > 298, T < 700...

here is my code i want to run the loop for every value if there is invalid input in lhs(ans(1)) the loop should not stop and check for next value
> restart;
>
> f1 := proc (x) options operator, arrow; R*T*(x*ln(x)+(1-x)*ln(1-x))+Omega[l]*x*(1-x) end proc;
x -> R T (x ln(x) + (1 - x) ln(1 - x)) + Omega[l] x (1 - x)
>
> g1 := proc (x) options operator, arrow; (1-x)*SfA*(T-TfA)+x*SfB*(T-TfB)+R*T*(x*ln(x)+(1-x)*ln(1-x))+Omega[s]*x*(1-x) end proc;
Page 1 of 1