## 195 Reputation

13 years, 160 days

Amir

## @Carl Love Dear CarlI get your code...

Dear Carl

I get your code in my other comment "solve an especial ode", it was really good. I applied the code with the procedure above but it doesnt converge. would you check that whether I understand your point?

restart:

zet:=0.5:

We replace the interior-point condition with a constant: _C = 2*u(0.25) + u(0.16).
eq1:=diff(u(eta), eta, eta)+.5699919300/(0.9930000000e-3+0.3883623000e-1*phi(eta)+.5301627000*phi(eta)^2)+1/(eta-1)+(0.3883623000e-1+1.060325400*phi(eta))*(diff(phi(eta), eta))*(diff(u(eta), eta))/(0.9930000000e-3+0.3883623000e-1*phi(eta)+.5301627000*phi(eta)^2):

eq2:=diff(T(eta), eta, eta)+(5.05659*((2.666666666*(-1.1752324*10^6*phi(eta)+4.1744724*10^6))*u(eta)/rhocu+.8819362454*(diff(phi(eta), eta))-(.1977617327*(.597+4.45959*phi(eta)))*(diff(T(eta), eta))/(1-eta)))/(.597+4.45959*phi(eta)):

eq3:=diff(phi(eta), eta)-5.000000000*phi(eta)*(diff(T(eta), eta)):

BCs:= u(0)=0,u(1-zet)=0,phi(0)=1,T(0)=0,D(T)(0)=0:
We create a procedure whose input is a numeric value of that constant. The procedure calls dsolve using that value, evaluates the interior-point condition, and returns the difference between the input value and the evaluated condition. Hence, the goal is to find the input value that makes the output value zero.
F:= proc(C)
global phi,T,u, t, rhocu, eq1,eq2,eq3, BCs;
local Sol:= dsolve({eval(eq2, rhocu= C),eq1,eq3, BCs}, [u(eta),phi(eta),T(eta)], numeric);
userinfo(1, {F}, sprintf("Trying C = %22.15f", C));
C - evalf(2/(1-zet^2)*Int((1-eta)*(2881.8*phi(eta)+998.2)*((-1.1752324*10^6*phi(eta)+4.1744724*10^6)/(2881.8*phi(eta)+998.2))*u(eta),eta=0..1-zet))
end proc:

infolevel[F]:= 1:
C:= fsolve(F);
Sol:= dsolve({eval(eq2, rhocu= C),eq1,eq3, BCs}, [u(eta),phi(eta),T(eta)], numeric):
Verify solution:
C - evalf(2/(1-zet^2)*Int((1-eta)*rho(eta)*c(eta)*u(eta),eta=0..1-zet));
The error is far below the error tolerances of the dsolve!
plots:-odeplot(Sol, [eta,u(eta)], eta= 0..0.5);

** I Must stated that I think the value of rhocu must be in order of 1e6

## Dear Carlactually, when I run your code,...

Dear Carl

when I run your code, it has some :

actually, the command C:= fsolve(F);   doesnt work

Amir

## Dear Carlactually, when I run your code,...

Dear Carl

when I run your code, it has some :

actually, the command C:= fsolve(F);   doesnt work

Amir

## thats it...

thanks. it is so good.

but in NLPSOLve i must remove { in first and } at the end of it.is there any command that give all the characters in {}.

Amir

## thats it...

thanks. it is so good.

but in NLPSOLve i must remove { in first and } at the end of it.is there any command that give all the characters in {}.

Amir

## Recognizable format...

Dear Preben

i use your code but my own data. i copy my data from excell to maple and write the code like this

X:=<<0.0887574>,<0.502959>,<0.91716>,<1.30178>,<1.71598>,<2.13018>,<2.54438>,<2.95858>,<3.37278>,<3.78698>,<4.20118>,<4.5858>,<5>,<5.4142>,<5.8284>,<6.21302>,<6.62722>,<7.01183>,<7.42604>,<7.84024>,<8.25444>,<8.63905>,<9.05325>,<9.46746>,<9.88166>,<10.2959>,<10.7101>,<11.0947>,<11.5089>,<11.8935>,<12.2781>,<12.6923>,<13.0769>,<13.4615>,<13.8757>,<14.2604>,<14.645>,<15.0592>,<15.4438>,<15.858>,<16.2722>,<16.6864>,<17.071>,<17.4556>,<17.8698>,<18.2544>,<18.6391>,<19.0533>,<19.4675>,<19.8521>,<20.2367>,<20.6509>>;
Y:=<<0.35157>,<0.401794>,<0.452018>,<0.502242>,<0.552466>,<0.602691>,<0.652915>,<0.703139>,<0.753363>,<0.803587>,<0.853812>,<0.900448>,<0.950673>,<1.0009>,<1.05112>,<1.09776>,<1.14439>,<1.19462>,<1.24126>,<1.28789>,<1.33453>,<1.37758>,<1.41345>,<1.44574>,<1.47444>,<1.49596>,<1.50673>,<1.50314>,<1.47803>,<1.43498>,<1.42422>,<1.42063>,<1.41704>,<1.40628>,<1.39552>,<1.38117>,<1.38117>,<1.3704>,<1.35605>,<1.33812>,<1.32735>,<1.29148>,<1.29507>,<1.27354>,<1.19462>,<1.23767>,<1.18027>,<1.24843>,<1.26996>,<1.21973>,<1.23049>,<1.24843>>;
s:=CurveFitting:-Spline(X,Y,x):
S:=unapply(s,x):
S(12.3456);
#Alternatively:
eval(s,x=12.3456);

but unfortunetly it gave an error

Error, (in CurveFitting:-Spline) data points not in recognizable format

how can i fixed that

Amir

## Recognizable format...

Dear Preben

i use your code but my own data. i copy my data from excell to maple and write the code like this

X:=<<0.0887574>,<0.502959>,<0.91716>,<1.30178>,<1.71598>,<2.13018>,<2.54438>,<2.95858>,<3.37278>,<3.78698>,<4.20118>,<4.5858>,<5>,<5.4142>,<5.8284>,<6.21302>,<6.62722>,<7.01183>,<7.42604>,<7.84024>,<8.25444>,<8.63905>,<9.05325>,<9.46746>,<9.88166>,<10.2959>,<10.7101>,<11.0947>,<11.5089>,<11.8935>,<12.2781>,<12.6923>,<13.0769>,<13.4615>,<13.8757>,<14.2604>,<14.645>,<15.0592>,<15.4438>,<15.858>,<16.2722>,<16.6864>,<17.071>,<17.4556>,<17.8698>,<18.2544>,<18.6391>,<19.0533>,<19.4675>,<19.8521>,<20.2367>,<20.6509>>;
Y:=<<0.35157>,<0.401794>,<0.452018>,<0.502242>,<0.552466>,<0.602691>,<0.652915>,<0.703139>,<0.753363>,<0.803587>,<0.853812>,<0.900448>,<0.950673>,<1.0009>,<1.05112>,<1.09776>,<1.14439>,<1.19462>,<1.24126>,<1.28789>,<1.33453>,<1.37758>,<1.41345>,<1.44574>,<1.47444>,<1.49596>,<1.50673>,<1.50314>,<1.47803>,<1.43498>,<1.42422>,<1.42063>,<1.41704>,<1.40628>,<1.39552>,<1.38117>,<1.38117>,<1.3704>,<1.35605>,<1.33812>,<1.32735>,<1.29148>,<1.29507>,<1.27354>,<1.19462>,<1.23767>,<1.18027>,<1.24843>,<1.26996>,<1.21973>,<1.23049>,<1.24843>>;
s:=CurveFitting:-Spline(X,Y,x):
S:=unapply(s,x):
S(12.3456);
#Alternatively:
eval(s,x=12.3456);

but unfortunetly it gave an error

Error, (in CurveFitting:-Spline) data points not in recognizable format

how can i fixed that

Amir

thanks

thanks

thanks.

thanks.

## the algorithm for system of 4 ode...

Dear Preben

following previous question, i extend tour algortihm to system of 4 ode. i solve it and in some parameters it works. but in some parameters, it doesnt converge. the details are in the following link

http://www.mapleprimes.com/questions/135615-System-Of-4-Ode?sq=135615

## the algorithm for system of 4 ode...

Dear Preben

following previous question, i extend tour algortihm to system of 4 ode. i solve it and in some parameters it works. but in some parameters, it doesnt converge. the details are in the following link

http://www.mapleprimes.com/questions/135615-System-Of-4-Ode?sq=135615

## numeric...

hi

thanks for your answer, i think it solve analytically, but i want to know how maple solve it numerically? the numeric solution is important for me

Amir

## numeric...

hi

thanks for your answer, i think it solve analytically, but i want to know how maple solve it numerically? the numeric solution is important for me