non linear equation solution problem

1 view (last 30 days)
clear all
clc
syms x xe k n CR T
Tin=915;
CR=1;
xe=1;
eq=(xe*k^n*((Tin-T)/CR)^n)/(1+k^n*((Tin-T)/CR)^n)==x;
eq1=subs(eq,T,888);
eq1=subs(eq1,x,5.43/100);
eq2=subs(eq,T,840);
eq2=subs(eq2,x,73/100);
sol=solve([eq1,eq2],[k,n]);

Accepted Answer

Walter Roberson
Walter Roberson on 18 May 2019
The equation is too complicated for MATLAB.
The solutions are:
ln = @log;
k = exp(-(ln(73/(100*xe-73))*ln(25/9)+ln(75)*ln(543/73*(100*xe-73)/(10000*xe-543)))/ln(543/73*(100*xe-73)/(10000*xe-543)))
n = -ln(543/73*(100*xe-73)/(10000*xe-543))/ln(25/9)
  2 Comments
sudheer kumar
sudheer kumar on 18 May 2019
Thanks for your response.
Actually i want to change my input values so that i will get corresponding unknown values k and n.
The solution you have given will not work.
Walter Roberson
Walter Roberson on 18 May 2019
Instead of
Tin=915;
CR=1;
xe=1;
we will use the symbols Tin, CR, and xe.
Let 888 be T1 and corresponding x 5.43/100 be x1.
Let 840 be T2 and corresponding x 73/100 be x2.
ln = @log;
k = exp((-ln((-T2+Tin)/CR)*ln(x2*(x1-xe)/x1/(x2-xe))+ln(-x2/(x2-xe))*(ln((-T2+Tin)/CR)-ln((-T1+Tin)/CR)))/ln(x2*(x1-xe)/x1/(x2-xe)))
n = ln(x2*(x1-xe)/x1/(x2-xe))/(ln((-T2+Tin)/CR)-ln((-T1+Tin)/CR))
The solution I gave was fine for the question that was asked. It was after 4 am here when I answered, and my mind-reading abilities are tired.

Sign in to comment.

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!