Post Reply 
another fsolve question
06-20-2015, 04:01 PM
Post: #1
another fsolve question
Can anyone tell me what I am doing wrong?

I plotted the function ph2o(X) (code below) and touched Menu/Fcn/Tangent and, as expected, I saw the tangent line at the cursor location that I could trace up and down the curve.

   

However, when I plot function tdew(X,15) (code also below) and touch the tangent soft-key I get nothing. When I touch slope I get NaN.

   

I get the same result with newton, newtonj, and bisection solver. Am I doing something wrong, or is the calculator not capable of that operation on that function?

Thanks for reading,

Paul

Code:

EXPORT ph2o(temp)
BEGIN
 local a,b;
 b:=(temp+273.15)/273.16;
 a:=1-1/b;
 return 10^(10.79574*a-5.028*log(b,10)+
  1.50475ᴇ−4*(1-10^(−8.2969*(b-1)))+
  4.2873ᴇ−4*(10^(4.76955*a)-1)-0.2138602);
END;

export tdew(r,tamb)
begin
 LOCAL y,z;
 r:=ph2o(tamb)*r/100;
 z:="fsolve(ph2o(x)="+STRING(r,2,12)+",x,−50 .. 100, newton_solver)";
 y:=CAS(z);
 RETURN y(1);
END;
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)