Question: Error, (in fprintf) number expected for floating point format

hello...i have a problem with this program.

I want to save the result(y,u(y)) in a text or another format file, but I encounter with this error message:

Error, (in fprintf) number expected for floating point formatBVP.mw
 

restart:

A1:= 5.5:  n:= 0.59:  A2:= 11818.:  h0:= 0.402e-3:
L:= .1:  dpx := -11823.9:  uc:= 0.44e-2:

ODE:= (A3,y)->
   (h0^(n+1)*L/sqrt(n)*(A1*exp(sqrt(n)*y/L)-A2*exp(-sqrt(n)*y/L))+dpx*y*h0^(n+1)+A3*(h0)^n)^(1/n)
;

proc (A3, y) options operator, arrow; (h0^(n+1)*L*(A1*exp(sqrt(n)*y/L)-A2*exp(-sqrt(n)*y/L))/sqrt(n)+dpx*y*h0^(n+1)+A3*h0^n)^(1/n) end proc

(1)

ODEINT:= proc(A3)
option remember;
local y;
   evalf(Int(ODE(A3,y), y= 0..1, epsilon= 1e-7)) - uc
end proc:

ReINT:= proc(A3x, A3y)
   Digits:= 15:
   Re(ODEINT(A3x + I*A3y))
end proc:

ImINT:= subs(Re= Im, eval(ReINT)):

Digits:= 7:
a3:= fsolve([ReINT, ImINT]);

[6.3610757968979, 0.]

(2)

A3:= Complex(a3[]);

6.3610757968979+0.*I

(3)

Solve as IVP:

Digits:= 15:
sol:= dsolve({diff(u(y),y) = ODE(A3,y), u(0)=0}, numeric, range=0..1,  output=listprocedure):

``

``

plots:-odeplot(
   sol, [[y, Re(u(y))], [y, Im(u(y))]], y= 0..1,
   legend= [real, imag], labels= [y, u(y)]
);

 

 

F53 := proc (y) options operator, arrow; U end proc; G53 := proc (y) options operator, arrow; Re(evalf[20](F53(y))) end proc; Temp3 := cat("u(y)-y.dat"); fd53 := fopen(Temp3, WRITE, TEXT); for i from 0 by 0.5e-1 to 1 do tt := i; u := eval(G53(y), y = tt); fprintf(fd53, "%10.5e %10.5e  \n", tt, u) end do; fclose(fd53)

Error, (in fprintf) number expected for floating point format

 

NULL


 

Download BVP.mw

 

please help me

thanks

Please Wait...