[scilab-Users] Can u help to write the code scilab to solve the transcendantal equation by Newton Raphson?

Michaël Baudin michael.baudin at scilab.org
Mon Jan 3 08:56:48 CET 2011


Hi,

In order to solve a nonlinear equation in Scilab, you can use the fsolve 
function:

help fsolve

This requires that you define the nonlinear function f(x) associated 
with the f(x)=0 equation.

Best regards,

Michaël Baudin

Le 28/12/2010 01:39, JOSE KANTOLE a écrit :
> Hello
>
>
>
> I am fairly new to using Scilab but need to solve a transcendental
> equation.    I would like to write the code to solve this equation
> .The value sought is F0
>
> Given data: emin=0.688;
>
> NTU= 1.488 ;
>
> B=0.334;
>
> p=-ln(1-emin);
>
>   x=( NTU-p) *2/B;
>
> y=exp(x) ;
>
> F0=(y-1)/(1-y*(1-emin));
>
> If F0>10; or F0<0, then
>
> y=exp(2*x/p);
>
> This is the first approximation F0=sqrt(y/(1-emin))
>
> My problem is to solve the problem using Raphson-Newton method
>
> F1=(1-emin)*F0;
>
> p0=ln(1+F0);
>
> p20=p0*p0;
>
> G0= p0*(1+17*p20/450)/(1+p20/100)+p20/4
>
>
>
> p=ln(1+ F1);
>
>
>
> p2=p*p;
>
>
>
> G1= p*(1+17*p2/450)/(1+p2/450)+p2/4;
>
>
>
>
>
> x=-ln (1-emin)+B/2*(G0-G1)-NTU;
>
> y=B/2*(p0/F0-(1-emin)*p/(1+F1)); this is the derivative of x
>
> Fon=F0-x/y ( Newton-Raphson)
>
>
>
> Hopefully someone can see what is needed to get things working. Thanks
> in advance all.


-- 
Michaël Baudin
Ingénieur de développement
michael.baudin at scilab.org
-------------------------
Consortium Scilab - Digiteo
Domaine de Voluceau - Rocquencourt
B.P. 105 - 78153 Le Chesnay Cedex
Tel. : 01 39 63 56 87 - Fax : 01 39 63 55 94





More information about the users mailing list